Page 1 of 1

[Solved] vbox differencing disks

Posted: 21. Oct 2009, 13:52
by xNuno
Hi!

Why when I shutdown my VM the vbox differencing disks claens it self?

There is anyway to prevent this?

Regards,
NS

Re: vbox differencing disks

Posted: 21. Oct 2009, 14:10
by Sasquatch
Either you have mounted the VDI as immutable, or you use snapshots and turn off the VM using Host+Q, the X in the top right of the window or through the Machine menu and you have the checkbox ticked to revert changes that were made when you power off the VM.

Re: vbox differencing disks

Posted: 21. Oct 2009, 14:52
by xNuno
Sasquatch wrote:Either you have mounted the VDI as immutable, or you use snapshots and turn off the VM using Host+Q, the X in the top right of the window or through the Machine menu and you have the checkbox ticked to revert changes that were made when you power off the VM.
What do you mean? I have created a base disk and put it as imutable,next i create a VM and add that disk automatically the VM create a differencing hard disk called snapshot.vdi .

What I need to the snapshot retain all changes...?

Re: vbox differencing disks

Posted: 21. Oct 2009, 15:25
by Sasquatch
This is by design. Immutable drives are just that, changes are lost when the VM is shut down. If you want the changes to persist, unregister the VDI and register it again as a normal VDI.

Re: vbox differencing disks

Posted: 21. Oct 2009, 15:36
by xNuno
Sasquatch wrote:This is by design. Immutable drives are just that, changes are lost when the VM is shut down. If you want the changes to persist, unregister the VDI and register it again as a normal VDI.

The team of VBox must lock at Windows Virtual PC and try to make some improvements...I like very much VirtualBox and I think it's more faster than Windows Virtual PC but there is some details that make the difference...

Many thanks for your help!

Re: vbox differencing disks

Posted: 21. Oct 2009, 15:45
by Sasquatch
Why take a horrible product that's beyond improving as an example? VB is already a great product without looking at others.

Re: vbox differencing disks

Posted: 21. Oct 2009, 16:11
by xNuno
Sasquatch wrote:Why take a horrible product that's beyond improving as an example? VB is already a great product without looking at others.
Yahp. But for example why I need to use command line to make a disk imutable? Why I cant create differencing disks and make them like a real disk only using a base?

As you know for users without knowledgement the facility of the programs make the difference.

I will give you a sample for the differencing disks :

I install a base machine with windows xp and now I want to create more 5 machines. The only thing I need to make on Windows VP It's create the 5 machines using the first install as a base. After this I can use the machines as I want, restart shutdown and the changes are retained and I only use the space of the first disk for example 1,5GB and the others five machines will use the space required for them.

With VirtualBox I can do this but I will need to duplicate the base disk so it will be 5x1,5GB...

Do you understand?

Sorry my English...I'm Portuguese...

Re: vbox differencing disks

Posted: 21. Oct 2009, 16:48
by Sasquatch
Ah, yes, that feature. I've heard about it before. For that, please open a new topic in the Suggestions forum and explain what it should do, how it should work, etc.

I'm considering your original question as answered, so I'm marking this topic as solved.

Re: vbox differencing disks

Posted: 22. Oct 2009, 00:17
by MarkCranness
xNuno wrote:I install a base machine with windows xp and now I want to create more 5 machines. The only thing I need to make on Windows VP It's create the 5 machines using the first install as a base. After this I can use the machines as I want, restart shutdown and the changes are retained and I only use the space of the first disk for example 1,5GB and the others five machines will use the space required for them.
Try this:
  • Detach the base VDI from all VMs
  • Code: Select all

    VBoxManage modifyhd <VDI> --type immutable
  • Attach base VDI to a VM
    (This will create a differencing disk.)
  • Find the UUID of the differencing disk:

    Code: Select all

    VBoxManage showvminfo <VMName>
    Look for your VDI in the output, it will be attached to one of the HDD controllers, and say: "...\Snapshots\{...} UUID: ...."
  • Code: Select all

    VBoxManage modifyhd <UUID> --autoreset off
    (Put the UUID in, after removing the {} characters.)
A second different method that does not use immutable disk, but does need a separate 'holding VM':
  • Mark the VDI as Normal (if you have marked it as Immutable) and make sure it is not attached to a VM.
  • Attach it to a 'holding' VM and take a snapshot.
  • Attach it to the other 5 VMs.
    (As you attach, you should see a blue multi-pointed star to the left, and a message "will attach using a differencing disk" or similar.)
Open up Virtual Media Manager and examine the base VDI. It should say "Attached to (holding VM)". Under the base VDI will be snapshots for each VM (including the holding VM). At that point, you can't Revert the holding VM snapshot while the VMs are also attached, and the VMs have no snapshots displayed to even try and Revert.
Test it to make sure it does what you need (protects the base VDI).

Note: Over time the differencing VDIs will grow in size, some of which is expected VM changes, some of which may be OS 'noise' such as erased temp files, updated MFT/directory file access times and similar. Some of the noise may be able to recovered using sdelete followed by VBoxManage compact - section 8.15 of the manual.

Re: [Solved] vbox differencing disks

Posted: 22. Oct 2009, 12:14
by xNuno
It works VBoxManage modifyhd <UUID> --autoreset off

Many thanks! Why Vbox team dont create a GUI for this? Why we need to use command line?

Regards,
NS

Re: [Solved] vbox differencing disks

Posted: 23. Oct 2009, 06:07
by isrc
xNuno wrote:It works VBoxManage modifyhd <UUID> --autoreset off

Many thanks! Why Vbox team dont create a GUI for this? Why we need to use command line?

Regards,
NS
Agree ! Would you mind opening a feature request for thist please ? saw this report http://www.virtualbox.org/ticket/2772 but it's not specifically about the gui request :-)

Thanks !

Re: [Solved] vbox differencing disks

Posted: 23. Oct 2009, 12:03
by xNuno
isrc wrote:
xNuno wrote:It works VBoxManage modifyhd <UUID> --autoreset off

Many thanks! Why Vbox team dont create a GUI for this? Why we need to use command line?

Regards,
NS
Agree ! Would you mind opening a feature request for thist please ? saw this report http://www.virtualbox.org/ticket/2772 but it's not specifically about the gui request :-)

Thanks !
I already create a topic on sugestions forum ;-)

Re: [Solved] vbox differencing disks

Posted: 23. Oct 2009, 15:33
by isrc
Hi,
As i'm not sure the developers read the forum, i've opened a report about this feature in http://www.virtualbox.org/ticket/5277.

HTH,
Thanks !