Differencing Disks (just like in Virtual PC)

This is for discussing general topics about how to use VirtualBox.
Post Reply
mbressman
Posts: 23
Joined: 8. Jun 2009, 00:38
Primary OS: MS Windows XP
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: WinXP
Location: NJ/NYC
Contact:

Differencing Disks (just like in Virtual PC)

Post by mbressman »

Hi,

I'm a new user to VirtualBox, but so far am thrilled with it. Unfortunately, one of the things I want to accomplish doesn't seem to be working out for me so great. When I used Microsoft's Virtual PC 2007, I was able to create one primary installation of WinXP, and then set it to read-only and create differencing disks that enabled me to set up multiple additional sessions that each used the primary installation as a base but wrote changes I made elsewhere (so the primary installation was never touched, but changes I made to additional sessions I set up were saved). I tried to do that in VirtualBox (using the instructions I found here: http://forums.virtualbox.org/viewtopic. ... 951#p67969), but it doesn't seem to be working for me. Basically, each time I shut down the additional session, and then restart it, all my changes are gone. Here's what I did:

1) Created a new virtual machine (512 MB RAM, 20 GB Dynamically expanding HD) (called Windows XP #1) and installed WinXP SP2 on it
2) Installed Guest Additions on this virtual machine instance
3) Defragmented this Virtual Machine instance
4) Shut down this virtual machine instance, and using Virtual Media Manager, released it and removed it (but kept the actual data file)
5) Set this Windows XP #1.vdi file to read-only
6) Ran the following command: VBoxManage openmedium disk "C:\documents and settings\<username>\my documents\VirtualBox\Windows XP #1.vdi" -type immutable
7) Re-added this VDI file to Virtual Media Manager and re-attached it to Windows XP #1 virtual machine
8 ) Ran Windows XP #1 virtual machine
9) Upon checking the following directory (C:\Documents and Settings\<username>\My Documents\VirtualBox\Windows XP #1\Snapshots), discovered it created a .VDI snapshot file ({fb43c718-3ef1-43c5-9441-67d25ffedfe1}.vdi) and a .SAV file ({fda4831b-93b1-49ad-a452-30aa50b87fd2}.sav) automatically
10) From within Windows XP #1 virtual machine, created a snapshot file (called Snapshot 1) - this seemed to create an additional file in the above directory ({301c4142-038e-43e5-93b9-56d96927d50d}.vdi)
11) Shut down out of Windows XP #1 virtual machine, and created a new virtual machine (512 MB RAM, no hard disk) (called Differencing #1)
12) Went into the settings of this virtual machine (Differencing #1), and under "Hard Disks" checked "Show Differencing Hard Disks" and then added the {301c4142-038e-43e5-93b9-56d96927d50d}.vdi file as the IDE Primary Master

When I go to look at the settings of Differencing #1, it shows for Hard Disk: Windows XP #1.vdi (Immutable, 20.00 GB)

Any ideas what I'm doing wrong and how to get the configuration I mentioned above so that the hard disk attached to Differencing #1 virtual machine is working off of the initial WinXP installation, but saving changes when I reboot (not saving them to Windows XP #1.vdi, but to some differencing VDI file)?

Any help to get this to work properly is greatly appreciated! Thanks.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Differencing Disks (just like in Virtual PC)

Post by Perryg »

Well I must admit that I have never done this and probably you should wait for someone that has. I always use my Immutable drives for instructional media where I have several people using the same media and do not want them written to (changes not saved) but as a guess have you tried to take a snapshot of the working Immutable drive before you close down to see if it saves your work?
mbressman
Posts: 23
Joined: 8. Jun 2009, 00:38
Primary OS: MS Windows XP
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: WinXP
Location: NJ/NYC
Contact:

Re: Differencing Disks (just like in Virtual PC)

Post by mbressman »

Actually, I sort of figured it out. I think the whole immutable disks threw me, but basically, all I had to do was create a WinXP Virtual Machine, shut it down, take a snapshot, and then use that snapshot to create a new virtual machine. Each time I wanted another differencing virtual machine, I'd just take a snapshot of the original virtual machine and then use that snapshot to create a new one - this way, all my changes in the new ones would be saved under the snapshot and would be preserved upon power off.
Post Reply