Delete your VM xml files on Hard Disk. They are located by default in C:\Users\YOUR_NAME\.VirtualBox\Machines
.
After deleting, you'll still receive strange erros messages in Virtualbox. This is because some info about your vms are inside C:\Users\YOUR_NAME\.VirtualBox\VirtualBox.xml
.
If you don't mind losing some global configuration in your VirtualBox, just delete this file. Virtualbox will create another if it doesn't exist.
If you just want to remove a specific VM, you have to edit Virtualbox.xml
in some xml editor (notepad is fine. notepad++ is better since it has syntax highlighting).
You'll find these fields:
<MachineRegistry>
<MachineEntry uuid="UUID" src="Machines\MACHINE_NAME\MACHINE_NAME.xml"/>
</MachineRegistry>
<MediaRegistry>
<HardDisks>
<HardDisk uuid="UUID" location="HardDisks\DISC_NAME.vdi" format="VDI" type="Normal"/>
</HardDisks>
<DVDImages>
<Image uuid="UUID" location="C:\IMAGES\IMAGE.iso"/>
</DVDImages>
<FloppyImages/>
</MediaRegistry>
Remove the MachineEntry from the desired VM. If you just have one VM and want to remove everything, just leave the tags empty. For example:
<MachineRegistry/>
<MediaRegistry>
<HardDisks/>
<DVDImages/>
<FloppyImages/>
</MediaRegistry>
...and you're done. I just tested everythong here and it works flawlessly. If you want to avoid problems, backup your xml configuration files from VirtualBox and specific VMs.
(I didn't mention about snapshots, but I believe it's the same principle.)
Best Answer
The command line tool
VBoxManage
will let you resize your guest's hard drive. Open up a command prompt/terminal/whatever for your host OS, and change to the folder where VirtualBox is installed ("C:\Program Files\VirtualBox" on Windows hosts). From there, runVBoxManage list hdds
to see a list of available hard drives. Find the drive that you want to resize and copy either it's full path (afterLocation
in the output) or UUID to your clipboard for the next command. Next, runVBoxManage modifyhd C:\Path\To\Drive.vdi --resize 30000
. Replace C:\Path\To\Drive.vdi with either UUID or the full path to your drive image. The number after--resize
is the new size in megabytes. If you want to go larger than 30 GB, feel free.Once that's complete, you still have to let your virtual machine know that the new space is available to use. For Win7, that's easiest to do from Disk Management.