-2

Why do cloud images have KVM labeled kernel as Guest? It seems KVM is most relevant for the Host. Maybe they are optimized for the Host, but I'm having to use the generic Linux kernel to get Desktops to work. Am I missing any performance by doing so? If not, why do the Guests use the KVM labeled kernel then?

Marco Bonelli
  • 63,369
  • 21
  • 118
  • 128
alchemy
  • 954
  • 10
  • 17
  • Why shouldn't them? After all, nested virtualization is a thing. – Marco Bonelli Feb 04 '22 at 20:04
  • @MarcoBonelli, that does make some sense, thanks. So maybe I can assume there is no performance loss without the special kvm guest kernel, and can delete them to make space for the not insignificant generic one (1GB). Could run some kind of performance test, but seems silly if the guest kvm is just to allow nesting. – alchemy Feb 04 '22 at 20:17
  • Yeah there shouldn't really be any performance penalty. They may also have KVM support on the guest because they might be using the same kernel builds for both guests and hosts without the need to create separate ones. If you don't need KVM it could make sense to save space and go with a custom one. – Marco Bonelli Feb 04 '22 at 20:27

1 Answers1

0

I'm going to self-answer what I found, but dont hesitate to add to it.

Installing the linux-generic kernel took about 1GB of disk space. It turns out the kvm kernel is only about 6mbs according to apt show linux-image-5.4.0-1049-kvm. So yes, I likely need all that extra stuff to run the Desktop graphic display.

I could share the kernel externally to the VM to save space, but would have to make sure the Host included it with updates. Looking into a way to include a different distro repo in updates.. (looks like kernels are in security repo like deb http://security.ubuntu.com/ubuntu/focal-security main restricted ), but need to add signature.

Bummer, there is no longer a kernel PPA. Probably for security reasons. The is a script in an answer here, but uses Python: https://askubuntu.com/questions/47397/how-do-i-add-the-kernel-ppa

The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5

You can add the public key with apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5 https://raspberrypi.stackexchange.com/questions/115827/updating-from-such-a-repository-cant-be-done-securely-raspberry-pi

However, get errors:

The following packages have unmet dependencies:
linux-image-generic : Depends: linux-firmware but it is not installable
                       Depends: intel-microcode but it is not going to be installed
                       Depends: amd64-microcode but it is not installable
                       Recommends: thermald but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

So it looks like either copy the initrd.img* file over from another OS (possibly inside an ISO or VM image), or install it in the Guest VM to keep it up to date. The former allows sharing between VMs, the latter does not, but can have automatic updates.

I dont see a place to download the initrd.img and vmlinuz files directly. Please correct me if Im wrong.

alchemy
  • 954
  • 10
  • 17