Page 1 of 1
Differencing VDI - Making them go away. [Help]
Posted: 18. Sep 2010, 01:00
by tylerfarra
Information/Setup:
Host OS is Windows XP running FreeNAS as a guest. VirtualBox version 3.2.8 r64453
3 HDD - C:(40gb) F:(700gb) G:(230gb)
4 VDI - FreeNAS.vdi([Guest OS]saved on C) Games.vdi([FreeNAS drive]saved on G)
PrivateShares.vdi([FreeNAS drive]saved on F) Shares.vdi([FreeNAS drive]saved on G)
My problem/annoyance:
Changes made to the VDIs are saved as a differencing VDI on the C: drive. Since my C: drive is only 40gb these VDIs can easily take all avaliable space in a day(on the C: drive). The VDIs listed above are supposed to be normal but they are acting like they are set as a Immutable VDI. Is this a normal fuctionality of VirtualBox or a bug? How do i fix/get around this? I would prefer to do away with the differencing VDIs all together.
Any help is appreciated.
Re: Differencing VDI - Making them go away. [Help]
Posted: 18. Sep 2010, 01:11
by Perryg
We are going to need some information:
Send this for one of the guests that do this.
From the host terminal/command windows VBoxManage showvminfo <VM Name> --details and post here. Replace <VM Name> with the actual name of the VM. Use "" if the name has a space in it.
Who set up the differencing VDI.
Is differencing enabled in the guest settings, storage?
Also you can post the VirtualBox.xml as an attachment.
Re: Differencing VDI - Making them go away. [Help]
Posted: 18. Sep 2010, 01:32
by tylerfarra
Code: Select all
Name: FreeNAS
Guest OS: FreeBSD
UUID: d7b07e4e-68fd-4f40-bcd4-32e87f651c47
Config file: C:\.VirtualBox\Machines\FreeNAS\FreeNAS.xml
Hardware UUID: d7b07e4e-68fd-4f40-bcd4-32e87f651c47
Memory size: 512MB
Page Fusion: off
VRAM size: 5MB
HPET: off
Number of CPUs: 1
Synthetic Cpu: off
CPUID overrides: None
Boot menu mode: message and menu
Boot Device (1): DVD
Boot Device (2): HardDisk
Boot Device (3): Not Assigned
Boot Device (4): Not Assigned
ACPI: on
IOAPIC: on
PAE: off
Time offset: 0 ms
RTC: local time
Hardw. virt.ext: on
Hardw. virt.ext exclusive: off
Nested Paging: on
Large Pages: off
VT-x VPID: on
State: powered off (since 2010-09-17T22:31:05.000000000)
Monitor count: 1
3D Acceleration: off
2D Video Acceleration: off
Teleporter Enabled: off
Teleporter Port: 0
Teleporter Address:
Teleporter Password:
Storage Controller Name (0): IDE Controller
Storage Controller Type (0): PIIX4
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0): 2
Storage Controller Port Count (0): 2
Storage Controller Name (1): SATA Controller
Storage Controller Type (1): IntelAhci
Storage Controller Instance Number (1): 0
Storage Controller Max Port Count (1): 30
Storage Controller Port Count (1): 3
IDE Controller (0, 0): C:\.VirtualBox\Machines\FreeNAS\Snapshots\{d4b41e9c-0ae8-
492a-8c16-b3333d5f1f75}.vdi (UUID: d4b41e9c-0ae8-492a-8c16-b3333d5f1f75)
IDE Controller (1, 0): Empty
SATA Controller (0, 0): F:\PrivateShares.vdi (UUID: 9fec8761-2562-4f85-b30c-fd90
6430b03f)
SATA Controller (1, 0): G:\Games.vdi (UUID: cbd336d9-436a-4eef-8f7e-a0261f22da16
)
SATA Controller (2, 0): G:\Shares.vdi (UUID: 6a16c494-180c-47da-bdf4-ef348b377fc
5)
NIC 1: MAC: 08002773D168, Attachment: Bridged Interface 'MAC Bridge Mi
niport', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported s
peed: 0 Mbps, Boot priority: 0
NIC 2: disabled
NIC 3: disabled
NIC 4: disabled
NIC 5: disabled
NIC 6: disabled
NIC 7: disabled
NIC 8: disabled
Pointing Device: PS/2 Mouse
Keyboard Device: PS/2 Keyboard
UART 1: disabled
UART 2: disabled
Audio: disabled
Clipboard Mode: Bidirectional
VRDP: disabled
USB: enabled
USB Device Filters:
<none>
Shared folders: <none>
Guest:
Configured memory balloon size: 0 MB
Perryg wrote:Who setup the differencing VDI
Not sure if I understand the question...I am the only user who has set things up.I was not aware that it was creating the differencing VDIs until I got a notification from Windows telling me I was out of disk space.
Perryg wrote:Is differencing enabled in the guest settings, storage?
Nope.
Perryg wrote:We are going to need some information:
Send this for one of the guests that do this.
From the host terminal/command windows VBoxManage showvminfo <VM Name> --details and post here. Replace <VM Name> with the actual name of the VM. Use "" if the name has a space in it.
Who set up the differencing VDI.
Is differencing enabled in the guest settings, storage?
Also you can post the VirtualBox.xml as an attachment.
Re: Differencing VDI - Making them go away. [Help]
Posted: 18. Sep 2010, 11:58
by mpack
I've looked at your VirtualBox.xml and see nothing about a differencing VDI. I do however see that you took a snapshot of your FreeNAS parent VDI, this is of course a type of difference drive image, but I don't see why that is very relevant either.
What exactly makes you think there is something unusual going on? Is it just the fact that your snapshot file is growing? If so, that is perfectly normal: grow is exactly what any snaphot file will do as Windows (or any guest app) writes to the drive (including swap file writes). However it will not grow indefinitely: after a while it should reach an equilibrium size.
If drive C is tight for space then the obvious solution is to move the image to another drive: however the fact that you've used snapshots complicates that somewhat. The easiest solution IMHO is to move the entire contents of the .Virtualbox folder tree EXCEPT VirtualBox.xml over to your largest internal drive. Say that's drive G. Ok, so now you have a .VirtualBox folder on drives C and G, however the version on C only contains VirtualBox.xml, and the G drive version contains everything else. Now use a text editor to edit VirtualBox.xml, replace ALL occurrences of "C:\..etc..\.VirtualBox" with "G:\.VirtualBox", and save. Take a backup before you start, make sure VBox is not running when you do it.
Re: Differencing VDI - Making them go away. [Help]
Posted: 20. Sep 2010, 20:18
by tylerfarra
mpack wrote:I've looked at your VirtualBox.xml and see nothing about a differencing VDI. I do however see that you took a snapshot of your FreeNAS parent VDI, this is of course a type of difference drive image, but I don't see why that is very relevant either.
I did take a snapshot a while back, but that snapshot was deleted long ago. In fact there are no snapshots listed under the snapshot tab.
mpack wrote:What exactly makes you think there is something unusual going on? Is it just the fact that your snapshot file is growing? If so, that is perfectly normal: grow is exactly what any snaphot file will do as Windows (or any guest app) writes to the drive (including swap file writes). However it will not grow indefinitely: after a while it should reach an equilibrium size.
The fact that there should not be any snapshots(that i created) makes me think that there is an issue. The reason I believe there is an issue is because it creates (differencing)VDIs and puts them in the snapshot folder. Instead of applying any changes to the original VDI it creates a differencing VDI. Here is a quote from the User Manual online:
"Technically, strictly speaking, the image file itself is not “reset”. Instead, when
a snapshot is taken, VirtualBox “freezes” the image file and no longer writes to
it. For the write operations from the VM, a second, “differencing” image file
is created which receives only the changes to the original image; see the next
section for details."
page93
Its seems that this may all be stimming from the snapshost that I took of the guest OS VDI. The funny put is that the snapshot does not exist anymore, but it has effectively made the guest OS VDI read-only along with any other VDIs that are attached to the guest OS.
I have moved the .VirtualBox folder to a drive with a larger capacity, although this is not an ideal solution. i guess my question should be "how do I make any writes to the original VDIs actually write to them and not write to a differencing(child) VDI?"
Thanks for the feedback so far.
Re: Differencing VDI - Making them go away. [Help]
Posted: 20. Sep 2010, 21:26
by mpack
I will point out once again that none of the disk images in VirtualBox.xml are marked as differencing images, and since that is how differencing images are identified by VirtualBox, that means there is no differencing image. The files listed look like standard snapshot images, regardless of what the VM.xml says. I can't be sure, but I can imagine this being the result of someone manually editing the VM settings XML, or overwriting a valid VM xml with an invalid copy (say from a backup or copied from another host.
tylerfarra wrote:i guess my question should be "how do I make any writes to the original VDIs actually write to them and not write to a differencing(child) VDI?
I personally avoid snapshots like the plague, so I'm afraid that makes me ignorant when it comes to the finer details of how to manipulate them. Perhaps someone else can answer your question.
Re: Differencing VDI - Making them go away. [Help]
Posted: 20. Sep 2010, 22:08
by tylerfarra
The line that is highlighted shows that this is a Differencing VDI. It is attached to the FreeNAS.vdi which is where the guest OS is installed. The other 3 files under FreeNAS.vdi are also differencing VDIs except that they are no longer attached to FreeNAS.vdi for whatever reason.
The only difference in this image from the issue I was originally having is that the Games, PrivateShares and Shares.vdi(these 3 have never had a manual snapshot taken of them) files also had their own set of differencing VDI that looked like how FreeNAS.vdi does now. Since these 3 vdis are the ones that are always changing the differencing VDIs became quite large(20gb+).
I have never manually edited the VirtualBox.xml nor has it been overwritten it with another.
mpack wrote:I personally avoid snapshots like the plague, so I'm afraid that makes me ignorant when it comes to the finer details of how to manipulate them. Perhaps someone else can answer your question.
Im starting to wish that I never played with the snapshot functionallity. I'm thinking very soon that I will uninstall VirtualBox and make sure to delete all .xml files and just re-install and rebuild the guest OS with the existing VDIs. Although I'll have to figure out how to combine the original FreeNAS.vdi with it's child VDIs.

