Parallels / vagrant-parallels

Vagrant Parallels Provider

Home Page:https://parallels.github.io/vagrant-parallels

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`apt-upgrade` leads to failing `vagrant reload`

DirectRoot opened this issue · comments

Hi there,

When I create machines via up directories are mounted just fine. However after an apt upgrade is run, any subsequent vagrant reload will not mount the host directories in the VM. No output from STDERR is captured, but I SSH'd into one of the machines and manually ran the suggested command...

mount -t prl_fs -o uid=1000,gid=1000 vagrant /vagrant

Which produced the output mount: /vagrant: unknown filesystem type 'prl_fs'.

I'm running:

  • Vagrant 2.2.14
  • vagrant-parallels 2.2.1
  • macOS BigSur on Apple M1

I'm using a rarely downloaded box, as there aren't many out there for ARM, but it does work until the apt-upgrade and reload.

machines=[
  {
    :hostname => "prometheus",
    :ip => "10.10.0.10",
    :box => "rueian/ubuntu20-m1",
    :memory => 1024,
    :cpus => 1
  },
  {
    :hostname => "web",
    :ip => "10.10.0.11",
    :box => "rueian/ubuntu20-m1",
    :memory => 1024,
    :cpus => 1
  },
  {
    :hostname => "kubernetes",
    :ip => "10.10.0.12",
    :box => "rueian/ubuntu20-m1",
    :memory => 2048,
    :cpus => 2
  }
]

Vagrant.configure("2") do |config|
  machines.each do |machine|
    config.vm.define machine[:hostname] do |node|
      node.vm.box = machine[:box]
      node.vm.hostname = machine[:hostname]
      node.vm.network "private_network", ip: machine[:ip]
      node.vm.provider "parallels" do |prl|
        prl.update_guest_tools = true
        prl.memory = machine[:memory]
        prl.cpus = machine[:cpus]
      end
    end
  end
end

Are there any packages I should specifically avoid updating? (I can get you the list of what was updated, if you need it.)

Can you check if the Parallels Guest Tools are still installed/available in the guest after you did the update?

Maybe the box came with them installed by default, but your updates installed a newer kernel version, and now the tools are incompatible/cannot be loaded or so? Just guessing...

Most probably kernel was updated during apt upgrade but Parallels Tools kernel modules were not recompiled properly. This may be due to various reasons. I suggest to start with looking into DKMS log /var/lib/dkms/parallels-tools/kernel-$(uname -r)-$(uname -m)/log/make.log.

Unsure how to check if the tools are still installed/available, I'm using SSH to access a headless VM so can't test copy/paste functionality etc. Is there another way to test over SSH? (Apart from not having the required file system type to mount a shared directory).

uname -r from 5.4.0-65-generic to 5.4.0-74-generic after apt-upgrade. There was a log generated at the mentioned location for the former, but not the latter, so no other obvious error to pass on.

However, I've found a Debian box that means I can avoid this, so I will! Let me know if you want any more info from the failing Ubuntu.

Is there another way to test over SSH?

Sure, something like (untested)

$ vagrant ssh -c 'cat /var/lib/dkms/parallels-tools/kernel-$(uname -r)-$(uname -m)/log/make.log'

Ah yes, I checked this path within the VM and the file wasn't there. There was one for 5.4.0-65-generic (before I updated) but not one after and then prl.update_guest_tools = true attempted to update Parallels tools.

I guess that I am facing a similar issue.

I am getting (SSH address removed)

$ vagrant up                                                                  [16:26:39]
Bringing machine 'default' up with 'parallels' provider...
==> default: Checking if box 'jeffnoxon/ubuntu-20.04-arm64' version '1.0.1' is up to date...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 0: shared
==> default: Clearing any previously set network interfaces...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: XX.XX.XX.XX:XX
    default: SSH username: vagrant
    default: SSH auth method: private key
==> default: Machine booted and ready!
==> default: Checking for Parallels Tools installed on the VM...
==> default: Parallels Tools were not detected on this VM! They are required
==> default: for shared folders, time sync and more. If shared folders are not
==> default: working on this machine, please install Parallels Tools within the
==> default: virtual machine and reload your VM.
==> default: Mounting shared folders...
    default: /vagrant => /Users/cedric.laczny/virtual_machines/singularity-vm
Vagrant was unable to mount Parallels Desktop shared folders. This is usually
because the filesystem "prl_fs" is not available. This filesystem is
made available via the Parallels Tools and kernel module.
Please verify that these guest tools are properly installed in the
guest. This is not a bug in Vagrant and is usually caused by a faulty
Vagrant box. For context, the command attempted was:

mount -t prl_fs -o uid=1000,gid=1000,_netdev vagrant /vagrant

The error output from the command was:

mount: /vagrant: unknown filesystem type 'prl_fs'.

$ vagrant ssh -c 'cat /var/lib/dkms/parallels-tools/kernel-$(uname -r)-$(uname -m)/log/make.log'

cat: /var/lib/dkms/parallels-tools/kernel-5.4.0-137-generic-aarch64/log/make.log: No such file or directory

How can this be fixed in the box after the kernel upgrade please?

P.S. The instructions on how I got the box into the state that it is now are at https://gist.github.com/claczny/cd92c24d9d7a0ba4d3d614156a332573

It works for me again after upgrading the Parallels Tools on my VM.

Upgrade instructions: https://kb.parallels.com/en/129740