• RSS
  • Twitter
  • FaceBook

Virtualization Forums

Forums | Register | Login | My Profile | Inbox | RSS RSS icon | My Subscription | My Forums | Address Book | Member List | Search | FAQ | Ticket List | Log Out

BAT-file to shutdown and start Hyper-V guests?

Users viewing this topic: none

Logged in as: Guest
  Printable Version
All Forums >> [Microsoft Virtualization] >> General >> BAT-file to shutdown and start Hyper-V guests? Page: [1]
Login
Message << Older Topic   Newer Topic >>
BAT-file to shutdown and start Hyper-V guests? - 23.Jun.2011 9:13:07 AM   
sgatke

 

Posts: 11
Joined: 1.Jun.2011
Status: offline
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

< Message edited by sgatke -- 23.Jun.2011 9:21:16 AM >
Post #: 1
RE: BAT-file to shutdown and start Hyper-V guests? - 23.Jun.2011 11:10:59 AM   
georgec

 

Posts: 28
Joined: 16.Nov.2010
Status: offline
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.

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

 

Posts: 11
Joined: 1.Jun.2011
Status: offline
Thank you for your reply.
I will try that.

(in reply to georgec)
Post #: 3
RE: BAT-file to shutdown and start Hyper-V guests? - 29.Jun.2011 11:13:38 PM   
Scott Lowe

 

Posts: 444
Joined: 13.May2010
Status: offline
Hi there! Were you able to resolve your problem based on the feedback here?

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

 

Posts: 11
Joined: 1.Jun.2011
Status: offline
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.

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

 

Posts: 444
Joined: 13.May2010
Status: offline
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

(in reply to sgatke)
Post #: 6

Page:   [1] << Older Topic    Newer Topic >>
All Forums >> [Microsoft Virtualization] >> General >> BAT-file to shutdown and start Hyper-V guests? Page: [1]
Jump to:

New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts



Receive all the latest articles by email!

Receive Real-Time & Monthly VirtualizationAdmin.com article updates in your mailbox. Enter your email below!

Become a VirtualizationAdmin.com member!

Discuss all your Virtualization issues with thousands of other experts. Click here to join!