Sergii Vorobei
Sergii Vorobei

Reputation: 1487

Please clarify vagrant behavior

I have just started working with Vagrant. After starting guest machine and making some changes (e.g. installed some updates and python virtualenvs). And after few (vagrant halt and vagrant reload) when I ssh-ed into guest machine I noticed that all my changes disappeared. When I opened the Virtualbox I saw that there were two boxes with the name of my folder with guest os and on every vagrant up it seems like it is starting the second machine. When I started the first guest os through virtual box interface I saw that my data was present. How can I start with vagrant the first machine? Should I delete the second? When was it created?

Start with vagrant up

Vagrantfile

Vagrant.configure(2) do |config|
  config.vm.box = "trusty_14"
  config.vm.network "forwarded_port", guest: 8000, host: 8000
end`

Upvotes: 0

Views: 43

Answers (1)

Sergii Vorobei
Sergii Vorobei

Reputation: 1487

So I tried to vagrant destroy. The second machine was deleted indeed, but after vagrant up the new one was created.

Then I checked the id's following @Frédéric Henri advice, and in id file was id of second machine, so I have replaced it with the id of first machine from VBoxManage list vms, and everything works! But still did not get how and when the second machine was created...

Upvotes: 0

Related Questions