V7 - Scripting SCVMM maintenance mode as part of the job?

Hyper-V specific discussions

V7 - Scripting SCVMM maintenance mode as part of the job?

Veeam Logoby vbr4pppsgv » Mon Jun 06, 2016 6:23 pm

Hi All,
I have a job that backs up a Hyper-V cluster. It currently has 3 hosts . We just added the 3rd host recently, however I only have licenses for 2 hosts until I can make the purchase in 2 months. I've been manually putting one of the hosts into maintenance mode so that the guests would move to the 2 licensed hosts, but this is a chore. I've looked into setting up Task Scheduler jobs on the 3rd host to disable and eventually re-enable the host, but my backup windows are a bit flexible and I was hoping there was a way to run the scripts as part of the job itself.
I see where I can run a post-job command. I'm guessing a powershell script could be created but I'm not a powershell expert. Also, there isn't an option to run a pre-job command. The backup job is scheduled to run after another job, so I'm guessing I could add a post-job command to that job. Seems kind of messy though. Any ideas?
Thanks in advance.
vbr4pppsgv
Influencer
 
Posts: 10
Liked: 1 time
Joined: Thu Sep 26, 2013 9:00 pm
Full Name: PPPSGV IT Admin

Re: V7 - Scripting SCVMM maintenance mode as part of the job

Veeam Logoby v.Eremin » Mon Jun 06, 2016 6:34 pm

Haven't thought about updating at least to version 8 that has pre-job activity option and Disable-SCVMHost inside this command? As far as I'm concerned, Disable-SCVMHost should put a given host into maintenance mode.

By the way, I'm wondering what's the reason of running an old software version that is no longer supported.

Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: V7 - Scripting SCVMM maintenance mode as part of the job

Veeam Logoby vbr4pppsgv » Mon Jun 06, 2016 6:43 pm

v.Eremin wrote:Haven't thought about updating at least to version 8 that has pre-job activity option and Disable-SCVMHost inside this command? As far as I'm concerned, Disable-SCVMHost should put a given host into maintenance mode.

That's what I figured. May have to consider upgrading sooner than planned. Thanks.

v.Eremin wrote:By the way, I'm wondering what's the reason of running an old software version that is no longer supported.

Cause it ain't broke. It is on my to-do list this year though.
vbr4pppsgv
Influencer
 
Posts: 10
Liked: 1 time
Joined: Thu Sep 26, 2013 9:00 pm
Full Name: PPPSGV IT Admin

Re: V7 - Scripting SCVMM maintenance mode as part of the job

Veeam Logoby v.Eremin » Mon Jun 06, 2016 6:59 pm

If you still want to stay on version 7, the best option you have is to run both pre-job activity and backup job itself within the same script. Say, the first portion of the script connects to SCVMM, gets required host and puts it into maintenance mode, while second part executes the backup job (Start-VBRJob -name "Name of your Job"). Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin


Return to Microsoft Hyper-V



Who is online

Users browsing this forum: No registered users and 13 guests