I've been using vagrant for provisioning virtual machines (Linux only) and so far I've been happy with it. The two things I dislike about it - the hardcoded dependency on the
user vagrant as well as making the very first interface a virtual box NAT - this causes some routing problems when communicating outside my LAN - it has eth0 created by vagrant and eth1 in bridged mode. As far as I understand, this was a design decision so there is no way around it.
I currently use vagrant
- To create a Virtual Box virtual machine,
- Set Static IP/MAC addresses
- Create my own secondary user, and then treat it as a standalone "physical" host. I then use this user for any additional provisioning.
I can delete the
user vagrant - the problem is that if I do vagrant up (or vagrant halt I believe to gracefully shutdown) it tries to ssh and the command hangs while it retries. The other problem is that I need to delete it each time I spin up a VM and I cannot when doing the first time provisioning because I am logged in as user vagrant.
I've been wondering if there is any other similar software/tool that just does a one time provision, sets up a static IP/MAC address, and allows for easy start/resume/shutdown when testing/deploying/maintaining.
I've been looking at Hashicorp's packer but I don't think it is possible to automatically configure IP/MAC addresses.
I am mainly looking for creating a virtual machine from scratch as if it was installed on a bare metal desktop computer by hand using a ISO on a CD.
In the end, using packer to provision and then using VirtualBox command line tools to recreate some of the functionality that vagrant does will suffice (sett IP/MAC address) - but I wonder if there are any other tools used for creating secure (no vagrant user and ssh only with private key) vms.