I run a Windows XP VM on an Ubuntu host machine version 14.04. I cloned 5 times the main VM. I am running a special software on the first VM. The software will damage the VM one day or an other. So That is why I automatically start one of the remaining 4 VM.
As the remaining VMs will be harmed by time, I wonder how could I generate a bash script on the host machine that will allow me to automatically clone a safe VM ?
Asked
Active
Viewed 4,436 times
3
1 Answers
4
To just clone the VM vm1 (where vm1 is the name of the VM) to vm2, something like this will do:
vboxmanage clonevm vm1 --name vm2
For more information, run vboxmanage --help - clonevm can take varying options:
clonevm <uuid|vmname>
[--snapshot <uuid>|<name>]
[--mode machine|machineandchildren|all]
[--options link|keepallmacs|keepnatmacs|
keepdisknames]
[--name <name>]
[--groups <group>, ...]
[--basefolder <basefolder>]
[--uuid <uuid>]
[--register]
This could be done automatically in a script (e.g. checking mod/access times, assigned name based on date, gvfs variable, etc)
Wilf
- 30,732