BAT-file to shutdown and start Hyper-V guests? (Full Version)

All Forums >> [Microsoft Virtualization] >> General



Message


sgatke -> BAT-file to shutdown and start Hyper-V guests? (23.Jun.2011 9:13:07 AM)

Hello all

I am looking for a simple BAT file to shutdown 2 Hyper-V virtual machines running on our Windows 2008 R2 w/Hyper-V server.

What I want is to create 2 scheduled tasks like this:
at 01.20 - shutdown SERVER1 and SERVER2
at 03.45 - start SERVER1 and SERVER2

I have found a complicated script from http://www.bunkerhollow.com/blogs/matt/archive/2008/09/24/hyper-v-vm-backup-script-batch-file.aspx but it is not really what I want.

Is it not possible to run a simple BAT-file to shutdown/start a virtual server on Hyper-V?

Thank you in advance.

/Simon




georgec -> RE: BAT-file to shutdown and start Hyper-V guests? (23.Jun.2011 11:10:59 AM)

I suggest that you use the script shown above as it is a clean solution, however, you can try to run a batch file from an admin VM that uses the remote shutdown command.




sgatke -> RE: BAT-file to shutdown and start Hyper-V guests? (24.Jun.2011 3:29:02 AM)

Thank you for your reply.
I will try that.




Scott Lowe -> RE: BAT-file to shutdown and start Hyper-V guests? (29.Jun.2011 11:13:38 PM)

Hi there! Were you able to resolve your problem based on the feedback here?




sgatke -> RE: BAT-file to shutdown and start Hyper-V guests? (28.Jul.2011 8:00:02 AM)

Sorry for the delay in answering.

Yes, I have solved my problem using the scripts I mentioned above. However, I modified them a little bit, because we run another backup solution.
Basically, I use the scripts to stop the virtual machines, and then to start them again after our backup has finished.




Scott Lowe -> RE: BAT-file to shutdown and start Hyper-V guests? (31.Jul.2011 2:28:13 PM)

Great news! I'm glad you were able to solve your issue.

Would you be willing to share your modified script back in the forums here? I'd love to see it.

Scott




Page: [1]