virtual box stuck at "starting virtual machine" 0%

After upgrading to virtualbox 4.2.16 all of my VMs get stuck at launch.

I tried downgrading to 4.1.26, but I still get the same problem.

Screenshots: [window 1]()[window 2] (not enough rep to post images)

When I kill the stuck process I get the error "no error info"

Result Code: 
NS_ERROR_CALL_FAILED (0x800706BE)
Component: 
ProgressProxy
Interface: 
IProgress {c20238e4-3221-4d3f-8891-81ce92d9f913}

I've been trying to find the global settings for virtualbox to clear them and do another reinstall, but I've only found VM-specific settings.

The system it's running on is xubuntu 12.10. I tried one of the VMs on another computer and there was no issues, so I guess it has something to do with the actual virtualbox installation/config.


Solution 1:

In the system option you need to check the "use I/O APIC"

if you were using SATA interface as your storage, you need to check the "Use host I/O cache" option

Solution 2:

I had the same problem with VB 4.3.20 under Ubuntu 14.04.1 amd64. The VM images are on a BTRFS disk.

I resolved the problem by turning of the COW for the VM images and snapshot files.

You can turn off the copy-on-write feature of btrfs for single files by setting the NOCOW attribute. This usually done by running chattr +C filename. This only works on empty files, so you have to create an empty file, set NOCOW, copy the contents of the actuale file into the empty file, and rename. (see https://btrfs.wiki.kernel.org/index.php/FAQ#Can_copy-on-write_be_turned_off_for_data_blocks.3F)

There is also a VB bug report (https://www.virtualbox.org/ticket/11862) saying

On a linux machine with btrfs filesystem, installation of a guest goes just fine but at first restart the guest freezes with popup showing "20%" during launch phase. [...] I did some digging on the btrfs wiki and discovered that Copy-On-Write (COW) causes this pain for any virtualization solution.

To set the NOCOW flag, do

F=vmimage
T=tmpfile
touch $T
chattr +C $T
dd if=$F of=$T bs=1M
rm $F
mv $T $F

Use lsattr to check if C was set.