VMware Cloud Community
jjamieson
Enthusiast
Enthusiast

VCB - List all VM's in a resource group?

Being fed-up with the built-in scripts for VCB's Backup Exec "integration" module, I am creating my own set of scripts (using good old WinBatch) that will be more functional, allow lists of VM's to be backed up, and provide better logging (to the event log.)

I just need full image backups. The Backup Exec module simply exports the VM to a local folder. If the pre-backup script fails, the folder is not created, and thus the Backup Exec job will fail. It's really not more integrated then that.

So far I've had some luck with this, but I have a question:

Is it possible, with the tools provided (vcbExport.exe, vcbMounter.exe, vcbSnapshot.exe, and vcbName.exe) to list all virtual machines that exist in a specified resource group or perhaps virtual center folder? I'd like to be able to back up VM's without having to create pre-defined lists to read from.

Any help would be appreciated.

Reply
0 Kudos
2 Replies
paulsgagnon
Contributor
Contributor

Hello,

I was just wondering if you had any luck with obtaining a command to retreive the list of vm(s) within a group; (folder in vcenter or resource pool) ?

I want to do something similar to backup my vm's.

Thanks,

Paul

Reply
0 Kudos
lamw
Community Manager
Community Manager

You'll want to look at using either vSphere SDK for Perl or PowerCLI to retrieve VM(s) from a given vCenter folder or resource group or any other logical container, also some of this information is only available via vCenter.

Here is a script that shows how this can be accomplished: , you can modify it to fit your needs.

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Comuunity

Twitter: @lamw

If you find this information useful, please award points for "correct" or "helpful".

Reply
0 Kudos