Skip to content

Commit

Permalink
[FAB-3342] fix vagrant up on Windows
Browse files Browse the repository at this point in the history
Fix [FAB-3342] by specifying the host ip in config.wm.network commands.

Here is the trace of the launch after applying this fix:
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'hyperledger/fabric-baseimage' is up to date...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 7050 (guest) => 7050 (host) (adapter 1)
    default: 7051 (guest) => 7051 (host) (adapter 1)
    default: 7053 (guest) => 7053 (host) (adapter 1)
    default: 7054 (guest) => 7054 (host) (adapter 1)
    default: 5984 (guest) => 15984 (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: Machine booted and ready!
==> default: Checking for guest additions in VM...
    default: The guest additions on this VM do not match the installed version of
    default: VirtualBox! In most cases this is fine, but in rare cases it can
    default: prevent things such as shared folders from working properly. If you see
    default: shared folder errors, please make sure the guest additions within the
    default: virtual machine match the version of VirtualBox you have installed on
    default: your host and reload your VM.
    default:
    default: Guest Additions Version: 5.0.24
    default: VirtualBox Version: 5.1
==> default: Mounting shared folders...
    default: /vagrant => C:/Users/lehors/Documents/Projects/Go/src/github.com/hyperledger/fabric/devenv
    default: /local-dev => C:/Users/lehors/Documents/Projects/Go/src/github.com/hyperledger/fabric
    default: /hyperledger => C:/Users/lehors/Documents/Projects/Go/src/github.com/hyperledger/fabric
    default: /opt/gopath/src/github.com/hyperledger/fabric => C:/Users/lehors/Documents/Projects/Go/src/github.com/hyperledger/fabric
    default: /opt/gopath/src/github.com/hyperledger/fabric-ca => C:/Users/lehors/Documents/Projects/Go/src/github.com/hyperledger/fabric-ca
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.

Change-Id: I9205e00725e7a00d40bf731f5fc645df3061e778
Signed-off-by: Arnaud J Le Hors <[email protected]>
  • Loading branch information
lehors committed Apr 22, 2017
1 parent 0d3909c commit e2401b0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions devenv/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ Vagrant.configure('2') do |config|
config.vm.box = "hyperledger/fabric-baseimage"
config.vm.box_version = ENV['USE_LOCAL_BASEIMAGE'] ? "0": baseimage_release # Vagrant does not support versioning local images, the local version is always implicitly version 0

config.vm.network :forwarded_port, guest: 7050, host: 7050 # fabric orderer service
config.vm.network :forwarded_port, guest: 7051, host: 7051 # fabric peer service
config.vm.network :forwarded_port, guest: 7053, host: 7053 # fabric peer event service
config.vm.network :forwarded_port, guest: 7054, host: 7054 # fabric-ca service
config.vm.network :forwarded_port, guest: 5984, host: 15984 # CouchDB service
config.vm.network :forwarded_port, guest: 7050, host: 7050, host_ip: "127.0.0.1" # fabric orderer service
config.vm.network :forwarded_port, guest: 7051, host: 7051, host_ip: "127.0.0.1" # fabric peer service
config.vm.network :forwarded_port, guest: 7053, host: 7053, host_ip: "127.0.0.1" # fabric peer event service
config.vm.network :forwarded_port, guest: 7054, host: 7054, host_ip: "127.0.0.1" # fabric-ca service
config.vm.network :forwarded_port, guest: 5984, host: 15984, host_ip: "127.0.0.1" # CouchDB service

config.vm.synced_folder "..", "#{SRCMOUNT}"
config.vm.synced_folder "..", "/opt/gopath/src/github.com/hyperledger/fabric"
Expand Down

0 comments on commit e2401b0

Please sign in to comment.