I have a Mac OSX host and an Ubuntu guest VM (via VirtualBox) and the guest VM needs access to an ethernet device (a GigE camera) that will be physically plugged into the host via an ethernet cable (using ethernet/thunderbolt adapter).
I have successfully booted my guest VM and can access the Internet fine using the default settings and NAT. The internet is coming to the host machine via WiFi. I don't need to modify this arrangement. I'd like to add a second network adapter to the VM with different settings so that I can access my camera without disrupting the functioning internet access over the first adapter. The camera does not need access to the internet.
When I plug this camera into the host computer, the camera shows up in the System->Network Preferences pane and is assigned an IP address (maybe by a DHCP server running on the host??) Additionally, when I run some test software on the host, it is able to discover the camera at the same IP address reported in the System-Network Preferences pane (and ifconfig on the host).
I basically need to get this same behavior in the guest - I need the guest to behave as though this ethernet camera were plugged directly into one of the ethernet ports on the guest machine.
So far here is what I have done:
Through VirtualBox GUI interface, Settings->Network, I have enabled a second network adapter, set to "Bridged Adapter", and with "Cable Connected" box checked.
Initially when I log into my guest, and run ifconfig I simply see that there is indeed another network interface (logical name enp0s8), but it has no IP address. I then modified (on the guest) the /etc/network/interfaces file to assign a static IP to the enp0s8 interface. Although I am unsure what to use for netmask and gateway, (and other stanzas) once I save the file and reboot the guest, I can run ifconfig and see that the guest enp0s8 interface has an IP. But none of my test software on the guest can find the camera.
What do I need to do to get this ethernet device to show up in my Guest VM?? Is there something I need to do to get the host OSX machine to "release" this interface and basically let the guest have complete control?
I feel like I must be missing a basic networking concept. Any insight would be helpful.
OSX host, Ubuntu guest, bridged ethernet device
-
tcarman@inversionlabs.com
- Posts: 2
- Joined: 3. Aug 2017, 21:57
-
socratis
- Site Moderator
- Posts: 27329
- Joined: 22. Oct 2010, 11:03
- Primary OS: Mac OS X other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Win(*>98), Linux*, OSX>10.5
- Location: Greece
Re: OSX host, Ubuntu guest, bridged ethernet device
We need to see complete IP numbers, DHCP servers, gateways, netmasks, etc. With your camera connected and working, please post the output of the command:tcarman@inversionlabs.com wrote:the camera shows up in the System->Network Preferences pane and is assigned an IP address (maybe by a DHCP server running on the host??)
ifconfig -a
Good. But "Bridged" to what?tcarman@inversionlabs.com wrote:I have enabled a second network adapter, set to "Bridged Adapter", and with "Cable Connected" box checked.
Well, imagine us, who don't have the slightest clue, since you didn't include any numbers at all...tcarman@inversionlabs.com wrote:Although I am unsure what to use for netmask and gateway
There might be. But it's too early to go that route. Post some numbers and then we can see how to proceed.tcarman@inversionlabs.com wrote:Is there something I need to do to get the host OSX machine to "release" this interface and basically let the guest have complete control?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
-
tcarman@inversionlabs.com
- Posts: 2
- Joined: 3. Aug 2017, 21:57
Re: OSX host, Ubuntu guest, bridged ethernet device
OK, great, I am sure this shows how little I know, but I wasn't sure which info would be relevant. Here is what I have collected:
Host computer, camera not connected, ifconfig -a
And here is the host, with the camera connected and functioning. I should mention that the camera is PoE (power over ethernet), so the device seems to turn on and auto-start whenever it is plugged in. It looks to me that the device gets interface en4, and is assigned an IP, although I am not sure who/what takes care of assigning this address?? Also note that this was run on the host with the VM powered OFF.
I attached a screenshot of what my VirtualBox GUI interface Network settings looks like (can't figure out how to get the image to display inline with the img tags??) You might notice that my guest is built with Vagrant. Once I figure out the settings that work using the VirtualBox GUI, I plan to code these settings into my Vagrant file. For now, I have built the machine with Vagrant, but I have been interacting with it using the VIrtualBox GUI interface...
Here is ifconfig -a, run on the HOST, but with the VM guest powered ON - note now there is an en5!? Not sure where this comes from??:
And here are my /etc/network/interfaces file and ifconfig run from the GUEST, camera plugged into host:
And finally from within the Guest, lshw:
Host computer, camera not connected, ifconfig -a
Code: Select all
amac@AlexMBP:~$ ifconfig -a
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
options=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP>
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
nd6 options=201<PERFORMNUD,DAD>
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 60:f8:1d:ab:35:32
inet6 fe80::1089:ddd2:e94a:af23%en0 prefixlen 64 secured scopeid 0x4
inet 10.0.0.5 netmask 0xffffff00 broadcast 10.0.0.255
nd6 options=201<PERFORMNUD,DAD>
media: autoselect
status: active
p2p0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 2304
ether 02:f8:1d:ab:35:32
media: autoselect
status: inactive
awdl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1484
ether 42:86:84:93:b9:f6
inet6 fe80::4086:84ff:fe93:b9f6%awdl0 prefixlen 64 scopeid 0x6
nd6 options=201<PERFORMNUD,DAD>
media: autoselect
status: active
en1: flags=963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX> mtu 1500
options=60<TSO4,TSO6>
ether 72:00:07:28:57:d0
media: autoselect <full-duplex>
status: inactive
en2: flags=963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX> mtu 1500
options=60<TSO4,TSO6>
ether 72:00:07:28:57:d1
media: autoselect <full-duplex>
status: inactive
bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=63<RXCSUM,TXCSUM,TSO4,TSO6>
ether 72:00:07:28:57:d0
Configuration:
id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
ipfilter disabled flags 0x2
member: en1 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 7 priority 0 path cost 0
member: en2 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 8 priority 0 path cost 0
nd6 options=201<PERFORMNUD,DAD>
media: <unknown type>
status: inactive
utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 2000
inet6 fe80::cb3f:8c63:db:a78%utun0 prefixlen 64 scopeid 0xa
nd6 options=201<PERFORMNUD,DAD>
utun1: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1380
inet6 fe80::955:6ae9:e998:7b33%utun1 prefixlen 64 scopeid 0xb
nd6 options=201<PERFORMNUD,DAD>
Code: Select all
amac@AlexMBP:~$ ifconfig -a
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
options=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP>
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
nd6 options=201<PERFORMNUD,DAD>
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 60:f8:1d:ab:35:32
inet6 fe80::1089:ddd2:e94a:af23%en0 prefixlen 64 secured scopeid 0x4
inet 10.0.0.5 netmask 0xffffff00 broadcast 10.0.0.255
nd6 options=201<PERFORMNUD,DAD>
media: autoselect
status: active
p2p0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 2304
ether 02:f8:1d:ab:35:32
media: autoselect
status: inactive
awdl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1484
ether 42:86:84:93:b9:f6
inet6 fe80::4086:84ff:fe93:b9f6%awdl0 prefixlen 64 scopeid 0x6
nd6 options=201<PERFORMNUD,DAD>
media: autoselect
status: active
en1: flags=963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX> mtu 1500
options=60<TSO4,TSO6>
ether 72:00:07:28:57:d0
media: autoselect <full-duplex>
status: inactive
en2: flags=963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX> mtu 1500
options=60<TSO4,TSO6>
ether 72:00:07:28:57:d1
media: autoselect <full-duplex>
status: inactive
bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=63<RXCSUM,TXCSUM,TSO4,TSO6>
ether 72:00:07:28:57:d0
Configuration:
id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
ipfilter disabled flags 0x2
member: en1 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 7 priority 0 path cost 0
member: en2 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 8 priority 0 path cost 0
nd6 options=201<PERFORMNUD,DAD>
media: <unknown type>
status: inactive
utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 2000
inet6 fe80::cb3f:8c63:db:a78%utun0 prefixlen 64 scopeid 0xa
nd6 options=201<PERFORMNUD,DAD>
utun1: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1380
inet6 fe80::955:6ae9:e998:7b33%utun1 prefixlen 64 scopeid 0xb
nd6 options=201<PERFORMNUD,DAD>
en4: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=10b<RXCSUM,TXCSUM,VLAN_HWTAGGING,AV>
ether 98:5a:eb:d7:d6:18
inet6 fe80::10b0:db09:3bf:820a%en4 prefixlen 64 secured scopeid 0xd
inet 169.254.55.88 netmask 0xffff0000 broadcast 169.254.255.255
nd6 options=201<PERFORMNUD,DAD>
media: autoselect (1000baseT <full-duplex,flow-control,energy-efficient-ethernet>)
status: active
Here is ifconfig -a, run on the HOST, but with the VM guest powered ON - note now there is an en5!? Not sure where this comes from??:
Code: Select all
amac@AlexMBP:~$ ifconfig -a
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
options=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP>
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
nd6 options=201<PERFORMNUD,DAD>
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 60:f8:1d:ab:35:32
inet6 fe80::1089:ddd2:e94a:af23%en0 prefixlen 64 secured scopeid 0x4
inet 10.0.0.5 netmask 0xffffff00 broadcast 10.0.0.255
nd6 options=201<PERFORMNUD,DAD>
media: autoselect
status: active
p2p0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 2304
ether 02:f8:1d:ab:35:32
media: autoselect
status: inactive
awdl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1484
ether 42:86:84:93:b9:f6
inet6 fe80::4086:84ff:fe93:b9f6%awdl0 prefixlen 64 scopeid 0x6
nd6 options=201<PERFORMNUD,DAD>
media: autoselect
status: active
en1: flags=963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX> mtu 1500
options=60<TSO4,TSO6>
ether 72:00:07:28:57:d0
media: autoselect <full-duplex>
status: inactive
en2: flags=963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX> mtu 1500
options=60<TSO4,TSO6>
ether 72:00:07:28:57:d1
media: autoselect <full-duplex>
status: inactive
bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=63<RXCSUM,TXCSUM,TSO4,TSO6>
ether 72:00:07:28:57:d0
Configuration:
id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
ipfilter disabled flags 0x2
member: en1 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 7 priority 0 path cost 0
member: en2 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 8 priority 0 path cost 0
nd6 options=201<PERFORMNUD,DAD>
media: <unknown type>
status: inactive
utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 2000
inet6 fe80::cb3f:8c63:db:a78%utun0 prefixlen 64 scopeid 0xa
nd6 options=201<PERFORMNUD,DAD>
utun1: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1380
inet6 fe80::955:6ae9:e998:7b33%utun1 prefixlen 64 scopeid 0xb
nd6 options=201<PERFORMNUD,DAD>
en4: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
options=10b<RXCSUM,TXCSUM,VLAN_HWTAGGING,AV>
ether 98:5a:eb:d7:d6:18
inet6 fe80::10b0:db09:3bf:820a%en4 prefixlen 64 secured scopeid 0xd
inet 169.254.217.97 netmask 0xffff0000 broadcast 169.254.255.255
nd6 options=201<PERFORMNUD,DAD>
media: autoselect (1000baseT <full-duplex,flow-control,energy-efficient-ethernet>)
status: active
en5: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether ba:53:ac:94:01:65
inet6 fe80::831:9fa1:ed32:593d%en5 prefixlen 64 secured scopeid 0xe
inet 169.254.41.170 netmask 0xffff0000 broadcast 169.254.255.255
nd6 options=201<PERFORMNUD,DAD>
media: autoselect (100baseTX <full-duplex>)
status: active
Code: Select all
vagrant@vagrant:~$ cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto enp0s3
iface enp0s3 inet dhcp
pre-up sleep 2
auto enp0s8
iface enp0s8 inet static
address 192.168.0.24
netmask 255.255.255.0
gateway 129.168.0.1
vagrant@vagrant:~$ ifconfig -a
enp0s3 Link encap:Ethernet HWaddr 08:00:27:19:2c:a4
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe19:2ca4/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:120 errors:0 dropped:0 overruns:0 frame:0
TX packets:91 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:11397 (11.3 KB) TX bytes:10985 (10.9 KB)
enp0s8 Link encap:Ethernet HWaddr 98:a5:eb:d7:d6:18
inet addr:192.168.0.24 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::9aa5:ebff:fed7:d618/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:16 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5472 (5.4 KB) TX bytes:648 (648.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:16 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:1552 (1.5 KB) TX bytes:1552 (1.5 KB)
Code: Select all
vagrant@vagrant:~$ sudo lshw -class network
*-network:0
description: Ethernet interface
product: 82540EM Gigabit Ethernet Controller
vendor: Intel Corporation
physical id: 3
bus info: pci@0000:00:03.0
logical name: enp0s3
version: 02
serial: 08:00:27:19:2c:a4
size: 1Gbit/s
capacity: 1Gbit/s
width: 32 bits
clock: 66MHz
capabilities: pm pcix bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=e1000 driverversion=7.3.21-k8-NAPI duplex=full ip=10.0.2.15 latency=64 link=yes mingnt=255 multicast=yes port=twisted pair speed=1Gbit/s
resources: irq:19 memory:f0000000-f001ffff ioport:d010(size=8)
*-network:1
description: Ethernet interface
product: 82540EM Gigabit Ethernet Controller
vendor: Intel Corporation
physical id: 8
bus info: pci@0000:00:08.0
logical name: enp0s8
version: 02
serial: 98:a5:eb:d7:d6:18
size: 1Gbit/s
capacity: 1Gbit/s
width: 32 bits
clock: 66MHz
capabilities: pm pcix bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=e1000 driverversion=7.3.21-k8-NAPI duplex=full ip=192.168.0.24 latency=64 link=yes mingnt=255 multicast=yes port=twisted pair speed=1Gbit/s
resources: irq:16 memory:f0820000-f083ffff ioport:d240(size=8)
- Attachments
-
- network pane screenshot.png (111.57 KiB) Viewed 1685 times