Creating network interface in VM?

2008-11-15 Thread Jesse Sheidlower

I'm running FreeBSD 7.1-BETA2 in a virtual machine in
VirtualBox, running on a Linux (Debian) host. I was able to
set up everything quite easily, and originally set up
networking over NAT. But after some questions on the VB
mailing list about accessing the guest from the host (so I can
use the FreeBSD VM as a test server from my host), I decided
to set up Host Interface Networking (without bridging, as I
only want the VM visible to the host, not the rest of the
network).

The instructions I was following were pretty straightforward,
though they were for a Linux guest:

---
auto vbox0
iface vbox0 inet static
address 192.168.5.1
netmask 255.255.255.0
---

is the setup for the Linux host, and the guest is supposed to
be the same thing with a different IP address. Using this alone,
I was already able to reach the Linux host from my FreeBSD VM.

I tried to set this up on the FreeBSD side, but I am unable to
even create the vbox0 interface:

---
# ifconfig vbox0 create
ifconfig: SIOCIFCREATE2: Invalid argument
---

Googling hasn't been much help. How do I get this done?

Thanks.

Jesse Sheidlower
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Creating network interface in VM?

2008-11-15 Thread Polytropon
On Sat, 15 Nov 2008 17:17:25 -0500, Jesse Sheidlower [EMAIL PROTECTED] wrote:
 I'm running FreeBSD 7.1-BETA2 in a virtual machine in
 VirtualBox, running on a Linux (Debian) host.
 [...]
 I tried to set this up on the FreeBSD side, but I am unable to
 even create the vbox0 interface:
 
 ---
 # ifconfig vbox0 create
 ifconfig: SIOCIFCREATE2: Invalid argument
 ---
 

I'm not sure, but I think what you're searching for would be to
have VB create a NIC substitute for the FreeBSD guest OS. When
you said, you could reach network from out of the FreeBSD VB,
a virtual network adapter. Which interface did you use from
within FreeBSD?

As far as I know, there's no vbox (pseudo)interface driver in
FreeBSD, that's why the ifconfig create command returned an error.



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Creating network interface in VM?

2008-11-15 Thread Steven Susbauer
Polytropon wrote:
 On Sat, 15 Nov 2008 17:17:25 -0500, Jesse Sheidlower [EMAIL PROTECTED] 
 wrote:
 I'm running FreeBSD 7.1-BETA2 in a virtual machine in
 VirtualBox, running on a Linux (Debian) host.
 [...]
 I tried to set this up on the FreeBSD side, but I am unable to
 even create the vbox0 interface:

 ---
 # ifconfig vbox0 create
 ifconfig: SIOCIFCREATE2: Invalid argument
 ---

 
 I'm not sure, but I think what you're searching for would be to
 have VB create a NIC substitute for the FreeBSD guest OS. When
 you said, you could reach network from out of the FreeBSD VB,
 a virtual network adapter. Which interface did you use from
 within FreeBSD?
 
 As far as I know, there's no vbox (pseudo)interface driver in
 FreeBSD, that's why the ifconfig create command returned an error.
 
 
 
The guest machine is always going to use the virtual driver provided by
virtualbox, which is configured through the virtualbox gui control
before you start the machine. I suggest trying to configure that
interface, not vbox0. vbox0 is an interface on the host OS.

This howto from Ubuntu may help you out; notice that everything is
configured on the host machine, the guest machine has no real
differences: https://help.ubuntu.com/community/VirtualBox#Networking



signature.asc
Description: OpenPGP digital signature


Re: Creating network interface in VM?

2008-11-15 Thread Jesse Sheidlower
On Sat, Nov 15, 2008 at 07:52:18PM -0600, Steven Susbauer wrote:
 Polytropon wrote:
  On Sat, 15 Nov 2008 17:17:25 -0500, Jesse Sheidlower [EMAIL PROTECTED] 
  wrote:
  I'm running FreeBSD 7.1-BETA2 in a virtual machine in
  VirtualBox, running on a Linux (Debian) host.
  [...]
  I tried to set this up on the FreeBSD side, but I am unable to
  even create the vbox0 interface:
 
  ---
  # ifconfig vbox0 create
  ifconfig: SIOCIFCREATE2: Invalid argument
  ---
 
  
  I'm not sure, but I think what you're searching for would be to
  have VB create a NIC substitute for the FreeBSD guest OS. When
  you said, you could reach network from out of the FreeBSD VB,
  a virtual network adapter. Which interface did you use from
  within FreeBSD?
  
  As far as I know, there's no vbox (pseudo)interface driver in
  FreeBSD, that's why the ifconfig create command returned an error.
  
  
  
 The guest machine is always going to use the virtual driver provided by
 virtualbox, which is configured through the virtualbox gui control
 before you start the machine. I suggest trying to configure that
 interface, not vbox0. vbox0 is an interface on the host OS.

Ah, of course. That makes total sense, sorry I didn't grok this
before.

One of the virtual network cards worked fine, using the le0
driver, so I set up the le0 driver to use NAT to reach the
outside, and then configured VB to use the same kind of
virtual network card to run HIF networking, and set up the le1
driver in my FreeBSD machine at the appropriate addresses.
Now everything works: I can reach the outside via the le0
driver and I can reach to and from my host with the le1
driver.

Thanks!

Jesse Sheidlower
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]