Skip to content
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

Vagrant image does not have /mnt path #72

Closed
JeffPsycle opened this issue Jan 10, 2022 · 7 comments · Fixed by ezamriy/ansible-role-vbox_guest#2
Closed

Vagrant image does not have /mnt path #72

JeffPsycle opened this issue Jan 10, 2022 · 7 comments · Fixed by ezamriy/ansible-role-vbox_guest#2
Labels
question Further information is requested vagrant Vagrant related issues

Comments

@JeffPsycle
Copy link

When using the vagrant-vbguest plugin I have to ssh into the machine before it completes package installs and create the /mnt folder for the machine to come up cleanly.

Copy iso file /usr/share/virtualbox/VBoxGuestAdditions.iso into the box /tmp/VBoxGuestAdditions.iso
Mounting Virtualbox Guest Additions ISO to: /mnt
mount: /mnt: mount point does not exist.
Unmounting Virtualbox Guest Additions ISO from: /mnt
umount: /mnt: no mount point specified.
==> mymachinename: Checking for guest additions in VM...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

umount /mnt

Stdout from the command:



Stderr from the command:

umount: /mnt: no mount point specified.
@srbala srbala added the question Further information is requested label Jan 10, 2022
@yippeykeiyay
Copy link

What host OS are you running?

I ran into the same error after upgrading to macOS 12.1 and fixed it by reinstalling the vagrant-vbguest plugin:
vagrant plugin install vagrant-vbguest

@LKHN
Copy link
Member

LKHN commented Jan 24, 2022

@JeffPsycle In addition to @yippeykeiyay's comment, We need the details below to reproduce the issue.

  • OS version.
  • Ruby version ruby --version
  • Installation method(Upstream or Distro provided) of the vagrant and its version. vagrant version
  • Versions of the all installed vagrant plugins. vagrant plugin list

@JeffPsycle
Copy link
Author

Thanks for the reply, here are the details:

OS Version: Fedora 34
Ruby Version: ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux]
Installation Method: Upstream provided (RPM), vagrant-2.2.19-1.x86_64

vagrant.x86_64                       2.2.19-1                            @hashicorp

Versions of all the installed plugins:

vagrant-cachier (1.2.1, global)
vagrant-hostmanager (1.8.9, global)
vagrant-managed-servers (0.8.0, global)
vagrant-vbguest (0.30.0, global)

@JeffPsycle
Copy link
Author

What host OS are you running?

I ran into the same error after upgrading to macOS 12.1 and fixed it by reinstalling the vagrant-vbguest plugin: vagrant plugin install vagrant-vbguest

I just gave reinstalling vbguest a go, no luck sadly.

@LKHN LKHN added the vagrant Vagrant related issues label May 13, 2022
@LKHN
Copy link
Member

LKHN commented Jul 15, 2022

Dear @JeffPsycle and @yippeykeiyay ,

Finally, I got time to install the VirtualBox provider and this plugin to try to produce the issue, and I did.
It's fixed on today's almalinux/8 and almalinux/9 releases. Please let me know if everything works for you too.

@JeffPsycle
Copy link
Author

@LKHN thanks for the update. Unfortunately I am currently running Fedora 36 and it has a fair number of issues with VirtualBox at the moment. Waiting on VB 3.1.35 so I can test this correctly. I can confirm however that the /mnt folder is available and should get the members of my team running this on non-M1 Macs working smoothly.

Will chime in with a status update as soon as Virtual Box updates.

@JeffPsycle
Copy link
Author

@LKHN VirtualBox 3.1.36 just came out which has fixed the 5.18 kernel issue so I have been able to test this and confirm that the /mnt path issue that breaks the Guest Additions has been fixed. Thanks for getting this corrected!

LKHN added a commit to LKHN/ansible-role-vbox_guest that referenced this issue Jul 21, 2022
Using the "state: absent" for ansible.posix.mount module
on "Unmount VBoxGuestAdditions.iso" task, deletes the mounpoint,
in this case, it's the `/mnt` directory.
On the other hand, using the "state: unmounted" results stuck
the Vagrant box while the creation of the VMs.

Propose: Since it's a temporary ISO mount and unmount procedure,
let's use a temporary fstab and do not touch the /etc/fstab at all.

There's a long-awaited PR for adding "state: ephemeral"
support to the ansible.posix.mount module[^1].
We can switch to use this option after the PR merged to the upstream.

This patch can be tested on
https://app.vagrantup.com/almalinux/boxes/8/versions/8.6.20220715
and https://app.vagrantup.com/almalinux/boxes/9/versions/9.0.20220715
Vagrant boxes.

Fixes: AlmaLinux/cloud-images#72

[^1]: ansible-collections/ansible.posix#267

Signed-off-by: Elkhan Mammadli <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested vagrant Vagrant related issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants