From 787265c6288cf7d9ffe52361374b400ff1abd439 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sat, 11 Apr 2015 20:28:43 +0100 Subject: [PATCH] Updated post --- ...ix-vagrant-loading-wrong-virtual-machine.md | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/source/_posts/2014-10-06-fix-vagrant-loading-wrong-virtual-machine.md b/source/_posts/2014-10-06-fix-vagrant-loading-wrong-virtual-machine.md index 04310422..ede932d6 100644 --- a/source/_posts/2014-10-06-fix-vagrant-loading-wrong-virtual-machine.md +++ b/source/_posts/2014-10-06-fix-vagrant-loading-wrong-virtual-machine.md @@ -5,12 +5,16 @@ use: - posts slug: fix-vagrant-loading-wrong-virtual-machine tags: - - Vagrant - - VirtualBox + - vagrant + - virtualbox +meta: + description: How to fix it when Vagrant loads the wrong virtual machine. --- -A few times recently, I've had instances where Vagrant seems to have forgotten which virtual machine it's supposed to load, probably due to renaming a project directory or the .vagrant directory being moved accidentally. Here are the steps that I took to fix this and point Vagrant back at the correct VM. +A few times recently, I've had instances where Vagrant seems to have forgotten which virtual machine it's supposed to load, probably due to renaming a project directory or the .vagrant directory being moved accidentally. -* Stop the machine from running using the `$ vagrant halt` command. -* Use the `$ VBoxManage list vms` command to view a list of the virtual machines on your system. Note the ID of the correct VM that should be loading. For example, `"foo_default_1405481857614_74478" {e492bfc3-cac2-4cde-a396-e81e37e421e2}`. The number within the curly brackets is the ID of the virtual machine. -* Within the .vagrant directory in your project (it is hidden by default), update the ID within the machines/default/virtualbox/id file. -* Start the new VM with `$ vagrant up`. \ No newline at end of file +Here are the steps that I took to fix this and point Vagrant back at the correct VM. + +1. Stop the machine from running using the `$ vagrant halt` command. +2. Use the `$ VBoxManage list vms` command to view a list of the virtual machines on your system. Note the ID of the correct VM that should be loading. For example, `"foo_default_1405481857614_74478" {e492bfc3-cac2-4cde-a396-e81e37e421e2}`. The number within the curly brackets is the ID of the virtual machine. +3. Within the .vagrant directory in your project (it is hidden by default), update the ID within the machines/default/virtualbox/id file. +4. Start the new VM with `$ vagrant up`. \ No newline at end of file