I'm running Ubuntu under virtualized environment (as a guest of VMware ESXi, HyperV or KVM). Which packages should I delete that are not needed under virtualized environment since a virtualized guest Ubuntu anyway cannot access physical hardware anyway? I mean packages like linux-firmware, intel-microcode, amd64-microcode, thermald, acpid, etc. Could you please somehow suggest a list of unnecessary packages that I could delete? I'm running many virtual machines and I don't want for them to reboot in vain just because some packages, like linux-firmware for example, have updated by unattended-upgrades.
If you start with Ubuntu's cloud images, then there's nothing hardware-related to remove. This won't help with your current VMs, but is an easier starting point for your future VMs.
Here's an example of getting started using KVM and cloud-images:
Everything you need, including KVM, is a dependency of the wonderful
uvtoolpackage. No PPAs, this is all stock Ubuntu main.
$ sudo apt install uvtool
Download a cloud image. It's 400MB, so it takes a couple minutes. Don't panic about a lack of feedback - let it run.
$ uvt-simplestreams-libvirt sync release=disco arch=amd64
Create the VM:
$ uvt-kvm create my_VM_name release=disco
There - it's running now. You can use
virsh to control the VM (suspend, resume, shutdown, start, list, etc). You can SSH into it, or use
Alternately, if you don't want to use
uvtool, you can download cloud images from https://cloud-images.ubuntu.com/
I have identified the following packages so far that tend to operate physical hardware thus cannot do anything under virtualized environment so can be safely removed to avoid unnecessary reboots when they are updated by
amd64-microcode intel-microcode iucode-tool thermald acpid linux-firmware mdadm