CentOS 8.2 VM on Azure can't boot after VirtualMin installation

I have created a CentOS 8.2 Linux VM on Azure, installed Virtualmin and at first reboot can't access the VM at all. Reproduced it a few times. Here are details.

  1. Run sudo yum update
  2. Reboot - OK
  3. Install virtualmin : sudo wget http://software.virtualmin.com/gpl/scripts/install.sh ; sudo /bin/sh install.sh – OK but see a warning saying "The filesytem / could not be remounted with quotas enabled. You will need to reboot your system to enable quotas."
  4. Reboot – Not OK

In the boot diagnosis provided by Azure I see this :

[ 1746.606496] reboot: machine restart
[H[J[1;1Herror: ../../grub-core/fs/fshelp.c:258:file `/grub2/i386-pc/increment.mod' not found.
error: ../../grub-core/fs/fshelp.c:258:file `/grub2/grubenv' not found.
[4;1H1    [4;1H0    [H[J[1;1H[H[J[1;1Herror: ../../grub-core/fs/fshelp.c:258:file `/grub2/i386-pc/increment.mod' not found.
error: ../../grub-core/fs/fshelp.c:258:file `/grub2/grubenv' not found.

The VM is up but can't be access by any method.

I have done some research and didn't find any useful info. Is this a known problem ? Could there be something missing on the VM prior to installing virtualmin ? I don't really need quotas, is there way to skip this feature (assuming it is causing the issue) ?

Also note that I did have the same warning during install on CentOS 7 but the system can boot properly but I really need to be using CentOS 8.

Any help would be appreciated !

Status: 
Fixed (pending)
Virtualmin version: 
6.2
Webmin version: 
6.2

Comments

What kind of filesystem are you using on this VM? Only XFS should require a reboot.

Hi Jamie, FileSystem is XFS. Though I am not sure that it makes a difference. Do you think another FS would not have this issue ?

Yes, I would recommend giving it a try with a different filesystem (like EXT4)

Unfortunately I tried and cannot change the filesystem type

Does Azure offer a different VM image using EXT4 as the filesystem type that you could use to create a new VM?

Hi Jamie, it doesn't seem like it. But I found a workaround : install webmin first then install virtualmin as a webmin module. That did the trick.

I,m using Debian on Azure and when upgrading the reboot must be done from within Azure VM, othervise it hangs and it is a mess to reach it and restart. It must be done by commands via console. Just don't ask me how to do it, I have forgotten it despite having messed it up many times.

So restart from Azure.

If you install the OS using Azure, it will be a slight different version installed. I think it has to do with that Azure offers a service that automatically installes all upgrades.

Surprising that it only works from the Azure console, since I'd expect the boot process to be the same regardless.

What ever is the cause, but there are problems with rebooting from within Linux. Now have had problems again. I manged to repair the installation by reading this page:

https://docs.microsoft.com/en-us/troubleshoot/azure/virtual-machines/boo...

then I went to "Azure VM repair"

https://docs.microsoft.com/en-us/troubleshoot/azure/virtual-machines/rep...

Under 4, I used the script "linux-hello-world"

and I was set !

On our side we solved the issue by Installing webmin first, the virtualmin package rather than virtualmin right away.

  1. Download webmin and virtualmin module (replace with latest versions from https://www.webmin.com/rpm.html and https://www.webmin.com/vdownload.html)

$ wget https://prdownloads.sourceforge.net/webadmin/webmin-1.955-1.noarch.rpm ; wget https://download.webmin.com/download/virtualmin/wbm-virtual-server-6.12....

  1. Install webmin

$ sudo rpm -U webmin-1.955-1.noarch.rpm

  1. Install virtualmin module

$ sudo rpm -U wbm-virtual-server-6.12.gpl-1.noarch.rpm

  1. Reset root password

$ sudo passwd

  1. Login webmin as root and go through setup choosing minimal settings
Ilia's picture
Submitted by Ilia on Thu, 05/13/2021 - 03:59

On our side we solved the issue by Installing webmin first, the virtualmin

Virtualmin should only be installed using official install.sh script. Never install such outdated packages as Webmin 1.955 and Virtualmin 6.12 in May 2022!

I don't really need quotas, is there way to skip this feature (assuming it is causing the issue)

Yes, the future release of install script, will let you exclude quotas from being setup upon initial setup by passing an opinion to install script as --exclude Quotas.

Although the process of setting up quotas shouldn't mess with your boot process. Are you sure that it happens due to setting up quotas and changes made in your grub.conf? Could you provide more debugging info?

Ilia's picture
Submitted by Ilia on Thu, 05/13/2021 - 04:41

Can you provide for download as a tar ball the following files from your Azure instance:

/boot
/etc/default/grub
/etc/os-release

Besides, what is the output of:

grub2-mkconfig --version
Ilia's picture
Submitted by Ilia on Sun, 05/16/2021 - 07:48

Nevermind, I have spun up Azure CentOS 8 instance and gave it a try. With default install, as expected Virtualmin installer adds rootflags=uquota,gquota to default Grub config and re-makes all Grub configs.

After Virtualmin installation, the instance was rebooted and booted back up without any issues.

Nevertheless, I have re-checked the code and added few patches to provide better support for various distros (upcoming in particular).