Difference between revisions of "Manage VM in console"
Line 1: | Line 1: | ||
− | |||
− | |||
== '''KVM''' == | == '''KVM''' == | ||
Line 13: | Line 11: | ||
Soft shutdown VM. This will sent shutdown command to VMs OS. | Soft shutdown VM. This will sent shutdown command to VMs OS. | ||
<pre> | <pre> | ||
− | virsh shutdown kvm101 | + | virsh shutdown kvm<ID> #for example kvm101 |
</pre> | </pre> | ||
Soft reboot VM | Soft reboot VM | ||
<pre> | <pre> | ||
− | virsh reboot | + | virsh reboot kvm<ID> |
</pre> | </pre> | ||
Hard power off. This will be equal to unplugging power cord from physical machine. | Hard power off. This will be equal to unplugging power cord from physical machine. | ||
<pre> | <pre> | ||
− | virsh destroy | + | virsh destroy kvm<ID> |
</pre> | </pre> | ||
Hard power on | Hard power on | ||
<pre> | <pre> | ||
− | virsh start | + | virsh start kvm<ID> |
</pre> | </pre> | ||
For extended description refer to man virsh. | For extended description refer to man virsh. | ||
Line 37: | Line 35: | ||
Stop container: | Stop container: | ||
<pre> | <pre> | ||
− | vzctl stop | + | vzctl stop <vmID> |
</pre> | </pre> | ||
Srart container: | Srart container: | ||
<pre> | <pre> | ||
− | vzctl start | + | vzctl start <vmID> |
</pre> | </pre> | ||
Restart container: | Restart container: | ||
<pre> | <pre> | ||
− | vzctl restart | + | vzctl restart <vmID> |
</pre> | </pre> | ||
Create container: | Create container: | ||
<pre> | <pre> | ||
− | vzctl create | + | vzctl create <vmID> |
</pre> | </pre> | ||
+ | More details about CT creation: http://openvz.org/Configuring_container_creation<br/> | ||
Remove container: | Remove container: | ||
<pre> | <pre> |
Revision as of 14:12, 1 April 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 kvm<ID> #for example kvm101
Soft reboot VM
virsh reboot kvm<ID>
Hard power off. This will be equal to unplugging power cord from physical machine.
virsh destroy kvm<ID>
Hard power on
virsh start kvm<ID>
For extended description refer to man virsh.
OpenVZ
Show all OpenVZ containers:
vzlist -a
Stop container:
vzctl stop <vmID>
Srart container:
vzctl start <vmID>
Restart container:
vzctl restart <vmID>
Create container:
vzctl create <vmID>
More details about CT creation: http://openvz.org/Configuring_container_creation
Remove container:
vzctl destroy
For extended description refer to man vzctl. ""