We change UPS eqipment today, so I shutdown VMware vSphere Hypervisor from remote.
I forgot to setup VM boot when VMware vSphere Hypervisor boot.
I didn't have windows with vSphere client, and I didn't want to download vCLI.
I start google and looking some method. I find this VMware KB ( http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1038043 )
Login VMware vSphere Hypervisor with ssh.
use " vim-cmd " command to get VM id and some information.
# vim-cmd vmsvc/getallvms
Vmid Name File Guest OS Version Annotation
2 openSUSE12-1 [datastore1] openSUSE12-1/openSUSE12-1.vmx rhel6_64Guest vmx-08
Now, our target VM's Vmid is 2.
To get power status use #vim-cmd vmsvc/power.getstate vmid
# vim-cmd vmsvc/power.getstate 2
Retrieved runtime info
Powered off
Power on VM.
# vim-cmd vmsvc/power.on 2
Powering on VM:
Double confirm the powerstatus
# vim-cmd vmsvc/power.getstate 2
Retrieved runtime info
Powered on
To get power status use #vim-cmd vmsvc/power.getstate vmid
# vim-cmd vmsvc/power.getstate 2
Retrieved runtime info
Powered off
Power on VM.
# vim-cmd vmsvc/power.on 2
Powering on VM:
Double confirm the powerstatus
# vim-cmd vmsvc/power.getstate 2
Retrieved runtime info
Powered on
If you want to set VM boot with VMware vSphere Hypervisor you could see this( http://communities.vmware.com/thread/254854 ) or this one ( http://communities.vmware.com/message/1450748 )
To view the default value, use
# vim-cmd hostsvc/autostartmanager/get_defaults
(vim.host.AutoStartManager.SystemDefaults) {
dynamicType =
enabled =
startDelay = 120,
stopDelay = 120,
waitForHeartbeat = false,
stopAction = "PowerOff",
}
The command will reference the /etc/vmware/hostd/vmAutoStart.xml
# cat /etc/vmware/hostd/vmAutoStart.xml
<_length>0
<_type>vim.host.AutoStartManager.AutoPowerInfo[]
<_type>vim.host.AutoStartManager.SystemDefaults
Enable autostart ( 1 = enable )
# vim-cmd hostsvc/autostartmanager/enable_autostart 1
View the vmAutoStart.xml
# cat /etc/vmware/hostd/vmAutoStart.xml
<_length>0
<_type>vim.host.AutoStartManager.AutoPowerInfo[]
<_type>vim.host.AutoStartManager.SystemDefaults
for update_autostartentry syntax
# vim-cmd hostsvc/autostartmanager/update_autostartentry
Insufficient arguments.
Usage: update_autostartentry VMId StartAction StartDelay StartOrder StopAction StopDelay WaitForHeartbeat
Setting up VM autostart
# vim-cmd hostsvc/autostartmanager/update_autostartentry 2 "PowerOn" "15" "1" "systemDefault" "systemDefault" "systemDefault"
1Updated AutoStart order.
Review the vmAutoStart.xml
# cat /etc/vmware/hostd/vmAutoStart.xml
<_length>1
<_type>vim.host.AutoStartManager.AutoPowerInfo[]
<_type>vim.host.AutoStartManager.AutoPowerInfo
<_type>vim.VirtualMachine
<_type>vim.host.AutoStartManager.SystemDefaults
We could use command to check too
# vim-cmd hostsvc/autostartmanager/get_autostartseq
(vim.host.AutoStartManager.AutoPowerInfo) [
(vim.host.AutoStartManager.AutoPowerInfo) {
dynamicType =
key = 'vim.VirtualMachine:2',
startOrder = 1,
startDelay = 15,
waitForHeartbeat = "systemDefault",
startAction = "PowerOn",
stopDelay = 0,
stopAction = "systemDefault",
}
]
~ enjoy it
^__^
Keep sharing this kind of useful information.
ReplyDeleteVMware Training | VMware Course
ugly but useful ...:) ; thanX
ReplyDeleteTHE LCM OF THREE DIFFERENT NUMBERS IS 1024
ReplyDeleteERROR [ERR_HTTP_HEADERS_SENT]:
CANNOT SET HEADERS AFTER THEY ARE SENT TO THE CLIENT
GIVEN SIGNS SIGNIFY SOMETHING AND ON THAT BASIS AMCAT
ZOHO APTITUDE QUESTIONS 2019 PDF
HOW TO HACK HOTSPOT PASSWORD
This comment has been removed by the author.
ReplyDeleteThanks! I'll use it for vmware backup host configuration.
ReplyDeletenice very informative....
ReplyDeleteInterview Question for CTS Placement
Cognizant Interview Questions For Fresher
Cognizant Interview Questions
Resume Coustomer Service Executive
Resume For Bank Job
Resume Cyber security Engineer
Resume Data Base Developer
Resume DeputyManager
Resume Design Engineer
Resume Desktop Support Engineer
Very Interesting blog. Thanks for sharing this blog. You can also go through blog which is related to this which is providing variety of movies also. For details you can visit our lovel page ..share more
ReplyDeleteAi & Artificial Intelligence Course in Chennai
PHP Training in Chennai
Ethical Hacking Course in Chennai Blue Prism Training in Chennai
UiPath Training in Chennai