Page MenuHomeVyOS Platform

The VMware Tools resume script did not run successfully in this virtual machine.
Closed, ResolvedPublic

Description

When suspending and resuming the VM with VMware it will popup with the following message:

The VMware Tools resume script did not run successfully in this virtual machine.
If you have configured a custom resume script in this virtual machine, make sure that it contains no errors. You can also submit a support request to report this issue.

After digging into this error this seems to be caused by the /etc/vmware-tools/scripts/resume-vm-default.d/__pycache__ directory.
And can be reproduced using the following commands:

$ #sudo bash -x /etc/vmware-tools/suspend-vm-default; echo $?
$ sudo bash -x /etc/vmware-tools/resume-vm-default; echo $?
++ date
+ echo Wed 14 Jul 2021 03:05:57 PM UTC ': Executing '\''/etc/vmware-tools/resume-vm-default'\'''
Wed 14 Jul 2021 03:05:57 PM UTC : Executing '/etc/vmware-tools/resume-vm-default'
++ dirname /etc/vmware-tools/resume-vm-default
+ TOOLS_CONFDIR=/etc/vmware-tools

<snipped>

+ exitCode=0
+ RunScripts /etc/vmware-tools/scripts/resume-vm-default.d
+ scriptDir=/etc/vmware-tools/scripts/resume-vm-default.d
+ '[' -d /etc/vmware-tools/scripts/resume-vm-default.d ']'
+ for scriptFile in "$scriptDir"/*
+ '[' -x /etc/vmware-tools/scripts/resume-vm-default.d/ether-resume.py ']'
+ /etc/vmware-tools/scripts/resume-vm-default.d/ether-resume.py resume-vm
++ expr 0 '|' 0
+ exitCode=0
+ for scriptFile in "$scriptDir"/*
+ '[' -x /etc/vmware-tools/scripts/resume-vm-default.d/__pycache__ ']'
+ /etc/vmware-tools/scripts/resume-vm-default.d/__pycache__ resume-vm
/etc/vmware-tools/resume-vm-default: line 92: /etc/vmware-tools/scripts/resume-vm-default.d/__pycache__: Is a directory
++ expr 0 '|' 126
+ exitCode=126
+ return 126
126

The error that causing the resume scripts to return errors:
/etc/vmware-tools/resume-vm-default: line 92: /etc/vmware-tools/scripts/resume-vm-default.d/__pycache__: Is a directory

So the /etc/vmware-tools/resume-vm-default does not handle directories very well.

$ dpkg -S /etc/vmware-tools/resume-vm-default
open-vm-tools: /etc/vmware-tools/resume-vm-default

$ dpkg -S /etc/vmware-tools/scripts/resume-vm-default.d/__pycache__
vyos-1x-vmware: /etc/vmware-tools/scripts/resume-vm-default.d/__pycache__

To fix this warning, the __pycache__ directory should be removed from the vyos-1x-vmware package.

Details

Difficulty level
Unknown (require assessment)
Version
vyos-1.3.0-rc5
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Behavior change
Issue type
Bug (incorrect behavior)

Event Timeline

yun triaged this task as Normal priority.Jul 14 2021, 3:21 PM
yun created this task.
yun created this object in space S1 VyOS Public.
Viacheslav changed the task status from Open to Needs testing.Jul 21 2021, 6:55 PM
Viacheslav assigned this task to yun.

Want to test latest rolling iso, but equuleus seems to be stuck at vyos-1.3-beta-202107121144-amd64.iso which doesn't have this fix yet.

Confirmed fixed, tested with vyos-1.3-beta-202108192027-amd64.iso

SrividyaA set Issue type to Bug (incorrect behavior).Aug 31 2021, 6:42 PM