Wednesday, May 9, 2012

How to fix the VM autostart problem in vSphere 5 Update 1

Activate the ESXi shell
Login and enter this command to obtain a list of VMs
vim-cmd vmsvc/getallvms
Note the number of each VM you want to autostart
Create a script like this one:
vim-cmd vmsvc/power.on 50
sleep 30s
vim-cmd vmsvc/power.on 15

where you put a line for each VM you want to autostart, using the VM number you note earlier.
Save this script in a datastore folder and make it executable:
chmod 777 /vmfs/volumes/datastore1/scripts/
add a line to your /etc/rc.local file to call

No comments:

Post a Comment