Re: Differencing VDI - Making them go away. [Help]
Posted: 21. Sep 2010, 11:09
by mpack
Eh? The hard disk registry you show there does not correspond with the contents of the VirtualBox.xml which you posted earlier in the thread. Of all the "children" of FreeNAS.vdi, the only one in your picture which exists in VirtualBox.xml is the child with UUID "{d4b41e9c-etc" and which definitely seems to be a snapshot. In your VirtualBox.xml, the child I've just described is the only child of FreeNAS.vdi.
I don't understand what's going on here. AFAIK, the media registry view which you show has got nothing to do with any VM, it should be a direct representation of the content of VirtualBox.xml, but the VirtualBox.xml you posted is totally different. And as I said before, none of the hard disk images in your VirtualBox.xml are listed as differencing.
Re: Differencing VDI - Making them go away. [Help]
Posted: 14. Jan 2011, 04:26
by mrmafergus
HEY!!! HEY!!!!!! All I did was create a new virtual machine, then point it at the existing xp.vdi file and "voi la", it started like nothing ever happened.
Re: Differencing VDI - Making them go away. [Help]
Posted: 15. Jan 2011, 16:11
by moiztankiwala
Since there are experts on this thread, I have a related question on differencing disks posted here
http://forums.virtualbox.org/viewtopic.php?f=1&t=37983 and I am looking for some solution.
Summary of my question - I have a VM attached to a disk that is the 4th level child (Level 1 is the immutable disk). I now want to create another 4th level child disk as a differencing disk from the 3rd level and attach this disk to a new VM.
I am unable to create this new 4th level child differencing disk either through the UI or the command line.
Thanks in advance.