Skip to main content

Posts

Showing posts from September, 2018

Running an Ubuntu ppc64le virtual machine on x86

For an issue I'm debugging, I need a 64-bit little-endian powerpc machine. I don't have a physical one handy, so I wanted to run a virtual one on an x86 system. We can use qemu and libvirt for this. Unfortunately, it will be very slow - we have to use qemu's TCG mode rather than hardware assisted virtualisation because the guest (POWER) and host (amd64) are different. Fortunately, libvirt can work with these VMs like normal, which I find very helpful as it allows me to use tools like virsh and virt-manager, rather than dealing with qemu's inscrutable command line arguments. So I grabbed an Ubuntu ppc64el install ISO ( Xenial , Bionic ) and set to work. Here's the virt-install incantation derived from much accumulated wisdom amongst my former colleagues at OzLabs : virt-install --arch=ppc64le --name= GUESTVMNAME \ --os-variant=linux --boot menu=on \ --disk path= GUESTDISK .qcow2,size=20,format=qcow2,bus=virtio,cache=none,sparse=true \ --memory=4096  --