Opened 8 years ago
Last modified 8 years ago
#16322 new enhancement
Allow specifying a VHD diff file location when cloning
Reported by: | Will Power | Owned by: | |
---|---|---|---|
Component: | other | Version: | VirtualBox 5.1.12 |
Keywords: | clone diff | Cc: | |
Guest type: | Windows | Host type: | Windows |
Description
When cloning, I expected to be able to specify the destination folder when using the diff method, just like you can when creating a new machine and creating a new disk.
Change History (6)
comment:1 by , 8 years ago
comment:3 by , 8 years ago
It's available in the GUI as well. If you go to Virtual Media Manager and select a disk to copy/clone, you get to choose where you want the clone to be stored. That doesn't work for you?
comment:4 by , 8 years ago
Yes, that manager has the ability to specify the location, as does the VM Create dialog. But right clicking on a VM and choosing to Clone does not give you the ability to specify the location of the new disk. It forces it into a hardcoded location.
BTW, on the Virtual Media Manager, I didn't see the way to do a clone as a link/diff. That seems to only be in the VM Clone feature.
comment:5 by , 8 years ago
Wait a minute... You don't want to clone a VHD, you want to clone the whole VM!!! As a linked clone!!! And I assume that the VM is using a VHD, that's why the confusion in the description. Because you can clone a VM and you can clone/duplicate a VHD. Now, it makes sense...
Well, in that case you can't do it from the GUI. I guess VirtualBox is trying to prevent you from screwing up your setup and gives you the default option only, where the whole VM (recipe, logs, snapshots) is under one directory. Or they never implemented that option. My guess is the former.
Of course that begs the question of why it allows you to do it at the creation of a new VM. Stupid move if you ask me, but, that's just me. The VM should be in one place with all its files. Except special cases, but if you want to use special cases, you'd know what you were doing and you'd know how to do it.
The problem you're having is that VirtualBox won't allow you to specify where the ClonedVM will be stored (not just it's virtualHD) in the GUI. That exists only in the CLI version, and it is not the command that I quoted before (clonemedium
), that's for a standalone disk. Part of the correct command that you should be looking at is:
VBoxManage clonevm "<Your_VM_Name>" --basefolder "<Preferred_VM_location>"
For more details please read Ch. 8.9 VBoxManage clonevm for all the settings and properties.
VBoxManage clonemedium [disk|dvd|floppy] <uuid|inputfile> <uuid|outputfile>
The above doesn't work for you?