I am trying to use the Vsphere scheduled clones to backup vms. The problem is that after 1 successful run, the clone fails because the target machine already exists.
So first of all, did I miss something and there is a way to tell the scheduler to number or date-postifx the target vms, or something like that?
Secondly, assuming the above is not possible, I need some help with the workaround that I am trying to implement, which is simply to use a script on the NFS server that I clone the machines on, to copy or move he vm's directory and then tell the Esxi host to delete the machine, by executing the vim-cmd destroy command via ssh. The problem is , that when I do that, the vm is not removed in the Vcenter , but appears as orphaned. I guess this is because I run the destroy command directly to the vmhost and not via the vcenter, but I can't find my arms and legs in the vcenter cli.
So if someone could be so kind and share some reasonable way to solve this problem, I'd appreciate it. I'm sure I am not the only one who encountered it, I mean, you all do backups, right?
Many thanks in advance,
You could also use the option customize using the customization wizard on the individual clone jobs and use step 4 above to make the clone unique.
@timweaver23, thank you, but doesn't this option just change the hostname in the guest OS? What I would like to do, is to change the name it appears by to the VMware host/vcenter
Do you want to save the file with same name?If yes it is not possible to register in the inventory with same name,Alternatively you can create a VM lets say VM20112016 and next day as VM21112016 for clone.If prefer to go automation using powercli,make sure that you have enough space in the datastore.