For the love of god! Stop Vagrant from booting and ssh to vbox vm (PXE)

Hi there,
to be honest I’m a bit burnt out trying to figure out things with vagrant.

TLDR: I want vagrant to create vms without booting them, so I can, manually, PXE them over the network.

DISCLAIMER:
There is no need to know what I’m using the machines for, nor other approaches, I know I have options, but I want to do it this way.

The situation:
I want vagrant to create 3 machines, with the settings I have on my vagrantfile (that are already working), but not timeout when creating the machines. Ideally, vagrant would create the boxes and sit pretty in there. Period.
I’m using Vagrant and VBox on windows. (it doesn’t really matter what versions I’m using, this problem has been happening from 2014, to AT LEAST, until 4 months ago).

What I’ve tried so far:
1. config.vm.define “dev-vm#{j}”, autostart: false do …
this one, doesn’t create the machine, because, for some reason, not booting it’s unacceptable.
2. config.ssh.insert_key = false
nothing happens. It keeps trying to boot and ssh onto the machine.
3. config.vm.communicator_required = "false"
no changes either. It boots up and tries to ssh as always.
4. dev-vm.vm.box = …
for this one I’ve used … I don’t know, many options “jerry/empty”, “mark34/empty”, :no_box, ‘empty’, so many different options. Some of them fail in one way or another. Some of the boxes, used to be on the repository, but not anymore, so that fails (yes, I did some creative searching and figure out the new repo-name for some of them, and things like that).
Some of those boxes “force” you to have different settings (yes, I could override them eventually, but JESUS, THERE SHOULD BE A SIMPLE, STRAIGHTFORWARD WAY to tell Vagrant “STOP… don’t boot the f*****n machine” (not the provider, but Vagrant itself, this should be a default GLOBAL option) I’ve seen posts asking for this, all the way back to 2014 for god sake!!).
The ‘empty’ case, asks me to build an empty image to make it work. This forces me to find a Linux machine to do all the steps, which are ridiculous (I might add) tbh, User Experience = 0, and … what I’m working on … are layers that are extremely complicated, and too many of them, to add another couple of convoluted layers on top.

some of these settings have been tried with a few variants as well. With quotes, without quotes, with colons, with equal symbol, on different parts of the loops, etc.

What I need…:
Someone to help me with what do I have to put on my vagrantfile (or in the cmd parameters) so ALL the machines are created but not launched, not stopping creation on errors, or anything like that.

There should be a straight forward way to do that with vagrant.
I don’t want to use VBoxManage for 3 machines (today is 3, tomorrow might be hundreds, we don’t know, and we shouldn’t care either. Good software should be ready to scalate in the future, and to be ‘flat’ (to start from a basic premise, and build on top of that).

I don’t need Vagrant to keep inventory, or to destroy the machines, or provision anything. Just create the machines, period.

If there isn’t a setting or anything like that. I ask the Devs, please, just add a global option to create but don’t boot the machine. It should be as simple adding the setting, and something like an “IF” instance. If it is more complicated, then you have serious problems with your codebase.

Thanks for reading me, and even more if you have something constructive to add. I appreciate it!

PS: Except for the booting/PXE failure, everything else works like a charm on the vm.

Well, another fruitless question asked on linux forums V_V

1 Like