Page 1 of 1
Possible to make differencing disk "immutable"?
Posted: 2. Oct 2010, 13:53
by kebabbert
I have a immutable vdi. Ontop the immutable vdi, I have made a differencing disk (I created a new virtual machine based on the immutable VDI) and installed some software.
Now I want to make the differencing disk immutable. But the differencing disk is not a VDI file, it is a snapshot, as it shows up as a "Snapshot" in the "/Machines/.../Snapshots" folder.
Can I make the differencing disk immutable? Or is it not a differencing disk, it is actually a snapshot that I try to make immutable?
I want to create new virtual machines, based on a immutable differencing disk.
I noticed a "Differencing Disks" checkbox in the "Storage" tab. Is it of any use?
Re: Possible to make differencing disk "immutable"?
Posted: 2. Oct 2010, 14:07
by Sasquatch
Just tried to change a snapshot file to immutable, this is the result:
Code: Select all
VBoxManage modifyhd bb2498b9-5ec4-4e0f-9a5a-928facb7d25a --type immutable
Oracle VM VirtualBox Command Line Management Interface Version 3.2.8
(C) 2005-2010 Oracle Corporation
All rights reserved.
ERROR: Cannot change the type of medium '/media/VMs/Virtual Machines/Windows 7/Snapshots/{bb2498b9-5ec4-4e0f-9a5a-928facb7d25a}.vdi' because it is a differencing medium
Details: code NS_ERROR_FAILURE (0x80004005), component Medium, interface IMedium, callee nsISupports
Context: "COMSETTER(Type)(DiskType)" at line 444 of file VBoxManageDisk.cpp
So, you can't make snapshots or differencing disks immutable. You have to merge the snapshot to the base VDI and build a new immutable VDI with that.
Re: Possible to make differencing disk "immutable"?
Posted: 2. Oct 2010, 14:16
by kebabbert
That is strange. Basically, I just want to chain differencing disks
http://www.virtualbox.org/manual/ch05.html#diffimages
"Differencing images can be chained. If another differencing image is created for a virtual disk that already has a differencing image, then it becomes a "grandchild" of the original parent. The first differencing image then becomes read-only as well, and write operations only go to the second-level differencing image. When reading from the virtual disk, VirtualBox needs to look into the second differencing image first, then into the first if the sector was not found, and then into the original image."
A) I have immutable VDI: Windows XP
B) I have a differencing disk based on immutable VDI: Windows XP + Firefox. (I only install Firefox here).
c) Now I want to chain another differencing disk ontop B) so I have a image looking like: Windows XP + Firefox + VisualStudio (I only install VisualStudio here)
Is this not possible to do? Or must I use snapshots?
Re: Possible to make differencing disk "immutable"?
Posted: 2. Oct 2010, 14:22
by Sasquatch
From what I understand is that it's another snapshot that you will create to get what you want. Since there are only 4 kinds of disks (normal, writethrough, immutable and shareable) for the modifyhd option, the differencing the manual talks about has to be a snapshot. Or a similar kind like one that gets created for immutable disks.
Re: Possible to make differencing disk "immutable"?
Posted: 2. Oct 2010, 14:24
by kebabbert
I dont really understand the manual on "chaining differencing disks"
I revert my immutable VDI to normal VDI, then install Firefox. Then make a snapshot. Then make the VDI immutable. Then I make a differencing disk and install VisualStudio?
So I can not make a differencing disk, ontop another differencing disk, ontop another differencing disk, ontop ....?
Re: Possible to make differencing disk "immutable"?
Posted: 2. Oct 2010, 14:46
by Sasquatch
That's the whole problem with technical terms, it's not always done consistently. You can create snapshot over snapshot, so I'm guessing this is what the manual is talking about with chaining differencing disks. You chain snapshots.
I hope a dev comes by soon to give more information about the works here.
Re: Possible to make differencing disk "immutable"?
Posted: 4. Oct 2010, 19:39
by kebabbert
Ok, no developer has responded in this thread.
Do you think Snapshots could work in my case? I need to setup Firefox and then do a snapshot.
The purpose is to surf on unsecure websites. I want to rollback after every surf session. How would you solve this problem?
Re: Possible to make differencing disk "immutable"?
Posted: 4. Oct 2010, 19:42
by Sasquatch
To do that, you have to remove the snapshot (not merge it) every time you want to 'forget' what you did and recreate the snapshot. It's easier to make a base image without snapshots and make that VDI immutable.
Re: Possible to make differencing disk "immutable"?
Posted: 23. Dec 2010, 03:00
by 4sound
simply create a new machine, then copy default machines xml file contents to an appropriate file in a new machine replacing machines GUID.
Now restore one snapshot in default machine and other in the new one.
it will now be possible to use same differencing image in two online machines.
You should not change disk type. It works well for me. Please reply if it works in your case ether and we could submit a feature request if it is correct to use such config.