There are several commands under the VBoxManage umbrella that require the guest machine already be running (e.g. controlvm, guestcontrol) but all the vbox configuration I see in the Vagrantfile happens before the machine has started.
Is there a way in the Vagrantfile to configure the machine after it has started?
The goal of vagrant is to abstract the creation of VM for multiple provider (including VirtualBox) it is not really to provide all manipulation of the VM afterwards and replace the VBoxManage -
If you need to run command after the VM has started and run it from Vagrantfile
, I would suggest to look at the vagrant-triggers plugin which :
Allow the definition of arbitrary scripts that will run on the host before and/or after Vagrant commands.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With