Archive

Archive for the ‘Virtualization’ Category

Making a button to start a virtual machine

I like to make frequent operations as simple as possible. As I work with virtual machines a lot, it’s nice to have a button on the upper panel to launch the VM with a single click.
1. Right-click on the upper panel and select ‘Add to panel’.

2. Create a custom application launcher.

3. In the ‘Command’ field enter:

VBoxManage startvm 'Windows XP'

Windows XP is the name of your virtual machine (quotation marks are only needed if it consists of two or more words).
4. Click the launcher icon to change it to something less generic.

5. The result:

Optimize disk usage in virtual Windows

Dynamically expanding virtual hard disks tend to become bloated, but it is possible to shrink them.

1. Download the SDelete utility. Save it on C:\ for simplicity’s sake.

2. Run

sdelete -c C:

in command prompt on your guest Windows (I still use Windows XP, Vista or 7 may be different in that regard). That command marks all unused clusters on C:\ as free.

3. Shut down your guest machine and run the following command in terminal on your host:

VBoxManage modifyvdi /media/share/virtualbox/1C.vdi compact

Thanks to Ivan Femia for that trick.

Categories: Virtualization Tags: ,