Closed bastien-reinhardt closed 2 years ago
I can't ship boxes preregistered using subscription manager, without permission from Red Hat. And if you specify shared folders, Vagrant will automatically try and do any necessary setup, including the package installs before any other provisioning scripts get executed.
That said, if rsync
is the only missing package, and it is available on the installer DVDs, I can update the box config to include it. Then Vagrant won't need to install it. Of course this fix will only work for shared folders using rsync, and not all of the platforms use this method.
I'll have to check the DVD/test this change when I have more time.
I would be interested in this as well, submitting a PR.
It's notable libvirt provider and sync folders are troublesome, rsync is probably the best/simplest way to provide a shared folder for a libvirt vagrant box.
Added the rsync package to most of the Linux configs. But only confirmed it's available on the RHEL 9 DVD so far. So it will disappear from the older RHEL boxes if it's missing.
I confirmed rsync is available on all of the RHEL DVDs, so it should be installed when the 4.1.2
boxes get built/released in the next ~1-3 weeks.
Problem
I am not able to get a generic/rhel8 box up with a synced folder using rsync. During vagrant up the start of the box throws an error, due to the vagrant plugin is not able to find/install rsync. This error occurs, because the box is not registered to the subscription manager.
Vagrant file
Vagrant.configure("2") do |config| config.vm.define "rhel8" do |rhel8| rhel8.vm.box = "generic/rhel8" rhel82.vm.synced_folder ".", "/vagrant", type: "rsync" end end
Debug Output
The following SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed!
if command -v dnf; then dnf -y install rsync else yum -y install rsync fi
Stdout from the command:
/bin/dnf Extra Packages for Enterprise Linux 8 - x86_64 5.6 MB/s | 8.2 MB 00:01 Last metadata expiration check: 0:00:03 ago on Wed 28 Oct 2020 10:54:28 AM UTC. No match for argument: rsync
Stderr from the command:
Error: Unable to find a match: rsync
Expected behaviour
It should be possible to register to subscription manager before package installation.