VMware Communities
duxed
Enthusiast
Enthusiast
Jump to solution

Failed to suspend, won't restart VM - still in Running state

macOS Big Sur 11.6.3 on Intel

Fusion 12.2.1

Had an Ubuntu 20 VM stall whilst suspending. Took ages, but didn't resolve. So after a while, Force Quit.

Restarting Fusion, the VM is listed as Running however there is no window visible.

Restart / Shutdown and option variants are all disabled.

So can't restart the VM with any of the menus.

What's the procedure to clean up the files in the package to help Fusion think that it is not running and will attempt to reboot.

Interestingly or coincidentally, since the recent security macOS updates Ubuntu 20 has been failing to wake from sleep a couple of times. Suspend and restart seemed to fix that. But maybe it was just signalling the pending failure.

 

Reply
0 Kudos
1 Solution

Accepted Solutions
wila
Immortal
Immortal
Jump to solution

Hi,

A host reboot should fix that, but a less dramatic way is to kill the vmware-vmx process that belongs to the VM still running in the background.
You can do so from Activity Monitor with the View settings set to "All Processes".

--
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

10 Replies
wila
Immortal
Immortal
Jump to solution

Hi,

A host reboot should fix that, but a less dramatic way is to kill the vmware-vmx process that belongs to the VM still running in the background.
You can do so from Activity Monitor with the View settings set to "All Processes".

--
Wil

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

A couple of observations.

Quitting VMWare Fusion and opening again never fixed the problem.

However, understanding that the VM runs within its own process explains why the running state remained persistent. Also explains why a reboot of the Mac Host OS reset the state too.

Good to know that you can kill the process via Activity Monitor or a terminal kill. The only thing to be aware of is if you have multiple VMs opened, they all have the same process name. The only way to disambiguate is knowing which order they were opened.

I also did try bringing back the VM from a recent Time Machine back up. That worked too but has the potential for data loss (but not needed since the kill approach worked in this case).

 

What is driving me totally nuts is this blank screen when Ubuntu 20 goes to sleep and you haven't brought the VM front most for a while. You cannot wake the VM by clicking or keystroke. You can only suspend and re-open again. Found a reference to updating grub config but that didn't work. New behaviour from the last couple of weeks - have been running this VM for a couple of years without this issue.

Reply
0 Kudos
wila
Immortal
Immortal
Jump to solution

Hi,

Don't use Time Machine to back up Virtual Machines... while it might work it is not considered safe for doing that.

See also my article here: https://www.vimalin.com/why-is-time-machine-not-a-good-backup-for-virtual-machines/

You can figure out what VM is matching the vmware-vmx process by looking at the command line of that process. I have a little script for that (even an app, but it does a lot more and is not finished enough for end-user consumption)

The script is basically a one liner:

$ cat vmware-show-pid.sh 
#!/bin/bash
ps x -o "pid command" | awk '{ match($0,"D 4");print $1 substr($0,RSTART+3,length($0)) }' | grep [v]mx

I don't have an answer for your sleeping screen beyond a suggestion to disable sleeping in the ubuntu VM.

--
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
duxed
Enthusiast
Enthusiast
Jump to solution

In another thread somebody suggested that turning off screen sleep on Ubuntu might fix the problem.

Just tried that and the answer is no (actually, partially things changed as I was typing this).

I'm running the VM as a test web server so can actually see when the whole VM stops delivering web pages. 

I've turned off Ubuntu sleep and let the Mac sleep. 

Wake the Mac.

Ubuntu screen is frozen. The user interface is not responsive at all, the screen is effectively a screen shot of a prior state.

However, the VM is still serving web requests.

So the VM hasn't totally stalled. 

It seems to be that the screen isn't being refreshed and events aren't being detected and sent.

 

Now as I was typing this which took several minutes, the screen did start to respond.

 

So there is some weird delay that takes several minutes to recover from - the screen doesn't update for several minutes.

Reply
0 Kudos
duxed
Enthusiast
Enthusiast
Jump to solution

The freeze is a little more interesting.

The GUI is frozen for several minutes, could even be 10s of minutes. Yesterday it eventually came back after waiting. The first time this morning it's taking a lot longer to become responsive - still waiting.

Cannot ssh into the VM. Cannot sftp upload to the VM.

However, It is still serving database driven web pages.

Reply
0 Kudos
wila
Immortal
Immortal
Jump to solution

Hi,

Not sure what is happening, but one thing I would check is if it is the suspend/resume scripts for vmware tools causing trouble. These are scripts in the guests and you can change behavior by going to settings -> advanced and then for the power options change "resume" and "suspend" to the "suspend (hard)" and "resume (hard)" variants. By selecting the "hard" alternatives it won't run those scripts anymore.

--
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
duxed
Enthusiast
Enthusiast
Jump to solution

Just changed the settings without restarting the VM.

Reduced sleep on the Mac to under 10 minutes.

But the machine has been time machine backing up, so my guess is that it didn't go to sleep.

Back up finished so selected sleep.

Checked the web server and it was stalling on web requests - so that looked like the VM was sleeping when the Mac was asked to sleep.

Woke the Mac, tried to activate the VM GUI and immediately the UI is frozen.

Web requests working.

In the 3 minutes of typing, it finally responded.

 

I'll try restarting the VM in case those settings are not initialised.

Reply
0 Kudos
duxed
Enthusiast
Enthusiast
Jump to solution

> change "resume" and "suspend" to the "suspend (hard)" and "resume (hard)" variants

This may have helped. Unless I've missed something in relation to a background process keeping the Mac semi awake, the Mac with Display sleep set to under 10 minutes and Prevent computer sleep not ticked (it's never been ticked in this scenario), I've not had to restart the VM and haven't seen a total UI freeze in the past 24 hours.

Seems that you do have to restart the VM after you have changed to the "hard" variants. 

 

 

Reply
0 Kudos
saifduaa96
Contributor
Contributor
Jump to solution

how to kill it ?

i can't find any option?

Reply
0 Kudos
wila
Immortal
Immortal
Jump to solution


@saifduaa96 wrote:

how to kill it ?

i can't find any option?


You go to the closet, look for the salt.. then take a tea spoon of salt and drop that on the left side of the keyboard.

You then shake the mouse up & down 3 times before you tilt the keyboard a bit so that the salt slowly drops in the keyboard. This will then take care of the VM. With a bit of luck it will never run again. Add water if that doesn't work.

 

Sorry my glass ball is broken so I have NO IDEA what your problem is, what product you are using (is it VMware Fusion?), what version it is, what OS you are on, what hardware you are using and what you have tried...
How about you start a little by telling what the exact problem is and what you have tried instead of kicking a year old thread to the top.

--
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