SolusVM Mass Starting/Stopping Virtual Servers

If you need to mass start your virtual servers, run the following code in SSH on the host:

Xen PV/HVM

START

CFGS=/home/xen/vm*/;for cfg in $CFGS;do xm create $cfg*.cfg;done

STOP

xm shutdown -aw

OpenVZ

START

CFGS=`vzlist -S -Ho ctid`;for cfg in $CFGS;do vzctl start $cfg;done

STOP

CFGS=`vzlist -S -Ho ctid`;for cfg in $CFGS;do vzctl stop $cfg;done

KVM

CFGS=/home/kvm/kvm*/;for cfg in $CFGS;do virsh create $cfg*.xml;done
This entry was posted in CentOS, Dedicated Server, General, Tips and Tricks. Bookmark the permalink.

Leave a Reply