roots / trellis

WordPress LEMP stack with PHP 8.2, Composer, WP-CLI and more
https://roots.io/trellis/
MIT License
2.51k stars 607 forks source link

Vagrant box with Ubuntu 22.04 on Apple silicon won't start #1495

Closed retlehs closed 3 months ago

retlehs commented 1 year ago

Version

v1.21.0

What did you expect to happen?

trellis up should consistently work

What actually happens?

Error related to: Package 'linux-headers-5.15.0-67-generic' has no installation candidate m linux-headers-5.15.0-67-generic

(See logs below)

Workaround for now:

Downgrade Ubuntu from 22.04 to 20.04 by modifying vagrant.default.yml:

-vagrant_box: 'bento/ubuntu-22.04'
+vagrant_box: 'bento/ubuntu-20.04'

h/t @MWDelaney via https://discourse.roots.io/t/package-linux-headers-5-15-0-67-generic-has-no-installation-candidate-m-linux-headers-5-15-0-67-generic/25477

Steps to reproduce

  1. Provision new Trellis project on machine with Apple silicon
  2. Run trellis up

System info

macOS 13.4 Vagrant to v2.3.6 Parallels 18.3.0

Log output

==> default: Checking for Parallels Tools installed on the VM…
==> default: Parallels Tools installed on this VM are outdated! In most cases
==> default: this is fine but in rare cases it can cause things such as shared
==> default: folders to not work properly. If you see shared folder errors,
==> default: please update Parallels Tools within the virtual machine and
==> default: reload your VM.
==> default: Installing the proper version of Parallels Tools. This may take a few minutes…
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

ptiagent-cmd --install

Stdout from the command:

ptiagent-cmd progress 3
ptiagent-cmd progress 15
Started installation of Parallels Guest Tools version ‘18.3.0.53606’
…
Running kernel seems to be up-to-date.
No services need to be restarted.
No containers need to be restarted.
No user sessions are running outdated binaries.
No VM guests are running outdated hypervisor (qemu) binaries on this host.
E: Package ‘linux-headers-5.15.0-67-generic’ has no installation candidate
m linux-headers-5.15.0-67-generic
o dkms
o libelf-dev
Error: failed to install mandatory packages.
Error: failed to install or upgrade Parallels Guest Tools!
Stderr from the command:
exit status 1

Please confirm this isn't a support request.

Yes

swalkinshaw commented 1 year ago

Setting update_guest_tools to false might be workaround for now too: https://github.com/roots/trellis/blob/c9f4dd918cb0a708b298c506785b09c7e0e80e3a/Vagrantfile#L195

mpdude commented 1 year ago

I think I have posted the same issue here: https://github.com/Parallels/vagrant-parallels/issues/458

The latest Bento image for ubuntu-22.04 + Parallels ships with an outdated kernel version for which the header files are no longer available. So, the automatic update of Parallels Tools fails on first boot.

If you disable the automatic update, the box runs fine. But as soon as a kernel update is performed, the prl_fs driver is missing on next reboot. At that time, the prl.update_guest_tools = true setting can/has to be re-enabled in order to rebuild the Parallels Tools on boot.