VMware Cloud Community
IvarHome
Hot Shot
Hot Shot
Jump to solution

VM Suspend problem

Hi,

I have ESXi 6.7. When I manually suspend VM through vCenter, then no problems. But when I send "poweroff" command through SSH, then 2 VM suspended correctly, but one VM just power off.

After ESXi host restart I see only 2 VM were suspended, but 1 VM not, just powered off. Also I have set in vCenter host configuration to suspend all VM when shutting down host.

Reply
0 Kudos
1 Solution

Accepted Solutions
wila
Immortal
Immortal
Jump to solution

Hi,

Curious indeed (sorry I don't always read back up the whole thread when replying and do tend to forget details as I answer many threads on a daily bases).

Have you configured the time the suspend action can take?

This can be configured at the host as well as at vCenter. There is a chance that the settings are not synced.

For example here's a screenshot of one of my host clients for a VM

pastedImage_0.png

If the VM needs a longer time to suspend then I would adjust the stop delay time in the screen above.

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva

View solution in original post

16 Replies
RickVerstegen
Expert
Expert
Jump to solution

Did you also tried to suspend the virtual machines via PowerCLI?

Get-VM -Name VirtualMachineName | Suspend-VM

Was I helpful? Give a kudo for appreciation!
Blog: https://rickverstegen84.wordpress.com/
Twitter: https://twitter.com/verstegenrick
Reply
0 Kudos
IvarHome
Hot Shot
Hot Shot
Jump to solution

No, I dont use PowerCLI, I dont like it. I use vim-cmd to suspend VM, or Automate BPA macros. And yes, it suspends correctly. Only dont suspend with poweroff command. And the VM is the only one completely resides inside iSCSI datastore. Other local VMs suspend also with poweroff command.

Reply
0 Kudos
kenbshinn
Enthusiast
Enthusiast
Jump to solution

Is vmware tools installed and up to date on that VM that you are having an issue with? It sounds to me like it might be having issue as it is misbehaving.

Reply
0 Kudos
IvarHome
Hot Shot
Hot Shot
Jump to solution

VMware Tools is installed and the version is current.

Reply
0 Kudos
kenbshinn
Enthusiast
Enthusiast
Jump to solution

Have you tried to uninstall and reinstall VMWare tools on that VM in particular.

Reply
0 Kudos
IvarHome
Hot Shot
Hot Shot
Jump to solution

No, why I need reinstall vmware tools?

Reply
0 Kudos
kenbshinn
Enthusiast
Enthusiast
Jump to solution

Have you checked logs on either the ESXi host or vCenter to see if it gives you a reason why the VM is not suspending but turning off?

To me, reinstalling VMware tools seems like a reason why it might be failing so reinstalling vmware tools might fix it. But come to think of it, I would recommend checking your event logs first.

Reply
0 Kudos
IvarHome
Hot Shot
Hot Shot
Jump to solution

I dont see nothing related to suspend in events or tasks. But about vmware tools. I think now, suspend dont need vmware tools at all. Suspend is processed in host level, not in guest. Suspend just saves memory to file and thats all.

Reply
0 Kudos
kenbshinn
Enthusiast
Enthusiast
Jump to solution

You are correct, I was mistaken about how Suspend works with ESXi as I have never used it. I saw a post from some time last year about the Suspend function in VMWare Workstation and Apparently there is a configurable item in the .vmx file that allows you to specify soft or hard suspend. I don't believe I have ever seen that as an option on an ESXi created .vmx file.

I have not found anything in my research, if I see anything I will let you know.

Reply
0 Kudos
wila
Immortal
Immortal
Jump to solution

Hi,

If VMware Tools is not running correctly then a "Power Off" command from vim-cmd behaves like a hard shut down.

So yes, I agree with the user kenbshinn and I'd say it is very likely to be a VMware Tools problem.

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
Reply
0 Kudos
IvarHome
Hot Shot
Hot Shot
Jump to solution

No, "poweroff" command dont need at all "vim-cmd" command. Its just one word "poweroff". And suspend dont need vmware tools at all.

Reply
0 Kudos
IvarHome
Hot Shot
Hot Shot
Jump to solution

Now I tested this with UPS ESXi shutdown command. Still 2 VM with iSCSI datastores and virtual flash just dont suspend, but instead cold shutdown. All other VM with local disks and no flash cache suspend correctly. I think you must have the same situation. Its not possible that only I have this kind of problem. Does anyone use iSCSI storage or virtual flash at all in this forum?

Reply
0 Kudos
wila
Immortal
Immortal
Jump to solution

Hi,

I think it is because you are using the poweroff command.

The poweroff command immediately sends an ACPI signal to the hardware to power off.

There is no time for VMware to do anything, it is very close to yanking the power cord.

The normal way to initiate the shutdown sequence from the command line IMO would be to use the shutdown command, for example:

shutdown -h now

(or instead of now add a time)

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
IvarHome
Hot Shot
Hot Shot
Jump to solution

This sound very likely. I try this tomorrow. So, the UPS brands (CyberPower) just make software with wrong commands. Altough strange is, why all other local VM-s make suspend. Of course iSCSI disks make suspend very long time compared with locals. Ist also little mess from VMWare side then.

Reply
0 Kudos
wila
Immortal
Immortal
Jump to solution

Hi,

Curious indeed (sorry I don't always read back up the whole thread when replying and do tend to forget details as I answer many threads on a daily bases).

Have you configured the time the suspend action can take?

This can be configured at the host as well as at vCenter. There is a chance that the settings are not synced.

For example here's a screenshot of one of my host clients for a VM

pastedImage_0.png

If the VM needs a longer time to suspend then I would adjust the stop delay time in the screen above.

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
IvarHome
Hot Shot
Hot Shot
Jump to solution

They are synced, but I set them 5s, as from Vmware help I readed that it first suspend/shutdown firsm VM, and when first VM is suspended, then it waits this 5s and start with second. But maybe this was wrong understanding from this help text. Maybe vmware wants to say in this text instead that it shuts down first VM, and dont wait when its shutdown completes , but instead right starts shutting down second and the delay is between first VM shutdown start and next VM shutdown start. I interpreted it as delay between first VM shutdown end and second VM shutdown start. And why vmware then writes "The ESXi host shuts down only after all virtual machines are powered off"? .........ok, lets try now........I set delay to 600s. But in putty SSH "shutdown" is unknown command. Maybe its still "poweroff".....  ...But you was right about increasing this delay. UPS now suspends all VM-s correctly, with ESXi host shutdown command. The Vmware documentation is wrong. This is not delay, but instead timeout. When it suspends faster, then it gets next VM and when all suspended, then shutdown ESXi host earlier. I had 5 VM-s and it takes about 8 min.

"Shutdown delay

When you power off the ESXi host, it starts powering off the virtual machines that run on it. The order in which virtual machines are powered off is the reverse of their startup order. After the ESXi host powers off the first virtual machine, the host waits for the specified shutdown delay time and then powers off the next virtual machine. The ESXi host shuts down only after all virtual machines are powered off."

Reply
0 Kudos