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 1: | Line 1: | ||
{{lowercase}} | {{lowercase}} | ||
<code>[[virsh]] console YOUR_MACHINE</code> Connect the virtual serial console for the guest | <code>[[virsh]] console YOUR_MACHINE</code> Connect the virtual serial console for the guest | ||
+ | * Example: <code>console YOUR_VM_NAME [devname] [--safe] [--force]</code> | ||
+ | * Man: https://www.libvirt.org/manpages/virsh.html#console | ||
− | + | == Connecting == | |
− | + | virsh console MACHINE_NAME | |
− | |||
− | |||
− | == | ||
− | |||
− | virsh console | ||
Connected to domain MACHINE_NAME | Connected to domain MACHINE_NAME | ||
Escape character is ^] | Escape character is ^] | ||
error: operation failed: Active console session exists for this domain | error: operation failed: Active console session exists for this domain | ||
− | |||
− | |||
− | |||
− | |||
virsh console | virsh console | ||
error: command 'console' requires <[[domain]]> option | error: command 'console' requires <[[domain]]> option | ||
== [[Enable serial console]] == | == [[Enable serial console]] == | ||
− | + | First you need to enable [[serial]] console in your VM Machine.<ref>https://www.cyberciti.biz/faq/how-to-enable-kvm-virsh-console-access-for-ubuntu-linux-vm/</ref> | |
− | |||
− | |||
− | |||
− | |||
− | + | * <code>sudo [[systemctl enable]] [[serial-getty]]@[[ttyS0]].service</code> | |
− | + | * <code>sudo [[systemctl start]] serial[email protected]</code> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | * <code>[[virsh]] [[console]] MACHINE</code> | |
− | |||
== Kill old console == | == Kill old console == | ||
Line 56: | Line 33: | ||
* <code>[[virsh vncdisplay]] VM_NAME</code> | * <code>[[virsh vncdisplay]] VM_NAME</code> | ||
* <code>[[/var/log/libvirt/]]qemu/</code> | * <code>[[/var/log/libvirt/]]qemu/</code> | ||
− | |||
* [[Console]] | * [[Console]] | ||
− | |||
== See also == | == See also == | ||
Line 64: | Line 39: | ||
* {{virsh}} | * {{virsh}} | ||
− | [[Category: | + | [[Category:Linux]] |
[[Category:KVM]] | [[Category:KVM]] |
Advertising: