0

I am having issues with the booting debian or ubuntu netinstall images when using libvirtd, I get the menu, but simply get this when selecting the menu optiont o install:

loading /install.amd/vmlinuz failed: No such file or directory

I have mounted the iso and verified that the debian netinstall iso has the vmlinuz file e.t.c inside the install.amd directory.

This is the libvirtd xml for the domain i am using when it fails:


<domain type='kvm'>
  <name>myserver</name>
  <uuid>d85a11d4-78d8-2425-527b-2adef6c952a9</uuid>
  <memory unit='KiB'>18192</memory>
  <currentMemory unit='KiB'>18192</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <os>
    <type arch='x86_64' machine='pc-i440fx-5.2'>hvm</type>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <cpu mode='custom' match='exact' check='none'>
    <model fallback='forbid'>qemu64</model>
  </cpu>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
  <emulator>/usr/bin/qemu-system-x86_64</emulator>
  <disk type='file' device='cdrom'>
    <driver name='qemu' type='raw'/>
    <source file="/var/lib/libvirt/boot/debian-11.3.0-amd64-netinst.iso"/>
     <target dev='hda' bus='ide'/>
     <readonly/>
    <boot order='2'/>
  </disk>

  <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='none'/>
      <source file='/opt/storage/VMs/myserver.qcow2'/>
      <target dev='vdb' bus='virtio'/>
      <boot order='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </disk>
    <controller type='usb' index='0' model='piix3-uhci'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'/>
    <controller type='scsi' index='0' model='lsilogic'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </controller>
    <interface type='network'>
      <mac address='52:54:00:4c:d1:73'/>
      <source network='net-simplebridge'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target type='isa-serial' port='0'>
        <model name='isa-serial'/>
      </target>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <input type='keyboard' bus='usb'>
      <address type='usb' bus='0' port='1'/>
    </input>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'>
      <listen type='address' address='127.0.0.1'/>
    </graphics>
    <video>
      <model type='vga' vram='8192' heads='1' primary='yes'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </memballoon>
    <rng model='virtio'>
      <backend model='random'>/dev/random</backend>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </rng>
  </devices>
</domain>

The xml above will end up in this :

/usr/bin/qemu-system-x86_64 -name guest=myserver,debug-threads=on -S -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-1-myserver/master-key.aes -machine pc-i440fx-5.2,accel=kvm,usb=off,dump-guest-core=off,memory-backend=pc.ram -cpu qemu64 -m 18 -object memory-backend-ram,id=pc.ram,size=18874368 -overcommit mem-lock=off -smp 1,sockets=1,cores=1,threads=1 -uuid d85a11d4-78d8-2425-527b-2adef6c952a9 -no-user-config -nodefaults -chardev socket,id=charmonitor,fd=34,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -boot strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device lsi,id=scsi0,bus=pci.0,addr=0x4 -blockdev {"driver":"file","filename":"/var/lib/libvirt/boot/debian-11.3.0-amd64-netinst.iso","node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"} -blockdev {"node-name":"libvirt-2-format","read-only":true,"driver":"raw","file":"libvirt-2-storage"} -device ide-cd,bus=ide.0,unit=0,drive=libvirt-2-format,id=ide0-0-0,bootindex=2 -blockdev {"driver":"file","filename":"/opt/storage/VMs/myserver.qcow2","node-name":"libvirt-1-storage","cache":{"direct":true,"no-flush":false},"auto-read-only":true,"discard":"unmap"} -blockdev {"node-name":"libvirt-1-format","read-only":false,"cache":{"direct":true,"no-flush":false},"driver":"qcow2","file":"libvirt-1-storage","backing":null} -device virtio-blk-pci,bus=pci.0,addr=0x5,drive=libvirt-1-format,id=virtio-disk1,bootindex=1,write-cache=on -netdev tap,fd=36,id=hostnet0,vhost=on,vhostfd=37 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:4c:d1:73,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -device usb-kbd,id=input0,bus=usb.0,port=1 -vnc 127.0.0.1:0 -device VGA,id=video0,vgamem_mb=8,bus=pci.0,addr=0x2 -device virtio-ba

When executing this manually it works fine on the same machine though, and gets me to the installation process ok:

qemu-system-x86_64 -vnc :0 -enable-kvm -serial stdio -curses -hda /opt/storage/VMs/myserver.qcow2 -m 2G -boot d -cdrom /var/lib/libvirt/boot/debian-11.3.0-amd64-netinst.iso

Is it possible to just get the "-cdrom" flag with libvirtd xml configuration ? Or any other suggestions ?

1 Answer 1

1

<memory unit='KiB'>18192</memory>

You've given the VM a mere 18 MB of memory here, compared to 2 GB when launching it directly with QEMU. I expect it has insufficient RAM to load the initrd.

<cpu mode='custom' match='exact' check='none'><model fallback='forbid'>qemu64</model></cpu>

Unrelated to your problem, but worth changing none the less, because qemu64 will give awful performance. Either pick a modern model name that resembles your host OS, or change it to use mode='host-passthrough or mode=host-model.

1
  • Ah, ut was supposed to be gigabyte's. Thanks !
    – Eliazz
    Apr 27, 2022 at 11:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .