Vmin install.sh vs Azure bastion ssh

SYSTEM INFORMATION
OS type and version Ubuntu 22.04 Azure VM

We are currently in the process of trying to installl virtualmin running under a Ubuntu 22.04 Pro Azure instance.

We are also using Ubuntu’s Security Tools and MS Defender, which we configured in our vm before running the vmin install script.

I had trouble with getting the vmin pro install.sh script to run at first as it was saying the vmin package repo wasn’t signed. I managed to fix that by running:

 sh ./install.sh -s
 chmod 644 /usr/share/keyrings/*
 apt update

Virtualmin then installed without errors. Straight after installation, I decided to reboot the Ubuntu/vmin VM but it never came back up. Well, apparently it is running according to Azure but we have been unable to ssh into the vm using Azures bastion ssh portal connection option after rebooting.

We’ve had this happen twice now. After installing vmin, and rebooting, Azure’s bastion ssh connection no longer lets us login to the vm.

Any ideas why this might be happening? Are virtualmin’s firewall settings blocking Azure bastion ssh?

Thanks

1 Like

Thanks for the heads up!

What was the output of ls -lsa /usr/share/keyrings before running this command?

I posted that in the comments to the github ticket:

I didn’t mention our bastion SSH issue as part of that issue.

I must admit I don’t fully understand how Azures bastion ssh works. Apparently it works without having to install additional software in your Azure VM but I don’t know if it uses a different port to normal ssh?

Does the current vmin pro install script change any network config or add any firewall rules?

I haven’t been able to use regular ssh in setting up this VM until now because I awaiting the required VPN access so I dependent on using Azures bastion ssh until then and it stops working after the first reboot after installing vmin.

It does not alter network configuration, but it does add a firewall. It installs firewalld, closes it by default, and opens the ports you would expect a virtual hosting system to have open, including ssh.

If you figure out how bastion ssh works (I’ve never heard of it), let us know and I can make sure we don’t interfere with it. I don’t like weird stuff (ssh should live on port 22, by default), but if their weird way is documented, we can work with it.

Its prob the same as my previous post on gh about but the permissions of my keychain files AFTER running install.sh -s but BEFORE running chmod are:

root@poseidon:/home/danielm# ls -lsa /usr/share/keyrings
total 84
4 drwxr-xr-x   2 root root 4096 Oct  4 10:16 .
4 drwxr-xr-x 122 root root 4096 Oct  1 12:01 ..
4 -rw-r-----   1 root root  641 Sep 25 15:16 microsoft-prod.gpg
8 -rw-r--r--   1 root root 7399 Sep 18  2018 ubuntu-archive-keyring.gpg
8 -rw-r--r--   1 root root 6713 Oct 27  2016 ubuntu-archive-removed-keys.gpg
4 -rw-r--r--   1 root root 3023 Mar 26  2021 ubuntu-cloudimage-keyring.gpg
0 -rw-r--r--   1 root root    0 Jan 17  2018 ubuntu-cloudimage-removed-keys.gpg
4 -rw-r--r--   1 root root 1227 May 27  2010 ubuntu-master-keyring.gpg
4 -rw-r--r--   1 root root 1150 Aug  8 15:00 ubuntu-pro-anbox-cloud.gpg
4 -rw-r--r--   1 root root 2247 Aug  8 15:00 ubuntu-pro-cc-eal.gpg
4 -rw-r--r--   1 root root 2274 Aug  8 15:00 ubuntu-pro-cis.gpg
4 -rw-r--r--   1 root root 2236 Aug  8 15:00 ubuntu-pro-esm-apps.gpg
4 -rw-r--r--   1 root root 2264 Aug  8 15:00 ubuntu-pro-esm-infra.gpg
4 -rw-r--r--   1 root root 2275 Aug  8 15:00 ubuntu-pro-fips-preview.gpg
4 -rw-r--r--   1 root root 2275 Aug  8 15:00 ubuntu-pro-fips.gpg
4 -rw-r--r--   1 root root 2250 Aug  8 15:00 ubuntu-pro-realtime-kernel.gpg
4 -rw-r--r--   1 root root 2235 Aug  8 15:00 ubuntu-pro-ros.gpg
4 -rw-r-----   1 root root 2313 Oct  4 10:16 ubuntu-virtualmin-7.gpg
4 -rw-r-----   1 root root 2261 Oct  1 14:02 ubuntu-webmin-developers.gpg
4 -rw-r-----   1 root root  891 Oct  1 15:05 webmin.gpg

It also uninstalls pre-installed ufw, which could potentially interfere with any custom pre-configurations made earlier (for ufw).

I’m new to Azures bastion SSH but as far as I can tell it still uses port 22. If I find a good source of info on it I’ll let you know.

I don’t have all the details unfortunately but I do know that it was the fstab mount options for the btrfs /home partition that was causing our vmin VM not to boot which is why bastion ssh wasn’t working. Apparently our VM didn’t like the quota option the vmin install script added in.

1 Like

Oh, that’s completely unrelated to ssh. And, yeah, if the system won’t boot after adding quotas to the /home filesystem boot options, obviously that’s a problem.

I thought we only added the quota options for filesystems we know about. I’ll have to check…

1 Like

This is the code where quotas get dealt with during installation, and I would assume on a quick scan that it wouldn’t make changes for btrfs, but if you’'re seeing it change, I guess Webmin doesn’t know it doesn’t know how to work with btrfs quotas (which are different).

1 Like

Thanks for clearing this up!

I’m on it now, testing with Ubuntu 22.04 and Btrfs…

1 Like

@danboid Thanks for the heads up! The bug is actually nasty!

@Joe, alright, here is the fix to support Btrfs quotas at install time without breaking anything!

Yet, it still won’t work properly. @Jamie, could you check the Virtualmin code to ensure it handles Btrfs quota systems correctly?

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.