Virt-manager no bootable device error

When I ran kali linux with virt manager, it ran well with no issues. When I shut it down and powered it back on, I was then met by a black screen saying “booting from hard drive, boot failed not a bootable disk” no bootable device. Did I do anything wrong here? I did not touch any of its configurations.

Can you post your config? Are you running BIOS or UEFI boot on Kali?

Config for kali? Where would I find that? I am running it on BIOS

Virt-Manager makes a config file that it uses to start a VM; should be in the same directory as your virtual disk. Sorry - haven’t run QEMU in a while so I can’t remember what it should look like.

I looked in /etc/libvirt and found a couple config files but none pertaining to kali. Would you want to see its XML that that virt manager shows in its configuration? It shows information on memory, drivers, etc.

Search under /etc/libvirt, the .xmls for your VMs should be there.


<domain type='kvm'>
  <name>kali</name>
  <uuid>fa15ef6d-e713-40cd-b706-4a5c3cc33d5f</uuid>
  <memory unit='KiB'>1048576</memory>
  <currentMemory unit='KiB'>1048576</currentMemory>
  <vcpu placement='static'>2</vcpu>
  <os>
    <type arch='x86_64' machine='pc-i440fx-6.1'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <vmport state='off'/>
  </features>
  <cpu mode='host-model' check='partial'/>
  <clock offset='utc'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <pm>
    <suspend-to-mem enabled='no'/>
    <suspend-to-disk enabled='no'/>
  </pm>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/var/lib/libvirt/images/kali.qcow2'/>
      <target dev='hda' bus='ide'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <target dev='hdb' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'/>
    <controller type='ide' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </controller>
    <interface type='network'>
      <mac address='52:54:00:4c:c6:fa'/>
      <source network='default'/>
      <model type='e1000'/>
      <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>
    <channel type='spicevmc'>
      <target type='virtio' name='com.redhat.spice.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='tablet' bus='usb'>
      <address type='usb' bus='0' port='1'/>
    </input>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type='spice' autoport='yes'>
      <listen type='address'/>
      <image compression='off'/>
    </graphics>
    <sound model='ich6'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </sound>
    <audio id='1' type='spice'/>
    <video>
      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <redirdev bus='usb' type='spicevmc'>
      <address type='usb' bus='0' port='2'/>
    </redirdev>
    <redirdev bus='usb' type='spicevmc'>
      <address type='usb' bus='0' port='3'/>
    </redirdev>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </memballoon>
  </devices>
</domain>

I had this happen once when I changed the disk interface from IDE to SATA. Nothing else jumps out at me.

I am running kali linux on virt-manager right now. Just to let you know. Sometimes also on a new install when you shutdown and then when you start it back up it will try to boot on the ISO again. It’s just a matter of shutting it down and going into the boot options and sata cdrom and making sure that the settings are correct for either booting off the ISO or booting from the virtio disk.

Hi, I think I can see what’s your problems. If I’m right you’re using UEFI to boot. This part hints that <type arch='x86_64' machine='pc-i440fx-6.1'>hvm</type> but the flash information is missing.

This is what your <os> config looks like.

  <os>
    <type arch='x86_64' machine='pc-i440fx-6.1'>hvm</type>
    <boot dev='hd'/>
  </os>

But this is what it should look like.

  <os>
    <type arch="x86_64" machine="pc-i440fx-6.1">hvm</type>
    <loader readonly="yes" type="pflash">/usr/share/edk2-ovmf/x64/OVMF_CODE.fd</loader>
    <nvram>/var/lib/libvirt/qemu/nvram/KaliLinux_VARS.fd</nvram>
  </os>

And you can access the XML straight from your virt-manager. Follow this path Edit → Preferences.

Click “[x] Enable XML editing” and click ok.

Now select your Kali virtual machine and click on open. Then click on the details button which is right next to the computer icon below the menu.
image

Then click on the XML section on the interface which will look like below.

From there you will be able to edit your XML and add that missing part. Once you’re done click Apply. I think this will solve your issue and let you boot in. But it’s strange o how that part got removed.

Hello, I have the exact same problem, but I can’t figure out what to change the xml file to.
This is my neofetch.

           `-mddhhhhhhhhhddmss`             link@link-a320ms2hv2 
        ./mdhhhhhhhhhhhhhhhhhhhhhh.         -------------------- 
     :mdhhhhhhhhhhhhhhhhhhhhhhhhhhhm`       OS: Lubuntu 22.04 LTS x86_64 
   :ymhhhhhhhhhhhhhhhyyyyyyhhhhhhhhhy:      Host: A320M-S2H V2 
  `odhyyyhhhhhhhhhy+-````./syhhhhhhhho`     Kernel: 5.15.0-35-generic 
 `hhy..:oyhhhhhhhy-`:osso/..:/++oosyyyh`    Uptime: 2 hours, 19 mins 
 dhhs   .-/syhhhhs`shhhhhhyyyyyyyyyyyyhs    Packages: 1958 (dpkg), 7 (snap) 
:hhhy`  yso/:+syhy/yhhhhhshhhhhhhhhhhhhh:   Shell: bash 5.1.16 
hhhhho. +hhhys++oyyyhhhhh-yhhhhhhhhhhhhhs   Resolution: 1920x1080 
hhhhhhs-`/syhhhhyssyyhhhh:-yhhhhhhhhhhhhh   DE: LXQt 0.17.1 
hhhhhhs  `:/+ossyyhyyhhhhs -yhhhhhhhhhhhh   WM: Openbox 
hhhhhhy/ `syyyssyyyyhhhhhh: :yhhhhhhhhhhs   Theme: Arc-Darker [GTK3] 
:hhhhhhyo:-/osyhhhhhhhhhhho  ohhhhhhhhhh:   Icons: Adwaita [GTK3] 
 sdhhhhhhhyyssyyhhhhhhhhhhh+  +hhhhhhhhs    Terminal: qterminal 
 `shhhhhhhhhhhhhhhhhhhhhhy+` .yhhhhhhhh`    Terminal Font: Ubuntu Mono 14 
  +sdhhhhhhhhhhhhhhhhhyo/. `/yhhhhhhhd`     CPU: AMD Ryzen 7 1700 (16) @ 3.000GHz 
   `:shhhhhhhhhh+---..``.:+yyhhhhhhh:       GPU: NVIDIA GeForce GTX 1060 6GB 
     `:mdhhhhhh/.syssyyyyhhhhhhhd:`         Memory: 3093MiB / 15947MiB 
        `+smdhhh+shhhhhhhhhhhhdm`
           `sNmdddhhhhhhhddm-`                                      
                                                                    

This is my xml file.

  <os>
    <type arch="x86_64" machine="pc-q35-6.2">hvm</type>
  </os>

It said boot from hd before but that disappeared after I added SATA cdrom as a boot option.

Welcome to :enos: forums. Please create a new post for your issue. You may link this previous issue for reference.

Also post hardware and boot logs as per:

It would also be great if you can post the terminal output when you run virt-manager.

I think you need to install EOS. :wink:

Thanks for the help but I have changed my OS. If this happens again I’ll install EOS or create a new thread.