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

Add guest capabilities file for Rocky Linux #130

Merged
merged 3 commits into from
Jun 10, 2022
Merged

Add guest capabilities file for Rocky Linux #130

merged 3 commits into from
Jun 10, 2022

Conversation

evenreven
Copy link
Contributor

Thanks for creating this great plugin!

This PR adds guest capabilities file for Rocky Linux 8. It's basically a copy/paste job from the :centos_8 part of the centos capabilities, but with the 6 and 7 case/when statement removed since it doesn't apply to Rocky (which launched with version 8).

Let me know if this lacks something or is incomplete in some way.


My setup (if it's relevant):

Since vagrant-libvirt doesn't work with the upstream package on Fedora 35 (and the Fedora-provided package is 2.2.16 (which doesn't support Rocky guests)), I built a Vagrant Podman container like this:

#!/bin/bash -x
container=$(buildah from "fedora:rawhide")
buildah run "$container" -- dnf install -y openssh-server openssh-clients vagrant vagrant-libvirt
buildah run "$container" -- dnf clean all
buildah commit "$container" "vagrant"

Then after executing this, I run the container:

podman run --rm -it \
  --volume /run/libvirt:/run/ \ 
  --volume "${HOME}:${HOME}:rslave" \ 
  -v $SSH_AUTH_SOCK:$SSH_AUTH_SOCK \ 
  -e SSH_AUTH_SOCK=$SSH_AUTH_SOCK \
  --env "HOME=${HOME}" \
  --workdir "$(pwd)" \
  --net host \
  --privileged \
  --security-opt label=disable \ 
  localhost/vagrant:latest

Then I installed my locally built gem inside the container with vagrant plugin install ./vagrant-sshfs-1.3.6.gem.

Relevant part of my Vagrantfile:

Vagrant.configure("2") do |config|
  config.vm.box = "generic/rocky8"
  config.vm.network :forwarded_port, guest: 3000, host: 3000
  config.vm.network :private_network, type: "dhcp"
  config.ssh.forward_agent = true
  config.vm.synced_folder ".", "/vagrant", type: "sshfs"
  config.vm.provider :libvirt do |lv|
    lv.qemu_use_session = false
  end
end

@tuupola
Copy link

tuupola commented Mar 10, 2022

Ping @dustymabe

1 similar comment
@tuupola
Copy link

tuupola commented May 11, 2022

Ping @dustymabe

Copy link
Owner

@dustymabe dustymabe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I'll merge this and perform any fixups later.

Note, though that right now there is an issue with the Rocky guest detection in Vagrant because Rocky still ships the centos-release file. So it will erroneously get picked up as Centos. More details in one of the commits in this PR: hashicorp/vagrant#12785

@dustymabe dustymabe merged commit c125ce8 into dustymabe:main Jun 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants