Replacing virtual drives and keeping snapshots

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Savant
Posts: 7
Joined: 18. Jan 2018, 14:39

Replacing virtual drives and keeping snapshots

Post by Savant »

Greetings,

I have a VM for which I would like to replace (esencially move) its (two) .vmdk drives. Currently they are located on my drive mapped as G: of my host machine. I copied the two mentioned drives to my drive M:. Both drives are external, if it matters.
Steps I made (roughly):

1. Stoped the VM
2. Tried to simply replace the two .vmdk drives in Storage options of Setting of the VM - it doesn't work and VBox complains that the disk with the same UUID exists
3. I go to Virtual Media Manager, there are some snapshots bound to these drives that I'd like to keep and keep them in the folder they are now

I googled around for the answer but somehow it skips me.

Host machine: Win 7
Guest machine: Win 2008 server R2
VirtualBox v.: 5.1.4

Thank you
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Replacing virtual drives and keeping snapshots

Post by mpack »

Can you explain why you need to move bits of a VM, when moving the whole VM is easier?

Howto: Move a VM.
Savant
Posts: 7
Joined: 18. Jan 2018, 14:39

Re: Replacing virtual drives and keeping snapshots

Post by Savant »

Can you explain why you need to move bits of a VM, when moving the whole VM is easier?
Well, because I keep the snapshots on my host's HDD together with my VMs and the originating drives on an external drive. This external drive we share among us colleagues which this way use the same virtual drives for their respective VMs. Helps to keep space on my laptop.
Savant
Posts: 7
Joined: 18. Jan 2018, 14:39

Re: Replacing virtual drives and keeping snapshots

Post by Savant »

Okay, by using the option to clone the originating virtual drives and therefore obtaining different UUIDs, I managed to "move" the drives to another host HDD. I am still a bit confused about how the VBox is managing the snapshots since the UUID of the originating drive changed. Wonder what would happen with the status of the snapshots and the VM if I would "slip" some other virtual drives not related to the original ones that were cloned...
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Replacing virtual drives and keeping snapshots

Post by mpack »

If you cloned a drive then it no longer uses snapshots, since cloning the drive merges them. If you manually inserted a cloned drive into the VM that expects snapshots then the VM now has an incorrect configuration.
Savant
Posts: 7
Joined: 18. Jan 2018, 14:39

Re: Replacing virtual drives and keeping snapshots

Post by Savant »

But then that brings me to my original question and opens other questions:

- Is it possible to replace the drive with another drive (copy of the original), the only difference being their placement on host machine, with keeping snapshots
- If the cloning merges snapshots, how he would merge the snapshots if snapshots would be branched and not only daisy-chained
- What is the option "release" in Virtual Media Manager for
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Replacing virtual drives and keeping snapshots

Post by mpack »

No, there is no feature which allows you to disperse bits of the VM without damaging control information. It is intended that you keep all the bits of a VM together, as I hinted at in my first response.

If you want to relocate a disk image then the only procedure for non experts is to get rid of all the snapshots, then move the drive, then enable snapshots again (if you really must).
Savant
Posts: 7
Joined: 18. Jan 2018, 14:39

Re: Replacing virtual drives and keeping snapshots

Post by Savant »

Thank you for all the answers
Post Reply