Login to the VM host machine via ssh.
List all the vms with the command below
vim-cmd vmsvc/getallvms
Get current status of the VM
vim-cmd vmsvc/power.getstate 10
Start VM with command line
vim-cmd vmsvc/power.on 10
vim-cmd vmsvc/power.on 6
vim-cmd vmsvc/power.on 9
vim-cmd vmsvc/power.on 8
Make startup script so that VM will start automatically on the computer boot.
Go to directory /etc/rc.local.d/
Create a file with name vm_startup.sh and following contents
/bin/vim-cmd vmsvc/power.on 10
/bin/vim-cmd vmsvc/power.on 6
/bin/vim-cmd vmsvc/power.on 9
/bin/vim-cmd vmsvc/power.on 8
List all the vms with the command below
vim-cmd vmsvc/getallvms
Get current status of the VM
vim-cmd vmsvc/power.getstate 10
Start VM with command line
vim-cmd vmsvc/power.on 10
vim-cmd vmsvc/power.on 6
vim-cmd vmsvc/power.on 9
vim-cmd vmsvc/power.on 8
Make startup script so that VM will start automatically on the computer boot.
Go to directory /etc/rc.local.d/
Create a file with name vm_startup.sh and following contents
/bin/vim-cmd vmsvc/power.on 10
/bin/vim-cmd vmsvc/power.on 6
/bin/vim-cmd vmsvc/power.on 9
/bin/vim-cmd vmsvc/power.on 8
Changing hostname of VMWARE ESXi
Get the current hostname and fqdn
esxcli system hostname get
Set the hostname and fqdn
esxcli system hostname set --fqdn=vm.ramro.com.np
No comments:
Post a Comment