Pages: [1]
Print
Author Topic: Backup vmware guests in a cluster  (Read 2263 times)
deeztech
Newbie
*
Posts: 1


View Profile Email
« on: March 17, 2010, 06:01:12 AM »

Hello,

I have a 3-node vmware ESX 4.0 cluster with DRS enabled. I'm trying to setup backup scripts for certain guests in the cluster where I can suspend, backup and start those guests when the backup is finished. But, since DRS is enabled, the guests can be on any one of the cluster nodes at any given time depending on load. So, it's almost impossible to know where a guest is so I can suspend it, much less back it up. I'm looking to find a way to maybe query the cluster for the location of each vmware guest that needs backup, and then suspend the guest, perform the backup and then start the guest.

I would appreciate any help on this.

Thanks
Logged
ewannema
Administrator
Newbie
*****
Posts: 33


View Profile WWW
« Reply #1 on: March 17, 2010, 12:22:42 PM »

Hello,

What are you using for the backup process?  If you are using something like VCB or VDR you just point it at the vCenter server and it takes care of the rest.

Perhaps if you can detail more of the backup process it would be easier to frame a more complete solution, but here are some thoughts:

If you are using PowerShell it is easy enough to do something like the following:
Code:
Connect-ViServer <virtualcenter>

# Find and suspend the VM
$vm = Get-VM <vm name>
$vm = $vm | Suspend-VM -confirm:$false

# The host on which the VM is registered can be found via
$vmhost = $vm.host
$vmhostName = $vmhost.Name

# Do something with your own code.

# Start the VM back up
$vm | Start-VM
Logged
Pages: [1]
Print
Jump to: