Deleting partition within XP VM [solved]

Discussions about using Windows guests in VirtualBox.
Post Reply
John-Billmer
Posts: 16
Joined: 17. Nov 2008, 20:16
Primary OS: Mac OS X Leopard
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win XP SP3
Location: Hamburg, Germany

Deleting partition within XP VM [solved]

Post by John-Billmer »

Hi folks,

simple question (just got confused over breakfast...): I have an XP Pro VM with two partitions, C=system and D=data. I like to get rid of my data partition since I have the data now on my shared drive with the host and could shrink the VM.

Am I right, that this would be a solely XP operation I need to do [u]within[/u] the guest (e.g. with Windows disk management tool)?

Thanks for your help!

John
Last edited by John-Billmer on 27. Feb 2011, 13:40, edited 1 time in total.
running my old XP Pro system virtualized on my new Mac (P2V) as .vdi
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Deleting partition within XP VM

Post by Sasquatch »

Yes, you need to do it there. If you want to use the partition space for the C: drive, then use a partitioning tool instead to do both operations at the same time (sequential, else it will blow up :P). Gparted is a great tool for that.
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.
John-Billmer
Posts: 16
Joined: 17. Nov 2008, 20:16
Primary OS: Mac OS X Leopard
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win XP SP3
Location: Hamburg, Germany

Re: Deleting partition within XP VM

Post by John-Billmer »

Thanks for your quick reply - bedankt!
I was actually thinking of shrinking the entire VM through the VBoxManager (have seen some posts around, if I cannot use the command line will use mpack´s GUI tool) to have more space on my host. Should be easy, shouldn´t it?

John
running my old XP Pro system virtualized on my new Mac (P2V) as .vdi
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Deleting partition within XP VM

Post by Sasquatch »

Yes, should be easy indeed. Mpack's tool is perfect for this, because you can't easily zero-fill unallocated space that's needed for the modifyhd --compact option. Even when you remove a partition, it's data will still be noted as written. Only the MFT is gone, so you can't directly see the data again and when a new partition gets created, a new empty MFT is created as well.
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.
John-Billmer
Posts: 16
Joined: 17. Nov 2008, 20:16
Primary OS: Mac OS X Leopard
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win XP SP3
Location: Hamburg, Germany

Re: Deleting partition within XP VM [solved]

Post by John-Billmer »

Hi Sasquatch,

about to do the shrinking and read a little in the forum section of vditool. Seems I need a little read before actually do the trick. There are numerous posts about consolidating the VM first etc. and I couldn´t find the shrink button either. But I am confident I will get there :D

Cheers

John
running my old XP Pro system virtualized on my new Mac (P2V) as .vdi
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Deleting partition within XP VM [solved]

Post by mpack »

VDITool is something different - and is long obsolete. CloneVDI (see sticky at top of "Windows Hosts") will do the job as Sasquatch already said. Please don't confuse yourself by reading obsolete posts - no preparation is necessary before using the "Compact" option in CloneVDI. And no damage can be done, because as the name implies, CloneVDI always works on a clone - so you always have the unmodified original to go back to if need be.
John-Billmer
Posts: 16
Joined: 17. Nov 2008, 20:16
Primary OS: Mac OS X Leopard
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win XP SP3
Location: Hamburg, Germany

Re: Deleting partition within XP VM [solved]

Post by John-Billmer »

Hi MPack,

Thanks for that hint. One interesting thing, though: in the VB Manager it says that under hard drive "primary master: xy.vdi, normal 240 GB". When I check with Disc Director WITHIN the guest it detects the same size, so I could delete my unused partitions and now have one system partition in my guest (20 GB) plus 220 GB unallocated space. This is the reason I asked for a way of shrinking.

However, when checking on my HOST with a disc viewer (in my case JDiskReport) the VM is in total only 35 GB. That´s weired, isn´t it.

The question is: what consequences could that have for the guest? Is it blowing up at some point or are there just some numbers not in sync?

Thanks for your help

John
running my old XP Pro system virtualized on my new Mac (P2V) as .vdi
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Deleting partition within XP VM [solved]

Post by mpack »

