New box provisioned rather than using previous

46 views
Skip to first unread message

Bob Van

unread,
Jul 14, 2016, 12:07:52 AM7/14/16
to Vagrant
I've worked some with vagrant ubuntu (precise64) on windoz7, from cygwin, and not really using the VBox Manager app. On WInXP, I setup vagrant with an old precise32 and after running it and installing several ruby packages, I come back a couple of days later and 'vagrant up' provisions a new box, where I want my old one. I tried using VBox Manager to add the machine under cygwin, and could start it, but it lacks all the ruby stuff. Also it has no mouse so I lost control of the PC whci I suppose I would need to press 'ESC' or something. Why does 'vagrant halt' destroy my vm with ruby? Is there a way to get it back and start it?

Alvaro Miranda Aguilera

unread,
Jul 14, 2016, 5:01:36 PM7/14/16
to vagra...@googlegroups.com
Hello,

whats the output of VBoxManage list vms ?

What could happen is that the machine is there but not being used.

Alvaro.

On Wed, Jul 13, 2016 at 10:07 PM, Bob Van <overm...@gmail.com> wrote:
I've worked some with vagrant ubuntu (precise64) on windoz7, from cygwin, and not really using the VBox Manager app. On WInXP, I setup vagrant with an old precise32 and after running it and installing several ruby packages, I come back a couple of days later and 'vagrant up' provisions a new box, where I want my old one. I tried using VBox Manager to add the machine under cygwin, and could start it, but it lacks all the ruby stuff. Also it has no mouse so I lost control of the PC whci I suppose I would need to press 'ESC' or something. Why does 'vagrant halt' destroy my vm with ruby? Is there a way to get it back and start it?

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/d4c9c1a6-f8db-4f17-a48b-24367694eef6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Bob Van

unread,
Jul 15, 2016, 11:50:49 AM7/15/16
to Vagrant
I tried that and got 'command not found', but have now added vboxmgr to my (windoz7) path (which is exported to cygwin in bashrc).

On windoz7 it lists the vbox name under my cygwin home, where I did the init. It comes up OK and says 'Machine already provisioned.'. When I exec 'ruby -v' it has the new ruby so that setup seems to work OK.

The XP setup is the problem then. I'll have to add VBoxManager to its path and see on that.

On XP, there's a VBox VM dir under cygwin home with the VM I installed pkgs in, and under 'c:\docs and settings\username\VBox VMs' I see new ones get created there when I run 'vagrant up', though I didn't 'init' a vbox there. Maybe the system is confused on the 'owner/user', with cygwin not really doing things the windoz way. Maybe I should just cd into the windoz user dir, init a vbox there, install pkgs and work from there instead of cygwin home.

I actually saved all the commands to install all the stuff I added so am able to go through it again, as I have once already. I intend on putting them into a script called by vagrant during provisioning so I can recreate this sort of setup, but I also need to be able to reuse a setup, like when I start adding data into psql.

Alvaro Miranda Aguilera

unread,
Jul 15, 2016, 1:35:00 PM7/15/16
to vagra...@googlegroups.com
Open Virtualbox with full path in both shells and check the path for the virtual machines

what happen is the default directory is <HOME>/VirtualBox VMs

and time by time the HOME changes from shell to shell

its a VirtualBox setting here, related to what the shell is telling the process the home folder is.

Alvaro.

Bob Van

unread,
Jul 16, 2016, 3:26:56 PM7/16/16
to Vagrant
On XP, I added vbox manager to PATH, which I didn't previously use, but have been checking out to see what it's about.

C:\cygwin\home\bvan\VirtualBox VMs

$ VBoxManage list vms
"bvan_default_1468083545000_69164" {97ba6c8d-7821-450f-8476-8915c25e0017}
"<inaccessible>" {c73ba5a9-fcc0-480e-9f8c-3b7ebbc550b8}

My old box, with 2GB 'disk1.vmd' is still there & is in the list. It's the machine I was able to add & start in VBox, but then didn't have ruby, seemed worse than anything & couldn't control it with mouse so had to kill the computer.

The 'inaccessible' one might be one of the new ones which provisioned & then I deleted.

VBox > settings > general > advanced > snapshot folder has 'C:\cygwin\home\bvan\VirtualBox VMs\bvan_default_1468083545000_69164\Snapshots', but that directory doesn't actually have a 'Snapshots' folder.


I don't know how to open vbox as you say, with path and shells and checking path for VM.

I don't know how to check or set the VM home directory.

I ran 'vagrant up' again from cygwin home, & again it spins up a new machine, in 'C:\Documents and Settings\Software Engineer\VirtualBox VMs' rather than where I'm actually running from.

All I want is to 'up' the one in cygwin home, which is already provisioned. I don't want it to keep creating new VMs. I don't really even need to use oracle vbox manager.

Bob Van

unread,
Jul 16, 2016, 3:45:24 PM7/16/16
to Vagrant
I ran 'vagrant global-status' & saw a box with id '9f78296', which doesn't match any values in the files (like 'id') within 'C:\cygwin\home\bvan\.vagrant\machines\default\virtualbox'

I had also tried running 'vagrant up {some val from ..\machines\default\files}, but I just get errors using any of those ids or names.

So I ran 'vagrant up 9f78296' and again it created a new box, rather than using the one which is there, but at least it did it under cygwin home.

Ran 'global-status' again, and the id is different. It's not the one I started, so am still not sure why the VM's aren't controllable.

Bob Van

unread,
Jul 16, 2016, 4:00:14 PM7/16/16
to Vagrant
'global-status' seems to indicate the new vm id is 'dc078ca', so I ran 'vagrant up dc078ca', then halt' and id is still the same, so maybe that's how I can re-use a machine.

I'm not sure why I can't start my old one, unless it got corrupted by adding it vbox and starting it form there.

I guess I'll install all my ruby & psql stuff again and see if it will stick this time.
Reply all
Reply to author
Forward
0 new messages