archlinux / archinstall

Arch Linux installer - guided, templates etc.
GNU General Public License v3.0
6.15k stars 531 forks source link

Suggestion: detect virtual enviroment and install/enable services for it? #1476

Open DoTheEvo opened 2 years ago

DoTheEvo commented 2 years ago

Arch installed in a virtual machine benefits from having some services running.

hyperv In order to use Hyper-V integration services, install hyperv and start/enable the services hv_fcopy_daemon.service, hv_kvp_daemon.service and hv_vss_daemon.service.


vmware Install open-vm-tools. Start and/or enable vmtoolsd.service and vmware-vmblock-fuse.service.


Well, during archinstall we are picking a role, if we pick server there is offering of stuff like sshd, nginx, docker,... Maybe add something like "VM services" checkbox and it would use systemd-detect-virt to detect the environment and install and enable the services for it.

Torxed commented 2 years ago

I can agree that we could leverage the already existing: https://github.com/archlinux/archinstall/blob/a748f3fba04e771a3c18e66efcd2cf48b42c778e/archinstall/lib/hardware.py#L183-L188

And detect if it's a vm, and add a menu item allowing users to opt in or out of virtualization softwares. I personally don't like them and don't want them installed just because I run in a VM.. but some do and that's fine. So adding a question, something along the lines of "Would you like to install VM guest tools? N/y" would be neat.

I'd welcome a PR for it.