Differencing disks sharing common immutable parent
Posted: 11. Feb 2011, 16:25
I am having big trouble setting up a set of VMs that use differencing disks that share a common immutable parent. I always seem to end up with leaf disks disappearing out of the media registry after snapshots are taken and the VMs becoming 'inaccessible'.
My question is, no less: "What is the correct procedure for setting this up (in 4.0)?"
For those interested in what I was trying, this is known not to work:
My question is, no less: "What is the correct procedure for setting this up (in 4.0)?"
For those interested in what I was trying, this is known not to work:
- 'createvm --name test1' and 'storageattach --medium base.vdi --mtype immutable'
- According to the docs, this actually attaches a differencing disk with base.vdi as the parent. Examining the vbox/xml confirms this to be true, as intended.
- 'createvm --name test2' similarly.
- This VM gets a different differencing disk from the same base, as intended.
- At this point, both VMs run. I 'modifyhd --autoreset off' both differencing disks so they can now diverge.
- As a technical note, the MediaRegistry section in test2's xml is empty and its disk is actually registered in test1's xml (presumably because that's where the parent is registered).
- Now, take a snapshot of test1 and test2. If you now open the QT manager, test2 will be 'inaccessible' because the leaf disk it would use after the snapshot was taken is not registered anywhere (it is not inside test1's MediaRegistry section for some reason). Also, in order to put it into test1's xml manually during the 'clutching at straws' phase of this exercise, I noticed that the auto-reset on test1's image was changed back to 'on' after the snapshot was made, which is not what I intended.