I created I a ubuntu 16.04 vm with a kickstart file using the following xml

<domain type="kvm">
<name>""" + name + """</name>
<memory unit='GB'>1</memory>
<vcpu>1</vcpu>
<os>
  <type arch='x86_64' machine='pc'>hvm</type>
  <kernel>/var/lib/libvirt/media/./casper/vmlinuz.efi</kernel>
  <initrd>/var/lib/libvirt/media/./casper/initrd.lz</initrd>
  <cmdline>console=ttyS0 ks=https://pastebin.com/raw/6TznVUuN</cmdline>
</os>
<iothreads>1</iothreads>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>preserve</on_crash>
<devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/var/lib/libvirt/pool/""" + name + """.img'/>
      <target dev='vda' bus='virtio'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/var/lib/libvirt/iso/ubuntu-16.04.3-desktop-amd64.iso'/>
      <target dev='hdb' bus='virtio'/>
    <readonly/>
    </disk>
    <interface type='bridge'>
      <source bridge='br0'/>
      <model type='virtio'/>
    </interface>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0' keymap='en-us'/>
  </devices>
</domain>

But when I try and boot the VM it gets stuck on a screen that says

SeaBIOS (version 1.10.2-1ubuntu1)
Machine UUID (then id)

IPXE (url, etc..)

Booting from ROM...

When I check the error log of the vm it shows this only

2018-03-07 11:30:04.304+0000: starting up libvirt version: 3.6.0, package: 1ubuntu5 (Christian Ehrhardt <christian.ehrhardt@canonical.com> Thu, 28 Sep 2017 08:18:10 -0400), qemu version: 2.10.1(Debian 1:2.10+dfsg-0ubuntu3), hostname: john-XPS-13-9343
LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin QEMU_AUDIO_DRV=none /usr/bin/qemu-system-x86_64 -name guest=loaderless,debug-threads=on -S -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-3-loaderless/master-key.aes -machine pc-i440fx-2.10,accel=kvm,usb=off,dump-guest-core=off -m 954 -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -object iothread,id=iothread1 -uuid 1630b530-3291-4168-a4c0-ec231333c6b4 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-3-loaderless/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -no-acpi -boot strict=on -kernel /var/lib/libvirt/media/./casper/vmlinuz.efi -initrd /var/lib/libvirt/media/./casper/initrd.lz -append 'console=ttyS0 ks=https://pastebin.com/raw/6TznVUuN' -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/var/lib/libvirt/pool/loaderless.img,format=raw,if=none,id=drive-virtio-disk0 -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -drive file=/var/lib/libvirt/iso/ubuntu-16.04.3-desktop-amd64.iso,format=raw,if=none,media=cdrom,id=drive-virtio-disk1,readonly=on -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk1,id=virtio-disk1 -netdev tap,fd=25,id=hostnet0,vhost=on,vhostfd=27 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:f8:96:69,bus=pci.0,addr=0x3 -vnc 0.0.0.0:0 -k en-us -device cirrus-vga,id=video0,bus=pci.0,addr=0x2 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6 -msg timestamp=on
warning: host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]
  • You seem to have set up a BIOS booting VM, but expect to boot a kernel with UEFI. Something went terribly wrong here. Open up virt-manager and try re-creating the VM. – Michael Hampton Mar 7 at 17:23
  • @MichaelHampton I'm trying to make this with libvirt and xml. I tried mounting the iso file to the media directory as shown here[askubuntu.com/a/193632/525195] and then grabbing the vmlinuz.efi and initrd from the mount spot – nadermx Mar 8 at 14:14
  • OK, well then please use virt-install to generate the XML. You're just going to save yourself a lot of trouble. – Michael Hampton Mar 8 at 17:32

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.