-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to install Parallels Guest Tools on Alpine Linux #374
Comments
Hi @worftan, I can confirm that the feature Due to the Alpine specifics, the mount command syntax is different and we should use
Also, as we can see, in the box Unfortunately, in order for it to work, the support of Alpine Linux should be first implemented on the Parallels Guest Tools side. That's out of the scope of vagrant-parallels provider. |
So, you can still run # Vagrantfile
Vagrant.configure("2") do |config|
config.vm.box = "generic/alpine38"
end But shared folders won't work there. |
Here are some manual steps for installing Parallel Tools on Alpine which worked for me: Based heavily on the work of m-emelchenkov / vagrant-alpine / commit / b133defd7e76 — Bitbucket # Create and enter VM
vagrant init generic/alpine316
vagrant up
vagrant ssh
# First, bring system up to date. Otherwise kernel headers won't match the running kernel
sudo apk upgrade
# If kernel was updated, reboot to bring it into use, and re-enter VM
sudo apk add gcompat # Adds glibc compatibility layer, needed by prl-tools user-space
sudo apk add alpine-sdk # Equivalent of debian's build-essential: gcc, automake, etc
sudo apk add linux-virt-dev # Linux headers for generic/alpine316's kernel (cf. `-virt` in output from uname -r)
# Check headers installed in /usr/src/linux-headers-* matches
# running kernel version and type `uname -r`
# Tools needed by parallels installer
wget "https://bytebucket.org/m-emelchenkov/vagrant-alpine/raw/b133defd7e76a9e776932aa61b8d06ffe7b54cb4/Packages/packages/3rd-party/x86_64/dkms-2.5-r0.apk"
sudo apk add --allow-untrusted ./dkms-2.5-r0.apk
sudo apk install perl elfutils-dev
# Use Parallels GUI to open the VM, then use the Actions -> Install Parallel tools to insert a CD-ROM
# into the VM, which will appear at /dev/sr0
sudo mount -t iso9660 -o exec /dev/sr0 /mnt
sudo /mnt/install
# There's a complaint about an error at this point, check the log file mentioned in the error
tail -n50 /var/log/parallels-tools-install.log End of log file:
# Add a boot-time launcher for prltoolsd
echo -e '#!/bin/sh\n\n/etc/init.d/prltoolsd start\n' | sudo tee /etc/local.d/prltoolsd.start
sudo chmod 0755 /etc/local.d/prltoolsd.start
sudo rc-update add local
# Launch it manually now
sudo /etc/local.d/prltoolsd.start
# Use the GUI to create a shared folder called `vagrant`
sudo mkdir -p /vagrant
sudo mount -t prl_fs -o nodev,share vagrant /vagrant
# Make this mount on boot by adding the following line to fstab
echo -e '\nvagrant /vagrant prl_fs nodev,share 0 0\n' | sudo tee -a /etc/fstab
sudo mount -va # test mounting all entries in /etc/fstab If you want to free some disk space, you can now delete all the packages except sudo apk del alpine-sdk linux-virt-dev perl elfutils-dev
rm ./dkms-2.5-r0.apk To actually shrink the disk of the VM, you need to modify the virtual harddisks connection type from IDE to SCSI (which supports the TRIM command).
Run the following on the VM to force the emission of TRIM commands (a.k.a. DISCARD) which inform the underlying storage system (Parallels in this case) which blocks are no longer needed by the VM. Note that this is not done automatically when you delete files, because on physical disks it has a significant performance penalty.
To enable automatic TRIM when you delete a file, add # One off (resets on next boot)
sudo mount -oremount,discard / To make this permanent I would expect to add # Modify first line of /etc/fstab
# Sample before:
UUID=5a942e11-4646-496f-8e59-7e3f0f98c1d1 / ext4 rw,relatime 0 1
# After:
UUID=5a942e11-4646-496f-8e59-7e3f0f98c1d1 / ext4 rw,relatime,discard 0 1 |
vagrant version:
Vagrant 2.2.14
configure
config.vm.box = "generic/alpine38"
config.vm.provider "parallels" do |prl|
prl.name = "docker"
prl.check_guest_tools = true
prl.update_guest_tools = true
end
error:
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
mount -o loop /tmp/prl-tools-lin.iso /media/prl-tools-lin_25557/
Stdout from the command:
Stderr from the command:
The text was updated successfully, but these errors were encountered: