Difference between revisions of "Manage VM in console"
Line 29: | Line 29: | ||
== '''OpenVZ''' == | == '''OpenVZ''' == | ||
− | Show all OpenVZ containers | + | Show all OpenVZ containers: |
<pre> | <pre> | ||
vzlist -a | vzlist -a | ||
</pre> | </pre> | ||
− | Stop container | + | Stop container: |
<pre> | <pre> | ||
vzctl stop 101 | vzctl stop 101 | ||
</pre> | </pre> | ||
− | Srart container | + | Srart container: |
<pre> | <pre> | ||
vzctl start 101 | vzctl start 101 | ||
</pre> | </pre> | ||
− | Restart container | + | Restart container: |
<pre> | <pre> | ||
vzctl restart 101 | vzctl restart 101 | ||
+ | </pre> | ||
+ | Remove container: | ||
+ | <pre> | ||
+ | vzctl destroy | ||
</pre> | </pre> | ||
For extended description refer to man vzctl. | For extended description refer to man vzctl. | ||
"[[Category:HOWTOs]]" | "[[Category:HOWTOs]]" |
Revision as of 11:10, 29 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
For extended description refer to man virsh.
OpenVZ
Show all OpenVZ containers:
vzlist -a
Stop container:
vzctl stop 101
Srart container:
vzctl start 101
Restart container:
vzctl restart 101
Remove container:
vzctl destroy
For extended description refer to man vzctl. ""