mirror of
https://github.com/elasticdog/packer-arch.git
synced 2026-07-17 16:36:26 +00:00
Add vbox guest additions before running mkinitcpio
I'm trying to solve the issue of the guest additions not running on the first boot due to the installer kernel being 3.10 and the VM having a newer version. If you reboot the VM after your first `vagrant up` everything works as expected.
This commit is contained in:
parent
b56490a904
commit
d9ccc62a87
1 changed files with 6 additions and 6 deletions
|
|
@ -44,6 +44,12 @@ echo '==> generating the system configuration script'
|
|||
/usr/bin/install --mode=0755 /dev/null "${TARGET_DIR}${CONFIG_SCRIPT}"
|
||||
|
||||
cat <<-EOF > "${TARGET_DIR}${CONFIG_SCRIPT}"
|
||||
# VirtualBox Guest Additions
|
||||
/usr/bin/pacman -S --noconfirm linux-headers virtualbox-guest-utils virtualbox-guest-dkms
|
||||
echo -e 'vboxguest\nvboxsf\nvboxvideo' > /etc/modules-load.d/virtualbox.conf
|
||||
/usr/bin/systemctl start dkms.service
|
||||
/usr/bin/systemctl enable dkms.service
|
||||
|
||||
echo '${FQDN}' > /etc/hostname
|
||||
/usr/bin/ln -s /usr/share/zoneinfo/${TIMEZONE} /etc/localtime
|
||||
echo 'KEYMAP=${KEYMAP}' > /etc/vconsole.conf
|
||||
|
|
@ -57,12 +63,6 @@ cat <<-EOF > "${TARGET_DIR}${CONFIG_SCRIPT}"
|
|||
/usr/bin/sed -i 's/#UseDNS yes/UseDNS no/' /etc/ssh/sshd_config
|
||||
/usr/bin/systemctl enable sshd.service
|
||||
|
||||
# VirtualBox Guest Additions
|
||||
/usr/bin/pacman -S --noconfirm linux-headers virtualbox-guest-utils virtualbox-guest-dkms
|
||||
echo -e 'vboxguest\nvboxsf\nvboxvideo' > /etc/modules-load.d/virtualbox.conf
|
||||
/usr/bin/systemctl start dkms.service
|
||||
/usr/bin/systemctl enable dkms.service
|
||||
|
||||
# Vagrant-specific configuration
|
||||
/usr/bin/groupadd vagrant
|
||||
/usr/bin/useradd --password ${PASSWORD} --comment 'Vagrant User' --create-home --gid users --groups vagrant vagrant
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue