Link to home
Create AccountLog in
Avatar of inverted_2000
inverted_2000Flag for United States of America

asked on

Microsoft Virtual Machine Server 2005 - Should I Turn off Vm or Shut Down on DCs?

Hey everyone,

We know that we're supposed to set VM DCs to NOT "Save State" because of various reasons...but is it better to:
1) Turn off the VM
or
2) Shut down the guest OS?

We are looking at this and wondering...for example...if the Host server dumps and reboots...would option 1 be better the option 2?

Would the VM's come backup after the Vitrual Server service starts again?

Thanks (o:
inverted
Avatar of mmilic
mmilic

Hi there,

First of all... there is a huge difference between turning off a VM and shutting down the guest OS.

Shutting down the guest OS via API does not always guarantee that the VM will actually be shutdown, because if there is a session opened (active or disconnected) it will prompt with a "A user appears to be connected, etc etc, do you really want to proceed?" inside the VM. So... it "hangs" like that pending manual action.

On the other hand, turning off a VM would be very similar to directly cutting power to your PC. I'm sure you don't like to do that. :)

To have VMs start automatically, you need to have the VM running under a particular account. Go to Server properties -> Virtual server security and add a user the VM will run on. You need to make sure it has Modify, View, Control permissions.

API has an object called AutoStartAtLaunch, it can have 1 or 2 as a value. 2 is "yes". So... in your case, script would be similar to:

Set objVirtualServer = CreateObject("VirtualServer.Application")
Set objVirtualMachine = objVirtualServer.FindVirtualMachine(VM)

objVirtualMachine.RunAsDefinedAccount = True
result = objVirtualMachine.SetAccountNameAndPassword("your_vm_user","your_password")
objVirtualMachine.AutoStartAtLaunch = 2

It will start just fine, automatically, should the server crash.

Hope that helps!
Avatar of inverted_2000

ASKER

Thanks mmilic,

That's what I'm looking to sort out.

I'm concerned about the server dumping and rebooting...where I would the VM to be marked to "Turn Off."

My co-worker want it to be "shut down" in case an admin for another "Sister" company of something reboots the server and all of the VM's are turned off.
If that happened...what would happen to the state of the VMs?
also,
Which option of the 2 would be better in that situation?

Thanks a bunch,
inverted
where I would WANT the VM to be marked to "Turn Off."
In case you would gracefully shutdown a physical server (host node), VMs would not crash - they would go into Save state and when the server comes back up, they should resume just fine. I would recommend that you Save the VMs before the system reboot manually.

The only scenario you do not want to see is physical server randomly crashing. In that case, VMs would crash too - which is logical.
Correct...

These have Domain Controllers on them...so I don't want the "Save State" used ever.

If the Host server is to crash...would it be better to have the guests in "Shut Down" or "Turn Off" configurations?

I think I might have answered this with my own question here.

If the Host crashes...the VM's are going to "Turn Off" anyway...so what's the point of having the the VMs set to "Turn Off".

If the server is correctly shutdown, or rebooted, at least by having the VMs set to "Shutdown" we'll have a graceful experience.

Do you agree.

Thanks,
inverted
ASKER CERTIFIED SOLUTION
Avatar of mmilic
mmilic

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account