0
votes

I've been working on a big project with multiple virtual machines running simultaneously.

However, I put the virtual machine base images (machine.vdi) all on the desktop and now want to move them to a folder.

I looked at the VirtualBox conf (say, machine.vbox) and see this under HardDisks:

  <HardDisks>
    <HardDisk uuid="{efab7241-6d7e-471c-9129-c5e4b0a43c99}" location="/home/ids/snort.vdi" format="VDI" type="Normal">
      <HardDisk uuid="{18d62b60-8006-496a-b27e-2e4ee28d4551}" location="Snapshots/{18d62b60-8006-496a-b27e-2e4ee28d4551}.vdi" format="VDI"/>
    </HardDisk>
  </HardDisks>

I just want to change the location of the base snapshot.

Is there a VirtualBox command that deals specifically with that?

2

2 Answers

1
votes

In the virtualbox GUI under File > Preferences > General there is a setting called Default Machine Folder:

Which allows you to choose where those HardDisk Images are saved as default during the import process.

You can also use the vboxmanage import command to set the location of those images as well....

VBoxManage.exe import  (Vbox_Image_Location)
--vsys 0 --vmname (VMName) --unit 11 --disk C:\VMDisks\VMName-disk1.vmdk
--unit 12 --disk C:\VMDisks\VMName-disk2.vmdk

Default Snapshot locations can be found in the GUI as well. (However you cannot change the snapshot folder location if you currently have a snapshot saved.)

To set Default Snapshot locations select the VM you want and choose Settings > General > Advanced > Snapshot Folder:

This can also be set though the Vboxmanage....

VBoxManage.exe modifyvm (VMName) --snapshotfolder "C:\MySnapshotFolder"
0
votes

The default folder where snapshots are being stored is the machine folder. On the command line you can change the "machine folder" using the following command:

    VBoxManage setproperty machinefolder <folder to be used for snapshots>