VMware Cloud Community
k5map
Enthusiast
Enthusiast
Jump to solution

Upgrading kernel on RPi virtual machines

When I built my ESXi host on my RPi 4 devices, I created several RPi virtual machines which used v5.10 kernel.  They have been running great but recently I noticed my physical RPi devices are now running kernel v6.1.  Does anyone know how to upgrade the kernel on the virtual machines from v5.10 to v6.1?

0 Kudos
1 Solution

Accepted Solutions
cyprienlaplace
VMware Employee
VMware Employee
Jump to solution

I checked earlier... and Debian Bookworm has it 😆

pi@raspberrypi:~ $ sudo apt install open-vm-tools
[sudo] password for pi:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
open-vm-tools is already the newest version (2:12.2.0-1).
open-vm-tools set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

but it won't install on bullseye without causing a few other updates...

View solution in original post

11 Replies
cyprienlaplace
VMware Employee
VMware Employee
Jump to solution

Hello,

I imagine you are talking about the Raspberry Pi OS installed in the Virtual Machine.

It is indicated in https://www.raspberrypi.com/software/operating-systems/ that the RPi OS is still based on Debian Bullseye, and that version of Debian is still using the linux 5.10 kernel.

The new Debian Stable "Bookworm" has a 6.1 kernel, so we're gonna take it from there.

Step 1: add the debian bookworm repo. In /etc/apt/sources.list, add this line:

deb http://deb.debian.org/debian bookworm main contrib non-free

Step 2: tell the OS to not update to bookworm by itself. Add a /etc/apt/preferences file:

cat > /etc/apt/preferences << EOF
Package: *
Pin: release n=bookworm
Pin-Priority: 50
EOF

Step 3: update and install the new kernel!

apt update && apt install -t bookworm linux-image-arm64

Step 4: reboot!

And voilà

RPi OS with linux kernel 6.1RPi OS with linux kernel 6.1

0 Kudos
k5map
Enthusiast
Enthusiast
Jump to solution

Much thanks for the steps on how to manually update the kernel but I am confused about one thing...

When I go to the raspberry website link (you listed at the beginning of your post) the website shows the current version is bullseye but the kernel is v6.1 (not v5.10).  If this is so, why am I having to update the kernel manually using your process?

0 Kudos
cyprienlaplace
VMware Employee
VMware Employee
Jump to solution

The Raspberry Pi OS is an "overlay" on top of a debian distribution. It includes an additional repo for the Raspberry Pi additions:

pi@raspberrypi:~ $ cat /etc/apt/sources.list.d/raspi.list
deb http://archive.raspberrypi.org/debian/ bullseye main

This repo provides a specialized kernel for the Raspberry Pi boards, and the Raspberry Pi foundation has updated their repo with a linux 6.1 kernel.

 

Now, in order to install the RPi OS in a VM, we had to use a (debian) rescue ISO to boot, mount the RPi OS filesystem, and manually install the more generic debian linux kernel, and the grub-efi bootloader. So the VM is not using the linux kernel from the raspberry.org repo, but from the Debian Bullseye. And that version (now "old stable") of Debian does not provide a v6.1 kernel.

The new Debian stable "bookworm" provides it, so it's relatively easy to update just the kernel version.

 

Last minute: it looks like RPi OS is getting a bookworm version, see https://raspberrytips.com/update-raspberry-pi-latest-version/
You can upgrade to it by updating both /etc/apt/sources.list and /etc/apt/sources.list.d/raspi.list to mention "bookworm" instead of "bullseye". Don't forget to remove /etc/apt/preferences and to snapshot the VM first 😄

k5map
Enthusiast
Enthusiast
Jump to solution

Ok, now I understand... much thanks again for the detailed explanation.

Since RPi OS is getting the bookworm version, what would you estimate the time before the rescue boot ISO would install the new v6.x kernel?  I'm asking because there's no urgency to upgrade to the new kernel and if v6.x will be included in then near future, I'm willing to wait.

0 Kudos
cyprienlaplace
VMware Employee
VMware Employee
Jump to solution

The rescue ISO only allowed to boot and use the RPi OS system when there was no grub-efi or generic kernel installed. Both new grub and kernel came from the RPi OS "bullseye" configuration, not from the rescue ISO.

And no, I don't have any idea for when the Raspberry Pi foundation will propose a full upgrade to bookworm.

I'm trying the manual upgrade to bookworm, and it's running into a few non trivial issues (mostly "not enough space" in /boot).

k5map
Enthusiast
Enthusiast
Jump to solution

Ok, I'll cross my fingers the RRi foundation will do a full upgrade in the coming months 🙂

Tags (1)
0 Kudos
cyprienlaplace
VMware Employee
VMware Employee
Jump to solution

0 Kudos
cyprienlaplace
VMware Employee
VMware Employee
Jump to solution

so.. the upgrade to bookworm has completed... but is far from what I was expecting for a "Raspberry Pi OS".

After upgrade to bookworm - 2023/08/19After upgrade to bookworm - 2023/08/19

I suggest waiting 🙂

k5map
Enthusiast
Enthusiast
Jump to solution

A few days ago, I built a new vmdk using the latest RPi OS release and had to do the same thing.  So I "feel your pain" 🙂

While I have your attention :), after a build a fresh VM, I then do a manual download/compile of the VMWare tools.  Do you happen to know of an image or package which can be installed versus having to do it all manually?

cyprienlaplace
VMware Employee
VMware Employee
Jump to solution

I checked earlier... and Debian Bookworm has it 😆

pi@raspberrypi:~ $ sudo apt install open-vm-tools
[sudo] password for pi:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
open-vm-tools is already the newest version (2:12.2.0-1).
open-vm-tools set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

but it won't install on bullseye without causing a few other updates...

k5map
Enthusiast
Enthusiast
Jump to solution

Oh geez... another reason to want Bookworm even more (lol)...

Well then I'm definitely hoping for a near term release of it. 

Tags (1)