VMware Communities
Horinius
Enthusiast
Enthusiast

Wish: Stop or suspend VM by default when VMWare workstation is stopped

I planned to leave my VMWare workstation running overnight as well as the VM. But the stupid Microsoft Update, for an unknown reason, turned up to restart the computer WITHOUT asking me. Thus the VM was broken down and can't be used!

It would be nice if VMWare workstation could stop the system within VM or suspend the VM to reduce damage.

0 Kudos
15 Replies
KevinG
Immortal
Immortal

What exact version of VMware Workstation are you using?

0 Kudos
Liz
Virtuoso
Virtuoso

Ive not had a power off kill a VM, its needed to check its disks and stuff, but not kill the vm guest..

What error are you getting?

0 Kudos
continuum
Immortal
Immortal

Can't you tell ms-update NOT to reboot automatically ?


________________________________________________
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
Horinius
Enthusiast
Enthusiast

What exact version of VMware Workstation are you using?

I'm using VMWare Workstation 5.5.4

Can't you tell ms-update NOT to reboot automatically ?

Ahem, you certainly didn't read what I wrote.

For unknown reason, MS Update is changed to apply updates and reboot at 3am while I was certain that I had it set to ONLY download updates. Actually, this isn't an isolated case. Some of my colleagues had also complained that their computers got restarted due to updates while it's certain that MS Update wasn't configured to reboot.

Ive not had a power off kill a VM, its needed to check its disks and stuff, but not kill the vm guest..

What error are you getting?

Well, you've not had any problem, that's probably because there was no disk activity when your VM was killed/shutdown by force.

Well, I was exagerating when I said the VM was broken down. It's the data which got corrupted. Try to write something to the (virtual) disk and force to power down the VM, and tell me if you still get nothing wrong. I really don't care if guest system is broken down or not, since I still have the VM "image" files. What counts for me is the data.

But in other situations I DID have snapshot problem after an abnormal shutdown. In those situations, I was able to figure out how to edit some files and delete some other snapshot files (at the price of losing important data in the last snap-shot!).

Anyway, whether it's due to stupid updates/reboot of host system or not, it's still nice to make WMWare Workstation shutdown/suspend guest systems. FYI, this is possible in VMWare Server, but not in Workstation.

EVERY computer in my company is attached to an UPS. So during power failure, every computer has about 15 minutes to shutdown properly every running program and itself (in particular, VMWare Workstation). But what to do when there's nobody during power failure, eg in the middle of a storm night? Nothing, absolutely nothing. And you've got a "broken" VM (ie corrupted data)!!

0 Kudos
RDPetruska
Leadership
Leadership

Well, what exactly are you using Workstation to DO, that you are leaving your guests running overnight anyway? If you have VMs that you run as back-end services like that, wouldn't VMware Server be a better solution for you?

0 Kudos
Horinius
Enthusiast
Enthusiast

Well, what it is doing isn't relevant, dependent or in direct relationship to the topic of this thread, so I'm not going to answer it.

In my company, even real PC are left switched on overnight for all sorts of reason that I don't want to specify either.

What is relevant is that the VM needs to be running.

I don't use VMWare Server for the very simple reason that I'm using Windows XP Pro while VMWare Server isn't supposed to run on this host system.

On the other hand, we're using paid version of VMWare Workstation, so I'd just expect it to work better than the free VMWare Server.

0 Kudos
RDPetruska
Leadership
Leadership

>On the other hand, we're using paid version of VMWare Workstation, so I'd just expect it to work better than the free VMWare Server.

Better/worse isn't the issue. Different designs, and therefore different feature sets IS. VMware Server is designed primarily to run back-end server guests, and has built-in the ability to startup/shutdown guests with the host OS, running them as services, etc. While Workstation is designed primarily for user-interactive guests. When you're done for the day, take 10 seconds and click that pause button to suspend the VMs, and you'll never have this issue. Smiley Happy

0 Kudos
Horinius
Enthusiast
Enthusiast

I said, the VM needs to be running overnight. Don't you understand?

0 Kudos
Horinius
Enthusiast
Enthusiast

Much like a real system in which we can install UPS software to trigger shutdown in case of power failure, is it possible to have this kind of software to install into guest system? And then VMWare Workstation just needs to send the "power failure" or whatever signal to guest system to shut it down properly.

0 Kudos
rsa911
Virtuoso
Virtuoso

>we can install UPS software ...

sure get something like APC Powerchute network edition and install agents in your vms , exactly like you would do for a physical machine

vmware w/s won't play any role, the guest will shutdown itself and the vm will be stopped automatically

that will help you for power outages but not for Ms updates !

