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}} | ||
− | |||
− | + | 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]] [email protected]</code> | |
− | + | *<code>sudo [[systemctl start]] [email protected]</code> | |
− | + | ||
+ | *<code>[[virsh]] [[console]] MACHINE</code> | ||
+ | |||
+ | |||
+ | virsh console MACHINE_NAME | ||
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 | ||
− | + | ===To kill old console=== | |
− | + | ps -ef | grep console | |
+ | [[kill -9]] {PID} | ||
− | |||
virsh console | virsh console | ||
error: command 'console' requires <[[domain]]> option | error: command 'console' requires <[[domain]]> option | ||
− | |||
− | |||
− | + | == Related commands == | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | == Related == | ||
− | |||
* <code>[[virsh list]]</code> | * <code>[[virsh list]]</code> | ||
* <code>[[virsh start]]</code> | * <code>[[virsh start]]</code> | ||
Line 56: | Line 29: | ||
* <code>[[virsh vncdisplay]] VM_NAME</code> | * <code>[[virsh vncdisplay]] VM_NAME</code> | ||
* <code>[[/var/log/libvirt/]]qemu/</code> | * <code>[[/var/log/libvirt/]]qemu/</code> | ||
− | * <code>[[virsh | + | * <code>[[virsh ttyconsole]]</code> |
− | |||
− | |||
== See also == | == See also == | ||
Line 64: | Line 35: | ||
* {{virsh}} | * {{virsh}} | ||
− | [[Category: | + | |
+ | [[Category:Linux]] | ||
[[Category:KVM]] | [[Category:KVM]] |
Advertising: