[Solved] vbox differencing disks

This is for discussing general topics about how to use VirtualBox.
Post Reply
xNuno
Posts: 9
Joined: 21. Oct 2009, 13:47
Primary OS: MS Windows 7
VBox Version: OSE self-compiled
Guest OSses: XP Seven Vista Server 2008

[Solved] vbox differencing disks

Post by xNuno »

Hi!

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

There is anyway to prevent this?

Regards,
NS
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: vbox differencing disks

Post 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.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
xNuno
Posts: 9
Joined: 21. Oct 2009, 13:47
Primary OS: MS Windows 7
VBox Version: OSE self-compiled
Guest OSses: XP Seven Vista Server 2008

Re: vbox differencing disks

Post 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...?
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: vbox differencing disks

Post 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.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
xNuno
Posts: 9
Joined: 21. Oct 2009, 13:47
Primary OS: MS Windows 7
VBox Version: OSE self-compiled
Guest OSses: XP Seven Vista Server 2008

Re: vbox differencing disks

Post 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!
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: vbox differencing disks

Post by Sasquatch »

Why take a horrible product that's beyond improving as an example? VB is already a great product without looking at others.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
xNuno
Posts: 9
Joined: 21. Oct 2009, 13:47
Primary OS: MS Windows 7
VBox Version: OSE self-compiled
Guest OSses: XP Seven Vista Server 2008

Re: vbox differencing disks

Post 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...
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: vbox differencing disks

Post 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.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
MarkCranness
Volunteer
Posts: 875
Joined: 10. Oct 2009, 06:27
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows Server 2008 R2; Ubuntu 11.04; Windows 2000 Server; Windows XP

Re: vbox differencing disks

Post 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.
xNuno
Posts: 9
Joined: 21. Oct 2009, 13:47
Primary OS: MS Windows 7
VBox Version: OSE self-compiled
Guest OSses: XP Seven Vista Server 2008

Re: [Solved] vbox differencing disks

Post 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
isrc
Posts: 13
Joined: 19. Nov 2008, 14:24

Re: [Solved] vbox differencing disks

Post 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 !
xNuno
Posts: 9
Joined: 21. Oct 2009, 13:47
Primary OS: MS Windows 7
VBox Version: OSE self-compiled
Guest OSses: XP Seven Vista Server 2008

Re: [Solved] vbox differencing disks

Post 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 ;-)
isrc
Posts: 13
Joined: 19. Nov 2008, 14:24

Re: [Solved] vbox differencing disks

Post 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 !
Post Reply