Comprehensive data protection for all workloads
Post Reply
jtek
Novice
Posts: 9
Liked: 1 time
Joined: Oct 02, 2015 5:15 pm
Full Name: Joey Costa
Contact:

Enable DRS Rule before backup

Post by jtek »

I have a setup with three hosts in a DRS Group cluster with auto balancing enabled.

I also only have a two hosts licenses for Veeam. I setup a rule and put the two hosts that I have a license for in that rule that all machines must be running on only those two hosts. When I enable that rule it instantly migrates all machines on the third host to the other two hosts and then the backup can run.

I want to enable the drs rule right before Veeam does the backup and then disable the rule after the backup so it will re-balance the machines again for the next day. Anybody have an idea how to accomplish this?

Thanks, J
dellock6
Veeam Software
Posts: 6137
Liked: 1928 times
Joined: Jul 26, 2009 3:39 pm
Full Name: Luca Dell'Oca
Location: Varese, Italy
Contact:

Re: Enable DRS Rule before backup

Post by dellock6 »

Hi,
your best chance is to create a powershell script that invokes "Set-DrsRule" via VMware powercli (https://www.vmware.com/support/develope ... sRule.html) and set this script as a pre-job script in Veeam job. The same job with the -Enabled $False will be the post-job script.

Luca
Luca Dell'Oca
Principal EMEA Cloud Architect @ Veeam Software

@dellock6
https://www.virtualtothecore.com/
vExpert 2011 -> 2022
Veeam VMCE #1
jtek
Novice
Posts: 9
Liked: 1 time
Joined: Oct 02, 2015 5:15 pm
Full Name: Joey Costa
Contact:

Re: Enable DRS Rule before backup

Post by jtek »

Thanks Luca, I was thinking of that but do you think I would have to put some kind of loop in the script to check for active machines on the third host so it would wait to run the backup until all machines are migrated?

I don't want the backup to run until all the machines moved over off the third host.
dellock6
Veeam Software
Posts: 6137
Liked: 1928 times
Joined: Jul 26, 2009 3:39 pm
Full Name: Luca Dell'Oca
Location: Varese, Italy
Contact:

Re: Enable DRS Rule before backup

Post by dellock6 »

I've never done such a script, as if anything happens to one of the nodes and VMs are failed over to the third node, they cannot be protected, or if there's a "must" rule, HA will not migrate them, so you will have a downtime.
I'm biased as I work at Veeam, and you may have your reasons to do so, but I'd honestly make it more simple and secure, and add a third license for Veeam and use the cluster at its full potential.

Luca
Luca Dell'Oca
Principal EMEA Cloud Architect @ Veeam Software

@dellock6
https://www.virtualtothecore.com/
vExpert 2011 -> 2022
Veeam VMCE #1
jtek
Novice
Posts: 9
Liked: 1 time
Joined: Oct 02, 2015 5:15 pm
Full Name: Joey Costa
Contact:

Re: Enable DRS Rule before backup

Post by jtek »

Yea, I agree that would be the best route. I am actually a partner and this is for my test environment using our NFR licenses so it isn't critical if we have some downtime.

We have a bunch of virtual desktops and some servers. I usually move the virtual desktops over to the third host via DRS and if it failed I don't really care but would be nice to have a backup of them every now and then.

The DRS rule I want to enable is ALL VMS must run on the two main licensed hosts. Then I can back them up and disable that rule and then they will migrate back to the third host ready for testing and playing around the next day. Then if something happens we have a backup of them and can restore if need be.
Post Reply

Who is online

Users browsing this forum: No registered users and 224 guests