How to do bridging in Vagrant?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to do bridging in Vagrant?

Zhao Ziran
I am getting quite confusing with vagrant ssh. Currently I have 
Host: Windows 8
VM  : Virtual Box + Ubuntu 12.04
I succeed in setting guest system attached to bridged adapter and made it visible in local network so I can connect to it via ssh.
ssh vagrant@192.168.11.3
However, when I tried vagrant up.
I got this error.
[default] VM already created. Booting if it's not already running...
[default] Clearing any previously set forwarded ports...
[default] You are trying to forward to privileged ports (ports <= 1024). Most
operating systems restrict this to only privileged process (typically
processes running as an administrative user). This is a warning in case
the port forwarding doesn't work. If any problems occur, please try a
port higher than 1024.
[default] Forwarding ports...
[default] -- 22 => 1022 (adapter 1)
[default] VirtualBox adapter #1 not configured as "NAT". Skipping port
forwards on this adapter.
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
Vagrant couldn't determine the SSH port for your VM! Vagrant attempts to
automatically find a forwarded port that matches your `config.ssh.guest_port`
(default: 22) value and uses this for SSH. Alternatively, if `config.ssh.port`
is set, it will use this.

However, in this case Vagrant was unable to find a forwarded port that matches
the guest port and `config.ssh.port` is not set!

Please make sure that you have a forwarded port that goes to the configured
guest port value, or specify an explicit SSH port with `config.ssh.port`.

What actually should I do to config if I want to do bridging ?

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: How to do bridging in Vagrant?

VMTrooper
Zhao,

Can you post your Vagrantfile?

Are you trying to make any changes to the default NIC that Vagrant provisions when it deploys the box?  If so, it is advisable instead to just create a second NIC and make your changes to the second one.  Vagrant likes to use the first NIC to do some post-provision configs.  Also, I believe the vagrant ssh command uses the first NIC to access the VM.

-Trevor



On Wednesday, May 8, 2013 11:44:08 PM UTC-7, Zhao Ziran wrote:
I am getting quite confusing with vagrant ssh. Currently I have 
Host: Windows 8
VM  : Virtual Box + Ubuntu 12.04
I succeed in setting guest system attached to bridged adapter and made it visible in local network so I can connect to it via ssh.
ssh <a href="javascript:" target="_blank" gdf-obfuscated-mailto="QX86fF_Wfk8J">vag...@192.168.11.3
However, when I tried vagrant up.
I got this error.
[default] VM already created. Booting if it's not already running...
[default] Clearing any previously set forwarded ports...
[default] You are trying to forward to privileged ports (ports <= 1024). Most
operating systems restrict this to only privileged process (typically
processes running as an administrative user). This is a warning in case
the port forwarding doesn't work. If any problems occur, please try a
port higher than 1024.
[default] Forwarding ports...
[default] -- 22 => 1022 (adapter 1)
[default] VirtualBox adapter #1 not configured as "NAT". Skipping port
forwards on this adapter.
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
Vagrant couldn't determine the SSH port for your VM! Vagrant attempts to
automatically find a forwarded port that matches your `config.ssh.guest_port`
(default: 22) value and uses this for SSH. Alternatively, if `config.ssh.port`
is set, it will use this.

However, in this case Vagrant was unable to find a forwarded port that matches
the guest port and `config.ssh.port` is not set!

Please make sure that you have a forwarded port that goes to the configured
guest port value, or specify an explicit SSH port with `config.ssh.port`.

What actually should I do to config if I want to do bridging ?

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.