15 - 12 - 2017

Running ESXi 5.1 on QEMU/KVM

You may want to run ESXi nested in QEMU/KVM but without re-compiling qemu source it's not possible. The try without the fix fails with pinky screen:

 

The issue is related to PIX controller emulation, to fix this qemu source has to be re-compiled.

Install openSUSE packages

$ zypper in -t pattern devel_basis rpmbuild 
$ zypper in SDL-devel alsa-devel bluez-devel brlapi-devel curl-devel cyrus-sasl-devel iasl dev86 gtk3-devel libattr-devel libcap-devel libcap-ng-devel libfdt1-devel libgnutls-devel libjpeg-devel libpcap-devel libpulse-devel libvdeplug3-devel python usbredir-devel vte-devel xen-devel libspice-server-devel spice-protocol-devel chpath texi2html pcutils-devel pulse-audio-libs-devel libiscsi-devel texinfo spice-protocol spice-server-devel libseccomp-devel ceph-devel systemtap systemtap-sdt-devel nss-devel xfsprogs-devel bluez-libs-devel libfdt-devel pixman-devel libusbx-devel vte3-devel librdmacm-devel 
$ zypper install -t srcpackage qemu

Modify QEMU source files

$ cd /usr/src/packages/SOURCES 
$ tar xvfj ./qemu-1.6.2.tar.bz2 
$ vi qemu-1.6.2/hw/i386/pc_piix.c

Change following line from:
LINE 185-6
    /* init basic PC hardware */
    
pc_basic_device_init(isa_bus, gsi, &rtc_state, &floppy, xen_enabled());
to 
LINE 185-6
    /* init basic PC hardware */
    pc_basic_device_init(isa_bus, gsi, &rtc_state, &floppy, TRUE);

$ tar cvjf ./qemu-1.6.2.tar.bz2 ./qemu-1.6.2

Change specification file for qemu compilation

$ cd /usr/src/packages/SPECS 
$ vi qemu.spec 
  add: 
  %define _unpackaged_files_terminate_build 0 
  %define _missing_doc_files_terminate_build 0

Recompile the source, and create new packages.

$ cd /usr/src/packages/SPEC 
$ rpmbuild -bb qemu.spec 
$ rpm -i --force /usr/src/packages/RPMS/qemu*.rpm

Configure and run ESXi VM

1. Make sure that interface used to emulate hard disk is IDE, it can be set in Virtual Machine Manager or qemu CLI using if=ide option. 
2. During boot menu of ESXi5.1, press TAB and add additional parameter "busSpeedMayVary=TRUE"

 

You should now be able to install the ESXI without issues.

Attachments:
Download this file (pc_piix.c)pc_piix.c[ ]21 kB
Download this file (qemu.spec)qemu.spec[ ]49 kB
Login Form