Honor Guest IDE/SATA Flush Requests
Issue:
VirtualBox ignores IDE/SATA disk flush requests.
Cause:
This is by design. To improve performance VirtualBox ignores these requests. This can create an issue with filesystems that do not have fsck-like tools (ZFS is an example) create a situation where the on disk information is inconsistent due to data held in RAM.
Solution:
To enable flushing for IDE disks, issue the following command:
"VBoxInternal/Devices/piix3ide/0/LUN#[x]/Config/IgnoreFlush" 0
The value [x] that selects the disk is 0 for the master device on the first channel, 1 for the slave device on the first channel, 2 for the master device on the second channel or 3 for the master device on the second channel.
To enable flushing for SATA disks, issue the following command:
"VBoxInternal/Devices/ahci/0/LUN#[x]/Config/IgnoreFlush" 0
The value [x] that selects the disk can be a value between 0 and 29.
Reference: http://www.virtualbox.org/manual/UserManual.html#id2499944
Shrink VirtualBox vdisks After Freeing Space (Windows guests)
Issue:
On dynamically allocated vdisks, freed space on a guest is never released back to the host once freed.
Cause:
This is by design.
Resolution:
The procedure for shrinking (compacting in VirtualBox parlance) is straightforward and consists of a series of steps.
- Delete files on the guest to achieve the desired amount of free space
- Zero free space out with an appropriate utility
- Shut down guest
- Compact disk
Zeroing guest free space is simple: Microsoft provides an excellent utility through its Sysinternals group called SDelete. Download the program, extract it from the archive, and execute it on the disk to be zeroed. Note: this procedure only zeroes free space.
One the zeroing procedure is completed, you may power off the guest and compact the virtual disk from the command line.
Note: This was tested against VirtualBox 3.0.4 r50677
References:
SDelete
Install VMware Tools on a Gentoo Guest
- emerge pciutils mkinitrd
- mkdir /etc/rc.d
- cd /etc/rc.d
- for i in `seq 0 6`; do mkdir rc$i.d; done
- File -> Install VMware Tools
- mount /mnt/cdrom
- cd /tmp
- tar xvfz /mnt/cdrom/VMwareTools-3.5.0-158874.tar.gz
- cd vmware-tools-distrib/
- ./vmware-install.pl
- All defaults with the exception of:
/etc/rc.d -> location of the rc.d directories
/etc/init.d -> location of the init scripts - When prompted to run vmware-tools-config, decline
- rc-update add vmware-tools default
- /usr/bin/vmware-config-tools.pl
- Verify that everything compiles without error
- Reboot
- Verify that VMware tools are reported as running in the VI console
Note: This was tested and found working under VMware VI 3.5.x with Gentoo x86_64, kernel 2.6.27-gentoo-r8.
Where to score xVM Guest Additions
A simple google search for "xVM Guest Additions" will yield a few links. As of 6 July 2009, Sun has made available an early access version of the additions.
It may be found here.
Change the UUID of a VirtualBox vdi disk file
You use the VBoxManage command with the clonehd argument.
VBoxManage clonehd