Posts

Showing posts with the label Vagrant

Solved: Cannot connect Postgre in VM from host

Used vagrant for setting up the VM, so set private network and port forward in vagrant file as below -                                  migration.vm.network "private_network", ip: "192.168.33.10"                  migration.vm.network "forwarded_port" ,guest:5432 , host:15432  1. Use telnet localhost 15432 to see if the port is open (Host) Still can not connect to PostgresSql running in VM  :( Then 2. Edit postgresql.conf (Guest) #------------------------------------------------------------------------------ # CONNECTIONS AND AUTHENTICATION #------------------------------------------------------------------------------ # - Connection Settings -            listen_addresses = '*' 3.  Add following in pg_hba.conf # IPv4 local connections: host    all         ...

Good compatibility of latest vagrant and virtual box

Continuing from my older post   on Vagrant 1.7.2 / 1.9.2 and Virtualbox 4.3.12  / 5.1.14. I upgraded into Vagrant 1.9.2 and 5.0.x and 5.1.x , because of security vulnerabilities on those Virtualbox versions, but my shell provisions and puppet provision that used to work on old setting suddenly stopped working and tried various workaround to make them working but failed until Virtualbox 5.1.18. I use chocolaty , to upgrade/install vagrant and virtual box in Windows 7 host and able to fire 'vagrant up' to provision my new guest. Step 1 Install chocolaty in host machine using cmd.exe (Run elevated) @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"    choco -v  (Just to make sure chocolaty installed correctly)      0.10.3 (as of 3/16/2017) Step 2 Open Windows' power shell (...

Solution: Vagrant stopped working - `open': Access is denied. (5) (ChildProcess::Error)

ERROR from CMD with out running vagrant up as administrator There was an error while executing `VBoxManage`, a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below. Command: ["showvminfo", "18021ea0-83ee-43c3-9adb-26ad7eb0c6ca"] Stderr: VBoxManage.exe: error: Failed to create the VirtualBox object! VBoxManage.exe: error: Code CO_E_SERVER_EXEC_FAILURE (0x80080005) - Server execu tion failed (extended info not available) VBoxManage.exe: error: Most likely, the VirtualBox COM server is not running or failed to start. Error on running vagrant up as administrator from CMD C:/HashiCorp/Vagrant/embedded/gems/gems/childprocess-0.5.9/lib/childprocess/wind ows/handle.rb:12:in `open': Access is denied. (5) (ChildProcess::Error) from C:/HashiCorp/Vagrant/embedded/gems/gems/childprocess-0.5.9/lib/chil dprocess/windows/process.rb:70:in `launch_process' from C:/HashiCorp/Vagrant/embedded/gems/gems/childprocess...

[SOLUTION] Vagrant - Remote connection disconnect. Retrying ...

Here is error from guest machine, complaining about remote connection ==> default: Attempting graceful shutdown of VM... ==> default: Clearing any previously set forwarded ports... ==> default: Clearing any previously set network interfaces... ==> default: Preparing network interfaces based on configuration... default: Adapter 1: nat default: Adapter 2: hostonly ==> default: Forwarding ports... default: 80 (guest) => 8080 (host) (adapter 1) default: 3000 (guest) => 3000 (host) (adapter 1) default: 22 (guest) => 2222 (host) (adapter 1) ==> default: Running 'pre-boot' VM customizations... ==> default: Booting VM... ==> default: Waiting for machine to boot. This may take a few minutes... default: SSH address: 127.0.0.1:2222 default: SSH username: vagrant default: SSH auth method: private key default: Warning: Remote connection disconnect. Retrying... default: Warning: Remote ...

[SOLUTION] Vagrant box authentication failure after packaging box

ERROR IN NEWLY PACKAGED BOX AFTER - vagrant up Bringing machine 'default' up with 'virtualbox' provider... ==> default: Clearing any previously set forwarded ports... ==> default: Clearing any previously set network interfaces... ==> default: Preparing network interfaces based on configuration... default: Adapter 1: nat default: Adapter 2: hostonly ==> default: Forwarding ports... default: 22 => 2222 (adapter 1) ==> default: Running 'pre-boot' VM customizations... ==> default: Booting VM... ==> default: Waiting for machine to boot. This may take a few minutes... default: SSH address: 127.0.0.1:2222 default: SSH username: vagrant default: SSH auth method: private key default: Warning: Connection timeout. Retrying... default: Warning: Authentication failure. Retrying... default: Warning: Authentication failure. Retrying... default: ...

[SOLVED] Vagrant & Virtualbox - The guest machine entered an invalid state while waiting for it to boot....

Last couple of days I was running a Virtualbox issue "The guest machine entered an invalid state while waiting for it to boot. Valid states are 'starting, running'. The machine is in the 'poweroff' state. Please verify everything is configured properly and try again." I had not clue how to fixed that and I have tried several versions and several installation. Then, then installation of Virtualbox 4.3.12 is working fine so far. If you are running into similar issue get  rid of all new Virtualbox versions and try with version 4.3.12,  VirtualBox-4.3.12-93733-Win.exe , that might helps you solve the problem. This version can be downloaded from:                                                http://dlc-cdn.sun.com/virtualbox/4.3.12/ Similarly, if you are using vagrant I recommend to use Vagrant 1.7.2. Please note that not all versions of vagrant and virtua...