VirtualBox

Opened 7 years ago

Last modified 7 years ago

#16989 new enhancement

Snapshots should store differencing disks alongside parent virtual disks

Reported by: Jessica Hamilton Owned by:
Component: virtual disk Version: VirtualBox 5.1.26
Keywords: Cc:
Guest type: other Host type: Windows

Description

With a VM with the VDI stored on volume J:\, after creating a snapshot, the differencing VDI is stored under C:\%USERNAME%\VirtualBox VMs\.

The VDI was stored on another volume due to space issues on C:, and the differencing disk ended up using up all space on C: when it should have been on J:

Change History (3)

comment:1 by Socratis, 7 years ago

This is NOT a bug, this is a misunderstanding in your part. Have a look at the VM settings » General » Advanced » Snapshot Folder.

You move the VDI after the VM was created and the defaults registered, right? Because if you had originally set the default VM path to J:\ (VirtualBox preferences » General » Default Machine Folder), then the above Snapshot Folder, would have been pointing to J:\.

As I said, not a bug.

comment:2 by Jessica Hamilton, 7 years ago

I didn't say it was a bug. The VDI was not initially created on C:, although it has been moved between other disks. And I only want VDIs on alternate drives. Other fresh VMs, I've created the disk on J:.

Still, the behaviour is unexpected. I'd argue that the setting should be optional and default to the location of the VDI, and then let it be overridden if so needed. That would be of least surprise to users.

comment:3 by Klaus Espenlaub, 7 years ago

I can understand both the "surprising" and "expected behavior" sides.

However, the rule for the Snapshots directory always was that it gets created in the VM directory. If it would be created where the VDI is located then multiple VMs would end up with sharing one directory, if multiple unrelated images are placed in one directory. Which is actually a relatively common case.

What you should've done is move the VM and not just the disk image. Moving simple VMs (which don't have dependencies on other VMs, e.g. through the linked clone feature) with all files in the default placement (VDI in the VM directory, diff images if present in the Snapshots subdirectory) is quite easy: remove the VM (keeping all files of course!), move it to the disk which has enough space, and then either re-add the VM to the UI using Machine->Add... or by double clicking on the .vbox file.

If things are done this way, then snapshots are created on the right drive...

That said: we want to offer moving VMs to a different location/disk directly through the VirtualBox GUI, and part of the work for this feature is already done. Don't know when it'll be finished, but until then you can use the recipe I described. When this feature is implemented 100% to my wishes then it will actually put all files in the "proper" place again, even if they were spread around previously.

Note: See TracTickets for help on using tickets.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy