Jump to content

Functionnal VM won't boot anymore (stuck on autoboot)


Recommended Posts

Hi all,

 

I have Home Assistant running on a VM for 18months and today, as I rebooted it, it won't start again.

 

Here is what I will show when booting:

image.png.24561f5c7cf921afd63af0c1e386b5f5.png

 

It will stay like that forever and load the CPU to 100%.

 

The log is the following:

 

-uuid 07a513e2-aa45-6f97-a9b0-1b827a3465e5 \
-no-user-config \
-nodefaults \
-chardev socket,id=charmonitor,fd=31,server,nowait \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=utc,driftfix=slew \
-global kvm-pit.lost_tick_policy=delay \
-no-hpet \
-no-shutdown \
-boot strict=on \
-device pcie-root-port,port=0x13,chassis=4,id=pci.4,bus=pcie.0,addr=0x2.0x3 \
-device pcie-root-port,port=0x14,chassis=5,id=pci.5,bus=pcie.0,addr=0x2.0x4 \
-device pcie-root-port,port=0x10,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x2 \
-device pcie-root-port,port=0x11,chassis=2,id=pci.2,bus=pcie.0,addr=0x2.0x1 \
-device pcie-root-port,port=0x12,chassis=3,id=pci.3,bus=pcie.0,addr=0x2.0x2 \
-device ich9-usb-ehci1,id=usb,bus=pcie.0,addr=0x7.0x7 \
-device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pcie.0,multifunction=on,addr=0x7 \
-device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pcie.0,addr=0x7.0x1 \
-device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pcie.0,addr=0x7.0x2 \
-device virtio-serial-pci,id=virtio-serial0,bus=pci.2,addr=0x0 \
-blockdev '{"driver":"file","filename":"/mnt/user/domains/Hassos/hassos_ova-5.13.qcow2","node-name":"libvirt-1-storage","cache":{"direct":false,"no-flush":false},"auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-1-format","read-only":false,"cache":{"direct":false,"no-flush":false},"driver":"qcow2","file":"libvirt-1-storage","backing":null}' \
-device virtio-blk-pci,bus=pci.3,addr=0x0,drive=libvirt-1-format,id=virtio-disk2,bootindex=1,write-cache=on \
-netdev tap,fd=33,id=hostnet0 \
-device virtio-net,netdev=hostnet0,id=net0,mac=52:54:00:fa:6c:5e,bus=pci.1,addr=0x0 \
-chardev pty,id=charserial0 \
-device isa-serial,chardev=charserial0,id=serial0 \
-chardev socket,id=charchannel0,fd=35,server,nowait \
-device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 \
-device usb-tablet,id=input0,bus=usb.0,port=1 \
-vnc 0.0.0.0:0,websocket=5700 \
-k fr \
-device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vram64_size_mb=0,vgamem_mb=16,max_outputs=1,bus=pcie.0,addr=0x1 \
-device usb-host,hostbus=1,hostaddr=10,id=hostdev0,bus=usb.0,port=2 \
-device virtio-balloon-pci,id=balloon0,bus=pci.4,addr=0x0 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
2022-05-12 09:38:51.150+0000: Domain id=5 is tainted: high-privileges
2022-05-12 09:38:51.150+0000: Domain id=5 is tainted: host-cpu
char device redirected to /dev/pts/0 (label charserial0)

 

 

Any idea?

 

Thanks :)

 

Edited by mathgoy
Link to comment

It seems the vm didn't shutdown properly/gracefully.

One user is reporting the following steps to work:

1. At the “Autoboot” screen, draw focus to your vm and press the number “2” on the keyboard

1111.png.89db9f8980e43ddd46ba1123973d2338.png

 

2. When the next screen is displayed, press the “Enter/Return” key:

2222.png.d38263d6107aed41c97deb0b2aef28a1.png

 

3. Once this next screen appears, the HA vm will start normally:

3333.png.cf5ec94f5d88d64beb72c147059699a1.png

 

From there, by shutting down and/or restarting the HA vm properly/gracefully, the vm should boot again without any issues from then on out.

 

Credits to Mark Bielech (mbielech5):

https://community.home-assistant.io/t/vm-stuck-at-auto-boot/376886/14

Link to comment

Looks like I might run out of space:

image: /mnt/user/domains/Hassos/hassos_ova-5.13.qcow2
file format: qcow2
virtual size: 32 GiB (34359738368 bytes)
disk size: 31.4 GiB
cluster_size: 65536
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false

 

 

How can I increase the size?

Link to comment

With qemu-img:

qemu-img resize /mnt/user/domains/Hassos/hassos_ova-5.13.qcow2 +10G

this will increase the disk size from 32 to 42 Gb (+10).

However, the +10Gb space will be unallocated.

So you need to mount this virtual disk and resize the partition to use this unallocated space.

You can create a new virtual machine which boots a gparted live iso with the hassos_ova-5.13.qcow2 disk attached to it.

Link to comment
1 hour ago, ghost82 said:

You can create a new virtual machine which boots a gparted live iso with the hassos_ova-5.13.qcow2 disk attached to it.

I recommend creating a permanent "utility" VM with all the toys and tools installed on its vdisk, then temporarily attach the vdisks you need to operate on as secondary disks. Much easier to manage boot order, and almost no chance of accidentally booting the target vdisk with the wrong XML by mistake. Plus, you can install quite the array of solutions, you aren't locked into just gparted.

  • Like 1
Link to comment

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...