Posts Tagged ‘virtualbox’

How to set the BIOS time in Virtualbox

November 10, 2013 Leave a comment

Here is how to set the BIOS time of a Virtualbox machine at each start up:

#! /bin/sh
#2 minutes before next new year
newyear=$(date -d "2013-12-31 23:58:00" +%s)
now=$(date +%s)
VBoxManage modifyvm "My VM" --biossystemtimeoffset $offset
VBoxManage startvm "My VM"

Windows Seven 0x7B blue screen error in Virtualbox

November 10, 2013 Leave a comment

I’ve just converted a Windows Seven physical desktop to a virtual machine using VMware converter. It’s a great piece of software because it work at file system level so it can:

  • Create a unencryped VM of a Bitlocker encrypted physical machine
  • Save the image of a disk, on the disk it self.

The created image can be used in Virtualbox, but before doing so some disk drivers may need to be enabled else you’ll get a BSOD with:


It’s easier to enable the drivers from the physical system, before creating the disk image. To do so run regedit and set the following keys:

  • HKLM\System\ControlSet001\msahci\Start=0
  • HKLM\System\ControlSet001\intelide\Start=0

I guess that 0 mean enabled and 3 mean disabled. I’m almost sure that intelide is not required if you setup the virtual disk as a SATA device. I don’t know which one of ControlSet001 or ControlSet002 so I edited both.

If, as I did, you forgot to enable those drivers before creating the disk image, it’s possible to do it after. Although I’m sure it’s possible, I’ve not been able to do it from the recovery console. So I added the disk image to an other Windows Seven virtual machine, let’s say as the G:\ drive. Then:

  • Run regedit
  • Select a root key (any of them)
  • File, Load Hive, and select G:\Windows\System32\config\SYSTEM
  • Give a name, let’s say DUMMY
  • Edit the keys as previously explained
  • Select the DUMMY key, File, Unload Hive

VBoxAddIF no longer in Virtualbox 2.1.x

January 26, 2009 Leave a comment

In Virtualbox 2.1.x. available network modes are:

  • NAT which allows guest to see the Internet but no to be seen by the host
  • Host network which give the guest a public IP
  • Internal network which allows several virtual machines to see each other, but still not to be seen by the host

The VBoxAddIF as disappeared so network between host and guest is no longer supported as a native option of Virtualbox 2.1.x. It easy to replace it by a TUN/TAP interface. Here is a /etc/network/interface example to do so:

iface eth0 inet dhcp
#allow routing for vmware and vbox
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -A POSTROUTING -t nat -o eth0 -j MASQUERADE

iface tap0 inet static
pre-up tunctl -t tap0 -u xrunhprof

The virtual machine must then be configured to use a static IP from the 192.168.0.x range.