ERROR: failed to locate and extract VM_ID

Written by employee #33. Posted in just going through the motions

ghettoVCB is a little sensitive about vm names and editors. Special danish caracteres is absolutely a no-go in ghettoVCB - but you wouldn't do that anyway. Spaces and brackets is also an issue. Basically you should be using basic all-americans 8 characters names to be on the safe side. But if you do keep getting the "ERROR: failed to locate and extract VM_ID for" it is not necessary your names which is the problem. It could be a issue with the difference between linux and windows text editors instead. I’m not absolutely sure what the difference actually is, but the problem arise with line breaks. If you can do the following, it’s not a problem with the name, but a problem with your editor and you will need the dreaded vi editor. VMware ESXi includes the open source terminal-based editors nano and vi.

If you get a lot of "ERROR: failed to locate and extract VM_ID for" errors and you use the f option in your ghettoVCB script, it is properly time for the horrible vi editor. And it is really horrible. First test your f option machine list: Simply remove all but one vm from the list and do a dryrun. Still failing to extract VM_ID for this vm? If no - delete the entry and replace it with a different vm and so on.

Test list (the vms_to_backup list)vm01vm02

Typically you get a extract error for the first item on the list (vm01). Try removing vm02 from the list, and run the script with the dryrun option again. If this is okay, then try to remove vm01 and replace it with vm2. Run the script again. If also okay, you probably have some editor issues with the vms_to_backup text file.

There is some very good vi resources out there and you should definitely take a look before trying to edit anything with vi. The vi editor is really strange, so don’t underestimate it and please don’t start out by editing the actual script with this vi nonsense.

This might help you getting throug to vi: http://www.cs.colostate.edu/helpdocs/vi.html or http://linux.die.net/man/1/vi