VMware Cloud Community
IamTHEvilONE
Immortal
Immortal

suspend-vm-default doesn't seem to be called on Suspend

I seem to see a few posts of something similar

When suspending a VM with OVT installed, the suspend-vm-default script is not called to run user/vmware scripts as defined.

Using the power buttons from the vSphere client, I can see the power actions being passed except for suspend.

 

$ sudo grep Executing /var/log/vmware-network.* | cut -d\: -f2- | egrep -v "^\+" | sort
Wed 21 Jun 2023 01:37:55 AM UTC : Executing '/etc/vmware-tools/scripts/vmware/network resume-vm'
Wed 21 Jun 2023 05:55:45 PM UTC : Executing '/etc/vmware-tools/scripts/vmware/network poweroff-vm'
Wed 21 Jun 2023 06:07:20 PM UTC : Executing '/etc/vmware-tools/scripts/vmware/network resume-vm'

 

The script itself seems to work when called, and calls my user defined script in the appropriate path.

But I'm at a bit of a loss for what to do next since this relies on VMware kicking off the script on Suspend in the vSphere Client.

 

$ cat /etc/os-release 
NAME="Ubuntu"
VERSION="20.04.4 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.4 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

$ vmware-toolbox-cmd -v
11.3.0.29534 (build-18090558)

 

VMware Tools Service doesn't even show the Suspend action:

$ sudo grep 'Executing script' /var/log/vmware-vmsvc-root.* | cut -d\: -f2- | sort
[2023-06-21T18:56:49.242Z] [ message] [powerops] [771] Executing script: '/etc/vmware-tools/resume-vm-default'
[2023-06-21T18:56:49.242Z] [ message] [vmsvc] [771] Executing script for state change 'OS_Resume'.
[2023-06-21T18:58:52.012Z] [ message] [vmsvc] [771] Executing script for state change 'OS_Halt'.
[2023-06-21T18:58:52.013Z] [ message] [powerops] [771] Executing script: '/etc/vmware-tools/poweroff-vm-default'
Reply
0 Kudos
0 Replies