Showing posts with label Windows 7. Show all posts
Showing posts with label Windows 7. Show all posts

Saturday, June 4, 2011

Compacting a Windows 7 Virtualbox vdi Disk Image

When you add data within a dynamically-sized Guest OS, the vdi file gets larger in the Host OS. When you delete data from within the Guest OS, the vdi file does not get smaller but retains its size. You can compact it to reduce the size and save disk space.

Most of these steps I grabbed from oracle's blog: http://blogs.oracle.com/virtualbox/entry/how_to_compact_your_virtual

  1. Within the Guest OS, delete any files you don't need. Also, run a full system cleanup (I like bleachbit).
  2. Defrag using whatever tool you prefer (I used Smart Defrag)
  3. Download SDelete, and run the following command to zero out free space:
sdelete -c
  1. Shutdown the Guest OS.
  2. From the Host OS, run:
VBoxManage modifyhd Windows7.vdi --compact
And you're done!

Monday, April 25, 2011

VirtualBox - USB devices greyed out in Guest OS

Ubuntu 10.04 Host
VirtualBox 4.0.x
Windows 7 Guest


I had this problem previously (on a different OS install) running VirtualBox 3.x with a Windows XP Guest, and steps 1-2 below solved my problem.

This time, running VirtualBox 4.x with a Windows 7 Guest OS, I needed a 3rd step. Guest OS may not have mattered. Shortly after installing the new VirtualBox, I installed the VirtualBox Extension Pack to support USB 2.0 devices.

Following steps 1-2 removed the "greyed out" problem, but the USB devices would not mount and were inaccessible in the Guest OS. I had to open the Guest OS properties and enable the USB 2.0 (EHCI) Controller option.


Steps:
  1. Add your Ubuntu account to group "vboxusers". Go to System > Administration > Users and Groups - then click "Manage Groups", then double-click "vboxusers" then check/enable your account in there.
  2. Reboot (or maybe log out/in? - untested)
  3. Enable USB 2.0 in VirtualBox. Open VirtualBox (not Guest OS), click Settings button for Guest OS. Click USB. Check the Enable USB 2.0 (EHCI) Controller box.