Fixed virt detection in Arch

This commit is contained in:
Greg Hellings
2025-01-22 14:42:50 -06:00
parent c9b11afe98
commit 4c9e98f685
2 changed files with 8 additions and 7 deletions
+7 -6
View File
@@ -2,6 +2,12 @@
set -ex
#disk="${1}"
# Do host-specific things
virt="${2}"
# Values I've found so far
# "microsoft" == Hyper-V
# "oracle" == VirtualBox
# "KVM" == KVM/Qemu
# Set locale info to reasonable defaults
ln -sf /usr/share/zoneinfo/UTC /etc/localtime
@@ -37,14 +43,9 @@ useradd vagrant -g vagrant -G wheel -m
[ -d /home/vagrant ] || exit 1
echo "vagrant:vagrant" | chpasswd
# Do host-specific things
virt="$(systemd-detect-virt)"
# Values I've found so far
# "microsoft" == Hyper-V
# "oracle" == VirtualBox
# "KVM" == KVM/Qemu
if [ "${virt}" == "microsoft" ]; then
pacman -S --noconfirm hyperv
systemctl enable hv_kvp_daemon
systemctl enable hv_vss_daemon
fi
sleep 60