Wednesday, September 17, 2008

VCB basic usage - VM idetification with vcbVmName

Before we begin the backup process of selected virtual machine, we need to identify it so that VCB can contact VirtualCenter server and start the backup session. This step is simple and requires to run the vcbvmname command. The VirtualCenter server contacts particular ESX hosts and send a list of hosted virtual machines back. Follows the example of command usage:
vcbVmName.exe -h VC_IP -u VC_USER -p VC_PASS -s any:
The most of used command line options are almost common for all VCB commands:
  • -h - hostname or IP address of VirtualCenter server
  • -u - VirtualCenter user who is allowed to do virtual machine backup (at least user with VMware Consolidated Backup User role)
  • -p - VirtualCenter user password
The -s option is more specific and defines virtual machine identifier prefixed with a search pattern. The any: pattern means search for any available virtual machine. This identifier is used by other commands for virtual machine identification as well. It is possible to identify it by IP address, name and so on. What does the above command produce?
Found VM:
moref:vm-99
name:vcb-backup
uuid:5022bd2a-0de0-9c82-e30e-063c976a8a29
ipaddr:132.100.0.29
Found VM:
moref:vm-97
name:vcb-test
uuid:5022ab4a-f7f4-03a2-1434-f2af63938718
ipaddr:132.100.0.28
Here, you can see all virtual machine identifiers - name (name:), IP address (ipaddr:), virtual machine unique identifier (uuid:) and managed object reference (moref:). You can use them as search pattern instead of any: universal pattern. For example, the next command will find the virtual machine with name vcb-test only:
vcbVmName.exe -h VC_IP -u VC_USER -p VC_PASS -s name:vcb-test
Now, we know how to identify the particular machine and next time, we are going to backup it.

No comments: