-fix- Linux and Grub wait forever after a hypervisor ACPI shutdown.

This is a designed-in feature of grub – useful if you’ve got a physical machine in front of you, as the linux box won’t automatically restart if someone kicks the power cable out or hits the off switch – and more importantly it won’t endlessly reboot if there’s a hardware problem, slowly shredding your file systems.

If you’re running Ubuntu as a headless virtual machine in the cloud, it’s not so useful. Disable it like this:

edit /etc/default/grub and add the line:


then sudo update-grub.

Next time you accidentally “sudo ip route flush table all” on your vm and acpi-restart it,  it’ll boot properly.





Use USB installation media with a Virtualbox VM

You want to create a Windows 7 virtual machine, on virtualbox, on your Mac.
Don’t ask why. The answer might include Visual Studio.
You have a sysprep’d Windows 7 USB drive full of installation extras, custom wim files… But the virtualbox GUI gives you no “boot from USB” option.

The workaround: Create a “stub” virtual disk file somewhere Virtualbox can read it that references the USB drive as a “raw” disk.

First, see what OSX thinks USB drive is called:
:~ username$ diskutil list
0: GUID_partition_scheme *1000.1 GB disk0
1: EFI 209.7 MB disk0s1
2: Apple_HFS osx 999.7 GB disk0s2
0: NO NAME *26.0 MB disk1
0: FDisk_partition_scheme *8.1 GB disk2


then create the vmdk:

VBoxManage internalcommands createrawvmdk -filename ~/test_usb_stub_disk2.vmdk -rawdisk /dev/disk2

Now attach the new stub disk to the same disk controller as the virtual machine’s main hard drive, using the next available SATA port (SATA Port 1 assuming the main drive is on SATA port 0 – if you don’t do this, removing your flash drive will make your VM unbootable and annoying to fix):

Screen shot 2013-07-10 at 18.37.49

…then start the virtual machine, clicking its pre-boot window immediately and using Function+F12 to open the boot menu which will give show you the virtual USB drive.

You should see the usual Windows installation prompts…

“Next >>”.

Virtio paravirtualised NIC drivers for Server 2008 / Win 7 on virtualbox

On your Virtualbox host; download the ISO of generic windows paravirtualised drivers from here:


Shut down your Windows VM and set your its Adapter Type to “virtio-net”.

Boot the Windows Vm and mount the downloaded driver ISO as a virtual CD drive.

Log on to the VM and check you can browse to the virtual CD’s \Win 7\[x86|amd64]\ folder; use devmgmt.msc to install the new drivers on the paravirtualised NIC hardware (“Trust software from Redhat”).

You shouldn’t need to to reboot.


OSX NFS Storage Repository for XenServer

Setting up an iso Storage Repository for my XenServer testbed. CIFS is an option, but after a couple of “SR_BACKEND_FAILURE_222Could not mount the directory specified in Device Configuration” errors, I decided to try NFS, telling myself that CIFS/SMB is an ugly way of connecting unix systems to each other anyway…

OSX supports NFS nicely, and there’s a good nagware GUI available from Breslink.com.

Five minutes later my CIFS share was available over NFS.

I caught the same “SR_BACKEND_FAILURE_222…” connecting from XenServer to the NFS share until I specified “Allow mounting the folder and any subfolders inside” in the share’s advanced options – which may well be where the CIFS sharing attempt failed. XenServer presumably tries to read every subfolder of a Storage Repository as it’s mounted. I’ll test later.

Incidentally, the minimum required security was “System Standard Only”. The only other non-default sharing option was limiting access rights to the local class C subnet.


Planning a Citrix / XenServer installation

http://project.citrix.com/ – a hosted project planning service better than any HOWTO I’ve come across yet.

It’ll be interesting to see how well it works for a small test-bed installation.

More details (if you want a more traditional, indexed approach):




Dual boot OSX and Xen Server

Based (hopefully very closely) on an existing HOWTO.

I have an excellent general purpose i7 machine that usually works as a Hackintosh; for the sake of desk space I want it to function as a Citrix VDI testbed.

Update: As osx86 doesn’t like VT-d and Citrix definitely does, I’m using BIOS profiles with separate boot device orders.