Difference between revisions of "Manage VM in console"

From vpsget wiki
Jump to: navigation, search
Line 44: Line 44:
 
<pre>
 
<pre>
 
vzctl restart 101
 
vzctl restart 101
 +
</pre>
 +
Create container:
 +
<pre>
 +
vzctl create vmID
 
</pre>
 
</pre>
 
Remove container:
 
Remove container:

Revision as of 17: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

Create container:

vzctl create vmID

Remove container:

vzctl destroy

For extended description refer to man vzctl. ""