Editing Virsh console

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 6: Line 6:
 
* Man page: https://www.libvirt.org/manpages/virsh.html#console
 
* Man page: https://www.libvirt.org/manpages/virsh.html#console
  
== Connection examples ==
+
== Examples ==
Connecting using VM name:
 
 
  virsh console [[YOUR_VM_NAME|MACHINE_NAME]]
 
  virsh console [[YOUR_VM_NAME|MACHINE_NAME]]
 
  Connected to domain MACHINE_NAME
 
  Connected to domain MACHINE_NAME
Line 13: Line 12:
 
  error: operation failed: Active console session exists for this domain
 
  error: operation failed: Active console session exists for this domain
  
Connecting using VM id. You can obtain it with <code>[[virsh list]]</code>
+
Example using ID from VM, you can obtain it with <code>[[virsh list]]</code>
  virsh console 3
+
  virsh console 5
  
Error when no argument is provided:
 
 
  virsh console
 
  virsh console
 
  error: command 'console' requires <[[domain]]> option
 
  error: command 'console' requires <[[domain]]> option
Line 22: Line 20:
 
== [[Enable serial console]] ==
 
== [[Enable serial console]] ==
 
{{enable serial console}}
 
{{enable serial console}}
 
== Configure [[KVM]] server ==
 
 
[[virsh edit]] VM_NAME
 
 
<serial type='pty'>
 
  <source path='/dev/pts/0'/>
 
  <target type='isa-serial' port='0'>
 
    <model name='isa-serial'/>
 
  </target>
 
  <alias name='serial0'/>
 
</serial>
 
<console type='pty' tty='/dev/pts/0'>
 
  <source path='/dev/pts/0'/>
 
  <target type='serial' port='0'/>
 
  <alias name='serial0'/>
 
</console>
 
Ref: https://ravada.readthedocs.io/en/latest/docs/config_console.html
 
 
== Quit console ==
 
Use <code>[[CTRL + 5]]</code> to exit the console.<ref>https://ravada.readthedocs.io/en/latest/docs/config_console.html</ref>
 
  
 
== Kill old console ==
 
== Kill old console ==
Line 58: Line 35:
 
* <code>[[virsh edit]]</code>
 
* <code>[[virsh edit]]</code>
 
* [[Console]]
 
* [[Console]]
* [[virt-manager]]
 
  
 
== See also ==
 
== See also ==
Line 64: Line 40:
 
* {{virsh}}
 
* {{virsh}}
  
[[Category:virsh]]
+
[[Category:Linux]]
 
[[Category:KVM]]
 
[[Category:KVM]]

Please note that all contributions to wikieduonline may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Wikieduonline:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Advertising: