Manage VM in console

From vpsget wiki
Revision as of 12:13, 4 June 2013 by Ndi (talk | contribs) (OpenVZ)
Jump to: navigation, search

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

Show all OVZ templates:

 ls /vz/template/cache/

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

ovz container creation example:

vzctl create 115 --ostemplate centos-6-x86

Remove container:

vzctl destroy

For extended description refer to man vzctl. ""