Questions tagged [vagrant]
Vagrant is a tool to create and configure lightweight, reproducible, and portable development environments. By default, it uses Oracle's VirtualBox for these virtual environments, but support for other virtualization systems is available. Most questions about Vagrant should be asked on Super User or Stack Overflow.
460 questions
0 votes
1 answer
103 views
How to enable a Vagrant/VirtualBox virtual machine & NFS by rules in host machine UFW firewall? (vagrant up freezes at NFS mounting)
When running vagrant up, it gets stuck at the point when it's trying to mount the NFS shared folders. https://github.com/hashicorp/vagrant/blob/f2960d545864e1b644fe7fb0f3b82fec9895dd13/website/content/...
1 vote
0 answers
39 views
Can't figure out the good ssh config via a jump host (ProxyJump) with private key only on the jump host
ASCII representation of the workflow [Local Machine] | | SSH ProxyJump / ProxyCommand v ----------------- | Jump Host | <- Private key here | xxx | ------...
1 vote
1 answer
186 views
Fedora CoreOS on Vagrant: transaction failed: Signature verification failed after provisioning
TL;DR When provisioning a Fedora CoreOS Vagrant box, created using Packer and VirtualBox as provider, it automatically tries to update packages at startup. But, since after the first boot the ...
0 votes
1 answer
212 views
Ansible module ansible.builtin.user not working with Ubuntu generic boxes
Try to up generic/ubuntu18(20|22) image and add users there by ansible.builtin.user module. It goes OK, but user not adding really. Why does it goes? Ansible: 2.16.3 Vagrant: 2.4.3 Host OS: Ubuntu 24....
1 vote
1 answer
417 views
`vagrant box update` fails with `metadata for the box was malformed` error
$ vagrant box update ==> default: Checking for updates to 'ubuntu/jammy64' default: Latest installed version: 20231027.0.0 default: Version constraints: 20241002.0.0 default: Provider: ...
1 vote
0 answers
103 views
Vagrant: Windows 10/11 boxes power off after approximately 30mins
I am setting up a host with Windows 10/11 by Vagrant+Ubuntu+VirtualBox. Using this images: StefanScherer/windows_10 StefanScherer/windows_11 Code for machine, Windows 10 example (same for others): ...
1 vote
0 answers
267 views
MacOS ARM chip virtqemud-sock missing
I am trying to run an x86 VM on Mac Silicon using QEMU, Libvirt and Vagrant. I have installed QEMU via brew as well as libvirt: brew install libvirt qemu When I attempt to launch the VM via vagrant I ...
0 votes
1 answer
92 views
Which piece of software touches network configuration files of a VM in a vagrant-libvirt setup with kvm/qemu?
Which element in a vagrant-libvirt-qemu/kvm-chain is responsible to actually configure the VM? Like editing the network configuration files. Wouldn't that totally depend on the details of the OS of ...
0 votes
1 answer
583 views
Cloud Init can't create Apt source from k8s.io due to 302 redirect
I'm attempting to add the k8s.io apt package source to a VM using cloud-init, but the URL provided from the docs does a 302 redirect, and gpg doesn't like that. cloud-init config.yml: apt: ...
1 vote
0 answers
1k views
how to make two qemu guests communicate between them as well as with the host
I'm on MacOS with apple silicon. I'm tring to set up a vangrant environment of two nodes which both should be able to see each other and be reachable by the host. For that, this is the Vagrantfile I'm ...
1 vote
1 answer
57 views
Scripted Password Change Does Not Survive Reboot Unless One Login Occurs - Debian 11
I am trying to automatically set the root password to random characters via bash script. The script is part of a Vagrant shell provisioner. If the script runs the password change only, I am able to ...
0 votes
1 answer
998 views
Vagrant : how to create a box from aws ami?
I see vagrant as a great tool for testing and I am surprised the aws plugin (here https://github.com/mitchellh/vagrant-aws but which seems deprecated) is here to instanciate ec2 and not copy same ...
0 votes
1 answer
2k views
No package matching 'php7.2' is available
I am trying to install php with ansible but can don't know what is going wrong. this is my ansible file --- - apt_repository: repo: "ppa:ondrej/php" update_cache: yes - apt: ...
0 votes
1 answer
487 views
Configuration for routing two subnets in Vagrant for Docker overlay network
For labs in Docker Deep Dive chapter 12, I set the VMs like a following Vagrantfile: Vagrant.configure("2") do |config| config.vm.box = "ubuntu/focal64" config.vm.box_version = ...
1 vote
1 answer
905 views
force vagrant VM to prioritize eth1 interface in standard routes
I'm deploying a vagrant box (libvirt) that needs to serve podman containers to the host network. Somehow the exposed ports of these containers can be accessed from the host network (i.e. on 192.168.1....
0 votes
1 answer
232 views
Trigger NTP restart after `vagrant resume`
I manage some Debian 11 server VMs using Vagrant. Sometimes I need to vagrant suspend them, and I noticed that after vagrant resume, their system time is off. Running systemctl status ntp shows the ...
0 votes
0 answers
3k views
Docker accessible via localhost:8080 & 127.0.0.1:8080 but not via IP
I have the below scenario - 3x Vagrant VMs are spinned from the below Vagrantfile, up and running (visible within Oracle VirtualBox). I am logged on docker1, the network type is "NAT", ...
2 votes
1 answer
230 views
How do you determine the location of a Vagrantfile from virt-manager?
OS is Debian 10, vagrant provider is libvirt. vagrant global-status is supposed to provide information on all vms on a system, but I can see shutoff and running vms in virt-manager that are not listed ...
1 vote
0 answers
672 views
Running Vagrant VM on Ubuntu 20.04 VM on VirtualBox on Windows 11 Host Machine, Need SSH access to vagrant from windows 11
I am doing a computer vision project, and I have Vagrant VM on Ubuntu 20.04 VM on VirtualBox on Windows 11 Host Machine. I'd like to use the Windows 11 host machine for the CV since it needs a lot of ...
0 votes
1 answer
191 views
strange NAT issues with pfSense to vagrant VM
This one has got me confused: I have a pfSense firewall (let's call it pfs) and behind it several servers. I NAT several services from my public IP to different servers on the LAN without any issues. ...
1 vote
0 answers
128 views
Vagrant ssh config fault
Good afternoon. There was a need to configure SSH access from an external network to a virtual machine in Vagrant (VirtualBox, CentOS/7). I made a mistake somewhere and lost the ability to connect to ...
0 votes
1 answer
577 views
Bridging on Linux using TAP devices (Virtuallbox)
Bridging on Linux using TAP devices Hello, I have got the following schema: In order to be able to ping the remote hosts, separatehost1 in my case, I bring up bridge device br0 which combine tap0 + ...
0 votes
1 answer
109 views
Vagrant Windows 10 package step removes user profile?
I'm building a Vagrant Windows 10 box (using libvirt, based on the workflow documented at here: https://fishilico.github.io/generic-config/windows/vagrant.html). After the VM is ready, I run: vagrant ...
1 vote
0 answers
146 views
Mac OsX (Vagrant 2.2.18) DNS lookup 5s latency
On a regular VM - Vagrant Box (LAMP) on Mac OS, while making a trivial call, there is a 5 Seconds DNS Lookup delay. Is there any reason for it or solution? Already installed BerlinVagrant/vagrant-dns ...
0 votes
1 answer
1k views
vagrant ssh fails with OpenSSL version mismatch
I've been troubleshooting an issue with Vagrant, $ vagrant ssh OpenSSL version mismatch. Built against 100020ef, you have 1000106f $ but if I build the corresponding ssh command manually with the ...
0 votes
1 answer
1k views
Why does my MySQL server suddenly not start. ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) [closed]
Suddenly my MySQL server will not start. running mysql in the cli will return ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) I was running a ...
0 votes
0 answers
167 views
Using Puppet to configure hypervisor
I am looking to use Puppet to configure a bare-metal host to spawn VMs using Vagrant/VirtualBox, whose configurations will also be managed by Puppet. I think this can be achieved by: Installing ...
0 votes
0 answers
282 views
I am trying to set up a drupal site using docker in a Vagrant VM and can't seem to get Certbot to work
So I am trying to set up a drupal site using docker in a vagrant VM using bento/ubuntu-20.04. I went through this tutorial: https://www.digitalocean.com/community/tutorials/how-to-install-drupal-with-...
2 votes
0 answers
375 views
why my Vagrantfile run provision after each vm created when I was trying to make ti only run after all vm created
I have a Vagrantfile as below, and I wish to run ansible provision only one time after all vm are created, but actually it runs each time after a vm created, I do not know why? How can I make the ...
0 votes
0 answers
4k views
Read error (Connection reset by peer) in headers on Vagrant
Trying to install aaPanel into a vagrant machine. vagrant box used is Scotch box 3.5 which preloaded with php v7.0. I've updated php to v7.4 using sury's ppa and working fine. I've used given ...
1 vote
0 answers
917 views
Trying to Install Kubernetes with Vagrant and Ansible on Ubuntu 16.04 lab
So I am trying to install Kubernetes on a lab with Vagrant and Ansible. I am using the following documentation on Ubuntu 16.04: https://kubernetes.io/blog/2019/03/15/kubernetes-setup-using-ansible-and-...
0 votes
1 answer
565 views
Vagrant - Provisioning multitple VBox-VMs with pre-defined names
I have a bit of trouble provisioning a multi-machine setup from a Vagrantfile. VM_NAME="node" IMAGE_NAME="centos/7" Nodes=3 NodeMEM=4096 NodeCPU=2 NodeGUI=false (1..Nodes).each do ...
1 vote
0 answers
331 views
Unable to run a private network with Unprivileged LXC containers
we're trying to setup a private network that using unprivileged containers. The Vagrantfile is as follow : # -*- mode: ruby -*- # vi: set ft=ruby : require 'yaml' settings = YAML.load_file 'config....
2 votes
1 answer
5k views
Why can't I ssh into a Vagrant Ubuntu 20.04 VM (focal) but I can to 18.04 and 16.04 VMs on the same host?
I'm running Vagrant 2.2.9 using Virtualbox 6.1.12. My host OS is Ubuntu 20.04 I need to run VMs with different versions of Ubuntu: 16.04 (xenial), 18.04 (bionic) and 20.04 (focal). Xenial and Bionic ...
1 vote
1 answer
847 views
Vagrant Docker refuses connection
Stack I'm running the following: Metal Ubuntu 18.04 vagrant dockerprovider gitlab dk Expectation I'm trying to curl localhost:3000 to reach gitlab. When I do that from the vagrant box, it works: ...
5 votes
0 answers
4k views
What the best way to export a Vagrant box to OVF?
My goal was to create a Virtual Machine programmatically like you would do for a container with docker and be able to export it in an OVF. So I used Vagrant to create the VM. Combining Vagrant and ...
0 votes
1 answer
689 views
tried php install and show error packcage php-7.3.17-1.el7.remi.x86_64 (remi-php73)
I tried 「sudo yum --enablerepo=remi-php73 install php-pdo php-mysql」in vagrant and show Requires: libcrypto.so.10(OPENSSL_1.0.2)(64bit) error: package: php-7.3.17-1.el7.remi.x86_64 (...
1 vote
2 answers
3k views
libvirt uses ipv6, ipv6 disabled on host
This question was the same I have found to my issue. It has no answer. I am running vagrant on my Ubuntu and have ipv6 disabled. When I create an image with vagrant, libvirt returns: Error while ...
0 votes
1 answer
785 views
Vagrantbox with Hyper-V not starting
I'm trying to setup a vagrantbox with Hyper-V on my local windows-10 mashine. My Workstation is running behind a proxy, but I configured a local cntlm proxy to get around these limitations. Proxy ...
0 votes
2 answers
503 views
How to use Ansible to control VM servers running Vagrant?
I've got a couple of servers running each few virtual machines. On each server I use Vagrant to create and control VMs. Now I want to find some tool (thought about Ansible cause I know it a little bit)...
1 vote
0 answers
320 views
Add an existing vm to vagrant global environment
Something happened and I no longer have any vagrant boxes in my global environment. In other words: $ vagrant global-status id name provider state directory ----------------------------------...
2 votes
1 answer
3k views
Possible to create libvirt network as non-root?
My end goal is to be able to use libvirt.uri = 'qemu:///session' with Vagrant, which means creating machines as non-root, but in order to do that I need to have a default libvirt network as non-root, ...
1 vote
0 answers
1k views
SOLVED - Kali linux openvas installation fail
I have Kali 2019.4 installed into a Virtualbox machine (4GB, 2-CPU) fully updated and upgraded. I'm trying to install openvas directly from the Kali repository (apt install openvas) as root, but it ...
0 votes
1 answer
438 views
Ansible include loop in a Role on Vagrant multihost environment Fails
Running Vagrant multi-host with CentOS7 as an Ansible controller and few Linux distro clients for testing Ansible playbooks. Have NFS shared files mounting at /vagrant/ on the Cent7 Ansible ...
0 votes
1 answer
1k views
What is the correct syntax for a multi-network multi-host Vagrantfile?
I'm trying to create several hosts that have multiple networks along with the term define. I do not know Ruby and I'm not sure what is wrong with this syntax. Can someone please offer some advice ...
0 votes
1 answer
335 views
Chef: Kitchen Converge fails on Windows 10 Guest using Vagrant FileTransporter Error
As described in the bug I created here: https://github.com/test-kitchen/kitchen-vagrant/issues/407 When I perform a kitchen converge on a freshly created Windows 10 box, it connects and begins ...
0 votes
1 answer
264 views
Notify an ansible server to run a playbook on a VM
I have a virtual machine set up with Vagrant. The plan is to provision the vm with a shell script. The Script shall do things, connect to my company's ansible server and let the server run a playbook ...
0 votes
1 answer
298 views
Run Virtuozzo OpenVZ 7 prlctl commands as non-root user
I created a Virtualbox VM for Virtuozzo OpenVZ 7 using this image: https://download.openvz.org/virtuozzo/releases/openvz-7.0.9-439/x86_64/iso/openvz-iso-7.0.9-439.iso I want to create a Vagrant box ...
3 votes
1 answer
16k views
How to configure SSH for Vagrant environment?
I prepared a cluster of 4VM's with this Vagrantfile. hosts = { "n1" => "192.168.77.10", "n2" => "192.168.77.11", "n3" => "192.168.77.12", "n4" => "192.168.77.13" } Vagrant.configure("2") ...
0 votes
0 answers
798 views
vagrant-proxyconf failing on setting proxy for docker
I'm using vagrant with vagrant-proxyconf to configure the proxy for the vagrant box. Unfortunately on vagrant up it fails and stops upon the Step "Configuring proxy for Docker..." The error message ...