Cloning VM with VBoxManage command - files OK, but no new VM

7,486

Use --register option in the clonevm command. That registers VM in VirtualBox XML file. With --basefolder option you can select the folder where the new virtual machine configuration should be saved in. And you can make a scheduled task in Windows host to clone VM automatically.

See more:: Clone VM with GUI

Clone VM with Command

Share:
7,486

Related videos on Youtube

user1011212
Author by

user1011212

Updated on September 18, 2022

Comments

  • user1011212
    user1011212 over 1 year

    My goal is to automate VM backup tasks. I recently discovered the use of on line command Vboxmanage and got some nice results.

    However I'm puzzled with the command:

    VBoxManage  clonevm "name of the vm"
    

    It works just fine creating a new folder with a VDI copy, but not a new VM by itself.

    There's no new VM in the GUI and

    VBoxManage list vms
    

    does not list more VMs than before. Also, the .Virtualbox/VirtualBox.xml remains untouched.

    My final goal is a script that will:

    1. Stop a running VM,
    2. Clone it fully,
    3. Copy it to another media (external USB drive), and
    4. Restart the initial VM

    I'd like the process to do it again each night and delete the older VM on maybe a 3 day cycle.