Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

(SOLVED) Previously working Debian VM won't boot after adding CPU cores

Featured Replies

EDIT! Since this is my first post, it's waiting for moderator approval. While waiting, i solved the issue by recreating the VM.

1. Copied the disk image to a new folder

2. Created a new VM with the same settings as the broken one, selected the copied image instead of the original one

3. Started the VM. It booted to the shell again instead of the OS, but this time, it printed the disk information under "Mapping table". The broken VM prints nothing here.

4. Exited shell, went into OVMF boot manager and deleted all boot entries except the UEFI shell.

5. Manually created a new boot entry for the OS by browsing the file system and selecting shimx64.efi. The broken VM lists nothing in the File Explorer here!

6. Restarted the VM. Now it boots into the OS!

 

Sounds like for whatever reason, the original VM had issues getting the disk image mounted at boot. I hope this post might help someone else in the future!

 

Original post:

Hello, i could use some help figuring out why my Debian VM that hosts my NextCloud server won't boot anymore after shutting it down to add more CPU cores. I found some similar topics here on the forums, but none that quite fit my situation. My other two similar Debian VMs boot without issue. Rebooting the Unraid host machine had no effect.

 

What happened:

1. I shut down the VM as usual from the guest OS / Debian over SSH "shutdown now"

2. I edited the VM configuration in Unraid GUI: Logical CPUs 0,1 -> 0,1,2,3 (nothing else was changed)

3. I started up the VM, but noticed that i couldn't SSH back in to the server

4. Opened up VNC console from Unraid and noticed that the boot process had gone into the UEFI command line instead of the OS

5. Rebooted the server from Unraid GUI, same result.

6. Reverted the VM configuration back to cores 0,1 and started it again, same result.

 

If i exit out of the shell and go into the OVMF boot manager, i can see that the OS is first in the boot order and has a valid looking Device Path:
 

debian Device Path : HD(1,GPT,F1E1A478-D7A6-41A7-AB27-241CE480C85C,0x800,0x100000)/\EFI\debian\shimx64.efi

 

If i attempt to select this entry by pressing enter, the screen flashes for a frame or two but immediately returns to the boot manager menu screen. By whacking enter like a maniac i can barely see that the flashing screen says "Press any key to continue..." in the top left corner before returning.

 

Information about the image:
 

root@UNRAID:~# fdisk -l /mnt/user/domains/NextCloud/vdisk1.img
Disk /mnt/user/domains/NextCloud/vdisk1.img: 20 GiB, 21474836480 bytes, 41943040 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 1CA27056-1D41-4E7F-9CD0-8A7897344441

Device                                     Start      End  Sectors  Size Type
/mnt/user/domains/NextCloud/vdisk1.img1     2048  1050623  1048576  512M EFI System
/mnt/user/domains/NextCloud/vdisk1.img2  1050624 39942143 38891520 18.5G Linux filesystem
/mnt/user/domains/NextCloud/vdisk1.img3 39942144 41940991  1998848  976M Linux swap


root@UNRAID:~# qemu-img info /mnt/user/domains/NextCloud/vdisk1.img
image: /mnt/user/domains/NextCloud/vdisk1.img
file format: raw
virtual size: 20 GiB (21474836480 bytes)
disk size: 14 GiB

 

Using the above info i can mount the EFI partition in Unraid and see it's contents:
 

root@UNRAID:~# mount /mnt/user/domains/NextCloud/vdisk1.img /mnt/tempmount -o loop,offset=1048576,ro
root@UNRAID:~# ls -la /mnt/tempmount/EFI/debian
total 5968
drwxrwxrwx 2 root root    4096 Jul 26 11:22 ./
drwxrwxrwx 3 root root    4096 Jul 26 11:21 ../
-rwxrwxrwx 1 root root     108 Jul 26 11:22 BOOTX64.CSV*
-rwxrwxrwx 1 root root   87328 Jul 26 11:22 fbx64.efi*
-rwxrwxrwx 1 root root     117 Jul 26 11:22 grub.cfg*
-rwxrwxrwx 1 root root 4199872 Jul 26 11:22 grubx64.efi*
-rwxrwxrwx 1 root root  849616 Jul 26 11:22 mmx64.efi*
-rwxrwxrwx 1 root root  948768 Jul 26 11:22 shimx64.efi*

 