No, that is not unusual, it's a natural consequence of using dynamically allocated (i.e. allocated on demand) virtual disk blocks. 240GB is the size of the drive, which is also therefore the maximum size of the VDI file. The actual size of the VDI file depends on the most data it has been asked to store so far at any one time. Using the CloneVDI tool with Compact option resets the VDI file size to the minimum it needs right now.
John-Billmer
Posts: 16
Joined: 17. Nov 2008, 20:16
Primary OS: Mac OS X Leopard
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win XP SP3
Location: Hamburg, Germany

Re: Deleting partition within XP VM [solved]

Post by John-Billmer »

Thanks for your quick reply. Now I do have a question (sorry for bloating this closed thread, should have opened a new one within the sticky):
If I understand correctly, CloneVDI would compact the physical 35 GB to maybe physical 20 GB (which is what the guest system maybe only needs or is), but I hope it would not limit the virtual maximum size of 240 GB, since I like to keep the possibility to have the system grow without enlarging partitions or the VM-file again.

Thanks for your help!

John
running my old XP Pro system virtualized on my new Mac (P2V) as .vdi
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Deleting partition within XP VM [solved]

Post by mpack »

Correct - CloneVDI will not change the virtual (or maximum) drive size unless you explicitly tell it to.
John-Billmer
Posts: 16
Joined: 17. Nov 2008, 20:16
Primary OS: Mac OS X Leopard
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win XP SP3
Location: Hamburg, Germany

Re: Deleting partition within XP VM [solved]

Post by John-Billmer »

Thanks for that note. Unfortunately, the tool lets me start the cloning (validation result ok, the proceed button looks "pressed"), but than just hibernates. I had it run for a couple of hours, but neither can I see any progress bar (proceed button stays pressed), nor is a file in my directory created. Mind you, I am working with Winebottler since I read in the main thread that Wine works ok.

Best regards

John
running my old XP Pro system virtualized on my new Mac (P2V) as .vdi
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Deleting partition within XP VM [solved]

Post by mpack »

Sorry, Winebottler is beyond my ken, and likely to remain so. There is however a thread in the Mac guests forum by someone who appears to have got it working. Perhaps you should get together with him to find out the details.
John-Billmer
Posts: 16
Joined: 17. Nov 2008, 20:16
Primary OS: Mac OS X Leopard
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win XP SP3
Location: Hamburg, Germany

Re: Deleting partition within XP VM [solved]

Post by John-Billmer »

Hurray, it now worked. The solution really was to merge all snapshots. After I had done that, your tool, mpack, worked flawlessly and quick. It also compressed my image about the expected size. Thanks for all the help. So it does work fine with Wine :-)

Unfortunately, I will have to fiddle around a bit to get the compressed image working, since I get the error "Fatal. No bootable medium found. System halted." When cloning I have chosen the options "Generate New UUID", since I was to start a new VM, and the option "Compress", of course. I have tried it twice now without success. Any ideas?

Best

John
running my old XP Pro system virtualized on my new Mac (P2V) as .vdi
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Deleting partition within XP VM [solved]

Post by mpack »

"FATAL: No Bootable Medium Found" invariably means what it says: it means that none of the drives attached to the VM are bootable, and the message can be caused by many things. Common reasons are (1) that you failed to merge the snapshots in a VM correctly (i.e. you cloned a base VDI which to get this message would have to be essentially blank). (2) That you neglected to mount the correct hdd in the correct VM.

UUID keep/change is not relevant here. The wrong UUID would make VBox media manager complain about a disk being registered twice. The "No bootable medium found" message is not a disk management error, it is the virtual BIOS failing to find a drive to boot from.
John-Billmer
Posts: 16
Joined: 17. Nov 2008, 20:16
Primary OS: Mac OS X Leopard
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win XP SP3
Location: Hamburg, Germany

Re: Deleting partition within XP VM [solved]

Post by John-Billmer »

Thanks for the hint. However, the merged vdi, which was subject to cloning and shrinking, still works flawlessly, so merging is not the reason. Still, I will do the process once again, merging my old backup-copy and clone and shrink that one. Will post my experience in due course.
Have a good rest of the weekend

John
running my old XP Pro system virtualized on my new Mac (P2V) as .vdi
Post Reply