Difference between revisions of "Manage VM in console"

From vpsget wiki
Jump to: navigation, search
(OpenVZ)
(OpenVZ)
Line 56: Line 56:
  
 
ovz container creation example:
 
ovz container creation example:
 
+
<pre>
 
vzctl create 115 --ostemplate centos-6-x86
 
vzctl create 115 --ostemplate centos-6-x86
 
+
</pre>
 
Remove container:
 
Remove container:
 
<pre>
 
<pre>

Revision as of 12:13, 4 June 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

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. ""