Page 1 of 1
[Solved] Extended VDI doesn't show unallocated space
Posted: 11. Jan 2012, 16:48
by Miyuri
Hello,
I know this topic has been discussed before but I realized I made a mistake in the process and would like to know what I should do about this before I go on.
I am using the latest version of VirtualBox on a Mac OS X Lion Host with a Windows 7 Guest.
I don't need a lot of things on the Guest, so I originally made a 20 Go partition. However, the system keeps growing and I end up getting a low disk space warning everytime I try to use Windows.
As a consequence, I used the 'VBoxManage Windows 7.vdi --resize 25000' command to give it 5 more Go. What I didn't realize is that my VM had a snapshot (I made it at the very beginning when I first installed it and completely forgot about it). I think this is why I can see the new size in VirtualBox, but when I switch on the Guest, diskpart doesn't see any unallocated space to extend the partition.
What should I do about this? I have 2 lines in Snapshots: one called "Initial" (dated from one year ago) and one called "Actual state (modified)" coming out of this one. If I click on "Initial" and delete it, won't that remove my "Actual state" too (because they seem to be connected)? And what will that change about my previous resizing operation?
Also, there is something that I don't understand about the size that is shown in VirtualBox.
I have a virtual size of 24,41 Gio (the extended size that I would like to get) and an actual size of 9,24 Gio. I don't understand the actual size.
At first, I thought that the virtual size reflected the maximum size I gave to the dynamic disk, and that the actual size was the one that was really used by the system and would keep growing overtime. But obviously, the real size is the virtual one, since it is the one that Windows gives me (or at least it was until I tried resizing). So what is 9,24 Gio?
Anyway, thanks for your help, I've been trying to understand where it went wrong for quite some time now! ^^
Re: Extended VDI doesn't show unallocated space in the Guest
Posted: 13. Jan 2012, 12:37
by Miyuri
……… Someone…… Please…?
I'm still trying to read other threads to find similar issues…
I found some saying that I should merge the snapshots together… But 1) How do I do that? In VirtualBox, I can only see restore or delete the snapshot; 2) Is it ok if I do when I already resized the disk? Or does it work only before I do the operation? And if it's ok, is there anything else I need to do after that (except go back to Windows and extend the partition with Diskpart)?
I also saw some advice to clone the disk using CloneVDI, but I'm trying to avoid this because I don't have enough space left on my computer for this… If I do manage to make enough space again, how do I clone the right part of my vdi (the current state, and not the old one)? I know my vdi is supposed to be in Users/Library……… but I am using Lion and there is no longer a Library folder in Users… I can't find a VirtualBox folder either with Spotlight, only the application……
I would be so grateful if you could help me with this………!
Re: Extended VDI doesn't show unallocated space in the Guest
Posted: 13. Jan 2012, 20:44
by rpmurray
Maybe this
Merge the current state in the parent snapshot will help.
Hold down the Option key before clicking on the Go menu when in the Finder and you should see the Library folder listed.
Re: Extended VDI doesn't show unallocated space in the Guest
Posted: 14. Jan 2012, 12:40
by Miyuri
Thank you!
Yes, it indeed helped understanding that the "delete" command (or whatever its name is in English: mine is in French so the translations might not always be correct) was actually the "merging" one, but it was also a little confusing because they kept fighting about what to delete and where the information goes……
So, I have a "base" snapshot called "Initial", and deriving from this my "current state (modified)". If I go by the last comment on the thread you gave me, if I delete "Initial", then its information is merged into "current state", and I just keep "current state" as my only vdi. Right? That is the only thing I seem to be able to do anyway, since when I click on "current state", the option to delete it is grayed. But I am wondering if it might not be because I already did the modifyhd command, since I found other people who said that after this command they were no longer able to merge their snapshots…
So, do I delete "Initial" and that makes me keep only "current state" as it is (parent merges into child), or do I need to delete "current state" for it to merge into "Initial" (child merges into parent) which is no longer possible because I did the modifyhd command?
Also, thanks a lot for the Option key trick: I've got my VirtualBox folder now, with my Windows 7.vdi in "HardDisks" (so I'm guessing "current state") and one snapshot in "Machines" (which would then be "Initial"?)!
I still don't know what I am supposed to do with them if I clone something, but at least I know where they are and that's one more thing I understood today! ^^
Re: Extended VDI doesn't show unallocated space in the Guest
Posted: 14. Jan 2012, 20:56
by Miyuri
OK, while checking the 2 vdi files, I realized they're actually the opposite of what I said.
The one in Machines\Windows 7\Snapshots is the current one (19,66 Go), and the one in HardDisks is the initial one (9,92 Go). Which also solves the question I had about the "actual size" of my disk given by VirtualBox…! So it seems like it only takes into account the size of the snapshot but not the one of the current state…
I'd rather solve my resizing problem without cloning the whole thing, but if it's not possible through merging the snapshots, then would I have to clone the vdi file in the Snapshots folder?
Thanks again to anyone who could help me on this!
Re: Extended VDI doesn't show unallocated space in the Guest
Posted: 14. Jan 2012, 21:06
by Perryg
Snapshots are not my thing, but you can resize a snapshot if that is what you are wanting to do. This will increase the HDD of the snapshot and then you would need to use Gparted or something to actually increase the partition. At least that is what the DEVs said. Personally I prefer to clone working images and work on the original. Then if I need to original state I make a new guest using the cloned original. Lot less fragile.
Re: Extended VDI doesn't show unallocated space in the Guest
Posted: 15. Jan 2012, 17:24
by Miyuri
Ok, so I could either do the VBoxManage modifyhd command again, but targeting the vdi in the Snapshots folder instead (but won't I end up with a kind of broken vdi after that, because I already did the command before? And then can I just delete the first vdi without it influencing my current state?).
Or (and I guess that would be the cleaner, recommended option) clone the same vdi (the one in Snapshots), extend the disk and partition size at the same time, and then remove "Initial" and "Current state".
Am I right?
Re: Extended VDI doesn't show unallocated space in the Guest
Posted: 15. Jan 2012, 18:00
by Perryg
I can't give you a definite answer to this as I said snapshots are not my thing. I do test them but that's about as far as I can go. I messed with them when they first came out and decided that cloning was the real way to go (for me). I do know that I would back it all up before you go down any road just in case.
Re: Extended VDI doesn't show unallocated space in the Guest
Posted: 18. Jan 2012, 23:46
by Miyuri
Hi,
After reading all I could about the topic, modifying the snapshot didn't seem like a very reasonable option (even having snapshots doesn't seem to be reasonable!).
So I decided to make some room on my host and clone the snapshot vdi with CloneVDI. I followed the instructions given here (
viewtopic.php?f=6&t=22422&start=615#p181074) to make it work on MacOS X with WineBottler and it worked perfectly!
I let it create a new UUID for the HD, increased the size like I originally wanted, didn't select the "increase partition" because it seemed to result in more or less serious issues for some people who used it, and asked for it to compact (even though I knew it wouldn't change much since my drive was full).
Created a new VM with the same characteristics as the first, used VBoxManage modifyvm VM.vbox --hardwareuuid to set it to the first VM's UUID in order to avoid any activation problem, and launched the VM. Everything seemed to work fine, so I installed the Guest Additions, rebooted, used EASEUS Partition Master to extend the partition (5GB unallocated space clearly visible now), and that's it! The exact same system that I had, but with more space!
I will test it for a few days just to make sure that there is nothing wrong, and then I guess I can just remove the original VM with snapshots!
Sorry if all the details about the process seem a bit unnecessary, but I'm just trying to regroup all the information that I gathered from many different threads, in case it might be useful to someone making the same mistake that I did.
Now, I have one more question remaining: I didn't know where to put the new .vdi file when I started cloning, so I just created it on the desktop. I assumed that when I would link the vdi to the new VM, it would get moved to the correct folder. But it didn't. The folders are actually completely different from my previous VM (created under VirtualBox 3.something). They were located in the /Home/Library/VirtualBox………… The new VM actually created a 'VirtualBox VMs" folder in my Home, that contains only the VM .vbox file, a .vbox-prev file and a Logs folder. So where is the .vdi file supposed to go?
And can I just move it to another folder? Because the path in the VirtualBox GUI points to my desktop…
Or do I have to start the VM creation all over but pointing to a correctly located vdi this time? In that case, can I use the same cloned vdi or do I have to make a new clone of the original?
Thank you for your help!!
Hopefully, after that I can mark the topic as solved!

Re: Extended VDI doesn't show unallocated space in the Guest
Posted: 19. Jan 2012, 00:49
by Perryg
You probably need to unregister the new VDI, move it to the proper place and then register it again.
Re: Extended VDI doesn't show unallocated space in the Guest
Posted: 19. Jan 2012, 22:20
by Miyuri
OK, that's done, now!
The structure is different from the previous VM, so I wasn't sure, but I saw in the documentation that everything is now in the same new folder: /Home/VirtualBox VMs/My_VM.
In the VirtualBox GUI, I went to File > Virtual Media Manager, chose my VDI, clicked released, remove, don't erase file. I moved the VDI to the correct folder, added the VDI again through Storage in the Configuration window, and everything is working fine!!
I know this must seem like very easy stuff to people used to this, but it took me quite some time to figure out! But I'm glad it all worked out, and I learned a lot by doing this!
Thank you for your help!