why not disable the automatic updates services in windows and only start it when you are sure you want to perform updates ?

and yes, as RD mentionned it, vmware server is probably more appropriate for your usage..

Message was edited by:

rsa911

0 Kudos
rbromfield
Enthusiast
Enthusiast

Well instead of getting mad at the people here you should realize that it is a feature of Windows now to restart after a set period of no user interaction. It is not VMware's fault. Turn off automatic updates.

0 Kudos
Slvrknght
Contributor
Contributor

There are also ways of setting up a .adm file in gpedit.msc that can help as well. It's how the computers where I work set the Automatic update setup. If you're running Windows Server, and have WSUS, then it should be easy to grab a wuau.adm file.

I've just set my XP VM machine to connect to our domain, and set the group policies without any trouble.

Message was edited by:

Slvrknght

0 Kudos
Liz
Virtuoso
Virtuoso

FYI yes I have had it writing to disk, yes, Ive had it munge whatever was writing to the portion of the disk at the time, so corrupted databases etc, but, thats no different to a host having the power yanked..

OK, so on to practical answers.

Things you could look into

I dont have wks5 to hand but, looking at whats with wks6..

Log off scripts, so when it logs off you can run a batch file that works out the running vms, powers them off. vmrun has a number of options which allow you to automate those kinds of things.

If you got a copy of gawk.... you could:

vmrun list | gawk "{ if ( substr($1,1,5) != \"Total\" ) { printf \"vmrun -u username -p password stop
\"\"; printf $0; printf \"
\" soft\"; }}" > c:\runme.cmd

call c:\runme.cmd

Which would find all the vms running and close them

0 Kudos
kingneutron
Expert
Expert

Much like a real system in which we can install UPS software to trigger shutdown in case of power failure, is it possible to have this kind of software to install into guest system?

--Yep. I put together a dedicated Win2kpro VM attached to the 9-pin serial port for just this purpose.

--CyberPower 425VA UPS

--All I need is a KLMALL script to pass to the Host when that Guest gets its UPS-shutdown orders... Can anyone help there?

BEGIN win2kpro-ups.vmx

#!/usr/local/bin/vmware

config.version = "8"

virtualHW.version = "4"

scsi0.present = "TRUE"

memsize = "72"

MemAllowAutoScaleDown = "FALSE"

ide0:0.present = "TRUE"

ide0:0.fileName = "PowerMonitor-Util-Win2k-IDE0:0.vmdk"

ide0:0.writeThrough = "TRUE"

ide1:0.present = "TRUE"

ide1:0.fileName = "auto detect"

ide1:0.deviceType = "cdrom-raw"

floppy0.startConnected = "FALSE"

floppy0.fileName = "Auto detect"

ethernet0.present = "TRUE"

ethernet0.connectionType = "nat"

usb.present = "FALSE"

sound.present = "TRUE"

sound.virtualDev = "es1371"

displayName = "PowerMonitor-Util-Win2k"

guestOS = "win2000pro"

nvram = "PowerMonitor-Util-Win2k.nvram"

ide1:0.autodetect = "TRUE"

ide1:0.startConnected = "FALSE"

floppy0.autodetect = "TRUE"

sound.fileName = "-1"

sound.autodetect = "TRUE"

annotation = "2007.0806 + Created dedicated Win2kpro util VM for UPS monitoring over 9-pin serial port.|0A|0A+ Installed Tools 5.5.4|0A|0A+ /sos|0A|0A- removed outlook express|0A|0A+ Installed DST patch unoff|0A+ Installed no-ip|0A+ Installed UPS softwr|0A|0A2007.0808 + Upgraded Powerpanel to latest ver from website.|0A|0Ahttp://www.cyberpowersystems.com/products/all/ups/browse-by-category/sl-series/CPS425SL.html?selectedTabId=downloads&imageI=|23tab-box|0A|0A+ Upgraded to IE6.|0A|0A"

serial0.present = "TRUE"

serial0.yieldOnMsrRead = "TRUE"

serial0.fileName = "/dev/ttyS0"

ide0:0.redo = ""

ethernet0.addressType = "generated"

ethernet0.generatedAddressOffset = "0"

tools.syncTime = "TRUE"

checkpoint.vmState = "PowerMonitor-Util-Win2k.vmss"

priority.grabbed = "normal"

priority.ungrabbed = "normal"

uuid.action = "keep"

autostart = "poweron"

./. If you have appreciated my response, please remember to apply Helpful/Correct points. TIA
0 Kudos
KevinG
Immortal
Immortal

autostart = "poweron"

Must have been a VM you created with VMware Server since the above .vmx option would be ignored in WS

0 Kudos