VMware Communities
Bluetickle20111
Contributor
Contributor
Jump to solution

Shared VM behavior on host system shutdown

Shared VM behavior on host system shutdown

Greetings,

I have WS8 installed to WIn7-64bit host system, and it seems to be a very nice, high quality setup. I am very happy.

There is one shared VM and it is a 64bit Ubuntu Server 10.04 installation running as a basic LAMP configuration for some basic web apps, etc.

I have been unable to find the setting to control the shared VM's behavior when the hosting system is shutdown. When I shutdown the host system, I believe the shared VM is powered off or shutdown gracefully, I'm not sure which. What I would prefer is for the shared VM to be suspended instead. The reason for this is that the startup of the VM is a little bit complicated and requires manual interaction. Whereas if it is resumed from a suspended state then no manual interaction is required.

I have found that if there is a power loss, that I can hibernate the host system in time before my UPS battery runs out. Resuming the host system from hibernate works correctly and the shared VM within WS8 is back to its prior functional state.

It would be nice and helpful to be able to shutdown or restart the host system and know that the shared VM was automatically suspended. To accomplish this now I have to log into the host system's user account and open WS8 and manually suspend the VM before shutting down or restarting the host system.

Does there exist a method for having the shared VM automatically suspended when the host system is shutdown?

Thanks for your time and attention.

0 Kudos
1 Solution

Accepted Solutions
admin
Immortal
Immortal
Jump to solution

You can configure the stop action by editing the following file:

%ProgramData%\VMware\hostd\vmAutoStart.xml

If you want to configure the stop action for all VMs, find the <stopAction> section under the <SystemDefaults> section. Change it to Suspend

If you want to modify the stop action for only this one VM, you should first configure this shared VM to be autostarted (in WS, right-click on the "Shared VMs" item in the library, select "Manage AutoStart VMs"). After doing this, manually edit vmAutoStart.xml. Find the entry for the VM in <AutoStartOrder> section (if you have more than one VM configured for autostart, it will take some more digging to figure out which VM you want to modify). Modify the <stopAction> entry for this VM to Suspend.

Save the file. Restart the host (not autostart power on/off actions are only done when the host restarts). Now when you shutdown the host, WS should suspend the VM(s)

As always, manually editing configuration files is not considered supported usage. Backup the file before modifying it. Tweak at your own risk.

View solution in original post

0 Kudos
4 Replies
admin
Immortal
Immortal
Jump to solution

You can configure the stop action by editing the following file:

%ProgramData%\VMware\hostd\vmAutoStart.xml

If you want to configure the stop action for all VMs, find the <stopAction> section under the <SystemDefaults> section. Change it to Suspend

If you want to modify the stop action for only this one VM, you should first configure this shared VM to be autostarted (in WS, right-click on the "Shared VMs" item in the library, select "Manage AutoStart VMs"). After doing this, manually edit vmAutoStart.xml. Find the entry for the VM in <AutoStartOrder> section (if you have more than one VM configured for autostart, it will take some more digging to figure out which VM you want to modify). Modify the <stopAction> entry for this VM to Suspend.

Save the file. Restart the host (not autostart power on/off actions are only done when the host restarts). Now when you shutdown the host, WS should suspend the VM(s)

As always, manually editing configuration files is not considered supported usage. Backup the file before modifying it. Tweak at your own risk.

0 Kudos
Bluetickle20111
Contributor
Contributor
Jump to solution

Thanks! That worked great!

The first time it didn't work. I think WS8 needed to be restarted for the config file changes to get implemented.

I changed both the specfic VM and for all VMs.... I did not test if only either/or would work...

<stopAction>Suspend</stopAction>

cheers!

0 Kudos
friendofvm
Contributor
Contributor
Jump to solution

Dear expert,

many thanks for your very useful instructions to manage a well-defined behavior of shared VMs along with host system shutdown. What I really don't understand is why VMware’s product documentation doesn’t tell us anything about that behavior (regardless of a possible support of direct configuration file editing). WS 8 docs do only instruct users for AutoStart of shared VMs with host startup. But I'm sure, even VMware knows that host systems are not only booted but will be shut down, from time to time!? Do you know the reason of that strange documentation hole?

Up to now, I didn’t have the opportunity to work with WS 8. That’s why I’m still being interested in WS 7 knowledge. With WS 7, you can start a VM in background by

vmrun -T ws start myvm.vmx nogui

But, again, VMware says nothing about the behavior of VMs started that way when the user logs off or shuts down the host system. Do you know what exactly happens with VMs, on a Windows host, in that case?

Is there a way to ask VMware to complete the docs?

Sincerely yours,

friendofvm, anyway

0 Kudos
continuum
Immortal
Immortal
Jump to solution

> Do you know what exactly happens with VMs, on a Windows host, in that case?

yep - they will be killed and may not survive the reboot.


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

0 Kudos