VM Configuration XML:

<?xml version='1.0' encoding='UTF-8'?>
<domain type='kvm'>
  <name>NextCloud</name>
  <uuid>96dd8ed6-a79c-689b-8da7-d7df0fa21636</uuid>
  <metadata>
    <vmtemplate xmlns="unraid" name="Debian" icon="debian.png" os="debian"/>
  </metadata>
  <memory unit='KiB'>4194304</memory>
  <currentMemory unit='KiB'>2097152</currentMemory>
  <memoryBacking>
    <nosharepages/>
  </memoryBacking>
  <vcpu placement='static'>2</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='0'/>
    <vcpupin vcpu='1' cpuset='1'/>
  </cputune>
  <os>
    <type arch='x86_64' machine='pc-q35-7.2'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
    <nvram>/etc/libvirt/qemu/nvram/96dd8ed6-a79c-689b-8da7-d7df0fa21636_VARS-pure-efi.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-passthrough' check='none' migratable='on'>
    <topology sockets='1' dies='1' cores='2' threads='1'/>
    <cache mode='passthrough'/>
  </cpu>
  <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>restart</on_crash>
  <devices>
    <emulator>/usr/local/sbin/qemu</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/user/domains/NextCloud/vdisk1.img'/>
      <target dev='hdc' bus='virtio'/>
      <serial>vdisk1</serial>
      <boot order='1'/>
      <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
    </disk>
    <controller type='pci' index='0' model='pcie-root'/>
    <controller type='pci' index='1' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='1' port='0x8'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/>
    </controller>
    <controller type='pci' index='2' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='2' port='0x9'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <controller type='pci' index='3' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='3' port='0xa'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='pci' index='4' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='4' port='0x13'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/>
    </controller>
    <controller type='pci' index='5' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='5' port='0x14'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x4'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
    </controller>
    <controller type='sata' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    </controller>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x2'/>
    </controller>
    <filesystem type='mount' accessmode='passthrough'>
      <source dir='/mnt/user/NextCloud'/>
      <target dir='NextCloud'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
    </filesystem>
    <interface type='bridge'>
      <mac address='52:54:00:8f:d6:d6'/>
      <source bridge='br0'/>
      <model type='virtio-net'/>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' 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='unix'>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <channel type='qemu-vdagent'>
      <source>
        <clipboard copypaste='yes'/>
        <mouse mode='client'/>
      </source>
      <target type='virtio' name='com.redhat.spice.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='2'/>
    </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='vnc' port='-1' autoport='yes' websocket='-1' listen='0.0.0.0' keymap='fi'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
    <audio id='1' type='none'/>
    <video>
      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
    </memballoon>
  </devices>
</domain>

 

Edited by xMikael
Solved while waiting for approval.

  • xMikael changed the title to (SOLVED) Previously working Debian VM won't boot after adding CPU cores
  • 2 weeks later...

I have this exact problem, all I did was change core allocation and the EFI boot broke.

 

EDIT: Ok, fixed by reinstalling grub over the top of the existing installation using a debian live CD.

 

sudo fdisk -l

sudo apt install grub-efi
sudo mkdir /mnt/root && sudo mount /dev/sda1 /mnt/root
sudo mkdir /mnt/efi && sudo mount /dev/sda2 /mnt/efi
sudo grub-install --target=x86_64-efi /dev/sda2 --efi-directory=/mnt/efi --boot-directory=/mnt/root/boot

 

Edited by taylorthurlow

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.