Kernel panic after resizing a clone

ramle

New Member
Aug 1, 2021
1
0
1
32
I've tried to clone a template vm and resize it's disk. At first, the clone start-up with a kernel panic. If I stop it by force and then restart it, the clone boots correctly. I've tried Ubuntu 20.04 and Debian 10. This is not a problem with the disk and I have tried remote storage with NFS and multiple HDDs.
 
Last edited:
Hey,

Facing this same issue with Debian 11.

Any idea?
 

Attachments

  • photo_2021-12-10_10-50-03.jpg
    photo_2021-12-10_10-50-03.jpg
    95.2 KB · Views: 53
I have the same issue, only on Debian 11. I don't have any issues with Almalinux/Ubuntu.
 
Last edited:
Same issue here. Debian 11. kernel panic on first boot of a template clone with vm resize.
 
what is your doing. which commands you use? which tool?
this problem ist a very important one.
 
I don't know about the others, but I'm using the Ubuntu 22.04 cloudimg image, and I'm running (after cloning):
Bash:
qm resize $vmid scsi0 3G
The command is succesful, but on the first boot, I get a kernel Panic. After a qm reset $vmid, it works just fine, with the new disk size...
 
Last edited:
tja, i ask myself why the staff is so silent
with almost zero information about the setup, its impossible to give advice.
 
Hi Tom,

I'm not sure what information you need but I'll try to provide it. I am running on latest 7, but recall having the same issue also with 6.4.

Steps taken:
  1. Use a cloud image, I use cloud images from https://cdimage.debian.org/cdimage/cloud/bullseye/latest/, dowload and add the disk to a vm.
  2. Go to Hardware in pve, resize the disk to add more space. This step is sometimes taken before first boot, after the machine has been running for a while or even after having resized the disk previously.
  3. The VM is (re)booted.
Expected result
  1. The VM boots into a login screen, the file system has been resized to fit the added space on the disk.
Actual result
  1. The VM stops at boot with the kernel panic, as seen in the message above from MikePT.
  2. I stop the VM using the stop button.
  3. The VM is started again.
  4. The VM boots into a login screen, the file system has been resized to fit the added space on the disk.
As such, there is an easy workaround that works consistently. I just have to start the VM twice after a resize instead of once.

But if there is an underlying issue or of if can just be resolved so we don't need to restart twice, it might be something to look into.
 
I'm having the exact same issue and been dealing with it for a long time now.
Again, the steps are very common thing to do:

1. Downloaded a cloudimg version of Debian from: https://cdimage.debian.org/cdimage/cloud/bullseye/latest/
2. Used qm import disk to import the disk image into an existing VM with no disk.
3. Attach the imported image as a disk to the VM using the WebUI
4. Using the WebUI, resize the disk by giving it extra 10-20GB of space.
5. Start the VM - Kernel panics
6. Reset the VM - Boots normally

This happens later on as well if I decide to give this VM some more space.
 
Hi,
this is very likely the same as https://bugs.launchpad.net/ubuntu/+source/cloud-initramfs-tools/+bug/1123220 and I don't think there's a real "fix" from the outside. The guest is configured to expect a serial console, so you should add one with qm set <ID> -serial0 socket (or change the default kernel commandline to not expect one, but that would need to be done inside the image).
 
  • Like
Reactions: achina
Hi,
this is very likely the same as https://bugs.launchpad.net/ubuntu/+source/cloud-initramfs-tools/+bug/1123220 and I don't think there's a real "fix" from the outside. The guest is configured to expect a serial console, so you should add one with qm set <ID> -serial0 socket (or change the default kernel commandline to not expect one, but that would need to be done inside the image).
Ah, I just tested this by adding a serial port and - viola! It was indeed the culprit. Who would've guessed it would've have something to do with not having a serial port. Anyway - I guess I'll just add the serial port to the template and be done with it for now. Thanks!
 
  • Like
Reactions: shabsta
Ah, I just tested this by adding a serial port and - viola! It was indeed the culprit. Who would've guessed it would've have something to do with not having a serial port. Anyway - I guess I'll just add the serial port to the template and be done with it for now. Thanks!
Wanted to add that this resolve the issue we had with Debian images - thanks for taking the time to post a work around.

Code:
[ end Kernel panic - not syncing: Attempted to kill init! exit
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!