Difference between revisions of "Manage VM in console"
Line 1: | Line 1: | ||
== '''KVM''' == | == '''KVM''' == | ||
− | Show all Virtual Machines: | + | Show all Virtual Machines (logical volumes): |
<pre> | <pre> | ||
lvdisplay | lvdisplay | ||
</pre> | </pre> | ||
− | + | Show state of Virtual Machines: | |
+ | <pre> | ||
+ | virsh list --all | ||
+ | </pre> | ||
+ | Soft shutdown VM. This will sent shutdown command to VMs OS. | ||
<pre> | <pre> | ||
virsh shutdown kvm101 | virsh shutdown kvm101 | ||
+ | </pre> | ||
+ | Soft reboot VM | ||
+ | <pre> | ||
+ | virsh reboot kvm101 | ||
+ | </pre> | ||
+ | Hard power off. This will be equal to unplugging power cord from physical machine. | ||
+ | <pre> | ||
+ | virsh destroy kvm101 | ||
+ | </pre> | ||
+ | Hard power on | ||
+ | <pre> | ||
+ | virsh start kvm101 | ||
</pre> | </pre> | ||
Revision as of 16:00, 28 March 2013
KVM
Show all Virtual Machines (logical volumes):
lvdisplay
Show state of Virtual Machines:
virsh list --all
Soft shutdown VM. This will sent shutdown command to VMs OS.
virsh shutdown kvm101
Soft reboot VM
virsh reboot kvm101
Hard power off. This will be equal to unplugging power cord from physical machine.
virsh destroy kvm101
Hard power on
virsh start kvm101
OpenVZ
Show all OpenVZ containers
vzlist -a