VMware Communities
duegard
Contributor
Contributor
Jump to solution

Sharing physycal ethernet port between Mavericks and Ubuntu using VMware Fusion

Hi all,

I'm using VMware Fusion 6.0.2 over Mac OS Mavericks, and I need to connect a physical device to manage it using an Ubuntu 12.04 VM. In addition, the host computer is connected to a public network using Wi-Fi.

I can set the ip configuration of the physical device by USB, but I've been unable to get to it using ethernet, neither from the guest or the host machine. I've tried to configure the network adapter of the guest as NAT, and as bridged too. Nothing seems to work. I'm not sure if the VM is capable to manage the physical Ethernet port.

Any ideas for the network device configuration (NAT, bridget, etc.) or the ip's configuration??

Thanks a lot in advance.

1 Solution

Accepted Solutions
WoodyZ
Immortal
Immortal
Jump to solution

Sorry, I did leave out one important step.  You also need to configure the Host's Ethernet Adapter to use a Manual IP Address in the same Subnet that is assigned to the Virtual Machine and Sensor Board.

1.  Connect Sensor Board via USB and program the IP Address and Subnet Mask, the disconnect USB.

2.  Connect the Sensor Board to the Host's (Mac) Ethernet Port.

3.  In Apple menu > System Preferences... > Network > Ethernet > Configure IPv4: Manually, then set IP Address: and Subnet Mask: appropriately.

4. Virtual Machine's Settings > Network Adapter > Bridged Networking > Ethernet

5. In the VM's Guest OS manually set the appropriate IP Address and Subnet Mask.

Example:

Host's Ethernet Adapter IP Address: 192.168.3.1, Subnet Mask:255.255.255.0

Guest OS Ethernet Adapter IP Address: 192.168.3.2, Subnet Mask:255.255.255.0

Sensor Board Ethernet Adapter IP Address: 192.168.3.3, Subnet Mask:255.255.255.0

In this example the Sensor Board will be addressable by either the Host or the Guest at 192.168.3.3.

BTW I just tested this using my Thunderbolt Display Ethernet with a normal (straight not crossed) RJ-45 patch cable directly connected to an IP Addressable Device, VMware Fusion and a Windows VM.  Although the same does indeed work with a Ubuntu VM as I've done it in the past too.

This should work without issue however make sure that the Firewalls or other Security software on both the Host and the Guest are not blocking communications! Smiley Wink

View solution in original post

0 Kudos
9 Replies
WoodyZ
Immortal
Immortal
Jump to solution

duegard wrote: ... I need to connect a physical device to manage it using an Ubuntu 12.04 VM.

What's the Physical Device you're trying to connect to the VM?

duegard wrote: I'm not sure if the VM is capable to manage the physical Ethernet port.

If you're talking about managing the Host's Physical Ethernet Adapter via software within the VM, no it can't be managed as it doesn't actually see the Physical Adapter and instead sees the Virtualized Adapter.

0 Kudos
duegard
Contributor
Contributor
Jump to solution

Hi WoodyZ, thanks for your quick answer. I'll try to explain myself better.

I'm trying to connect a sensor board (Libelium Waspmote, if useful), something similar to Arduino as I have understood. The point is that the Development Kit for these boards is only available for Linux, so I have to use a VM. I need to connect them using the Host's Physical Ethernet Adapter, but manage the boards from the VM.

I can connect them using a USB port, the VM uses them without problems, but due to some characteristics of the SO running on the boards, I need to connect them also through Ethernet. Do you think it is possible?

I hope have explained better than before :smileyblush:

Thank you.

0 Kudos
WoodyZ
Immortal
Immortal
Jump to solution

Just curious, what type Sensor board?

What Model Mac do you have and how are you connecting the Device via Ethernet, Wired or WiFi?

You need to use Bridged however if trying to connect via WiFi Ethernet this could be at issues because of how the WiFi Router is configured.

If connecting the Device directly via Wired Ethernet via a RJ-45 Patch Cable and setting the VM's Network Adapter to Bridged you should be able to manually set Static IP Address and Subnet Mask without Gateway and DNS IP Info to both the Device via USB first and then the Guest's NIC in Ubuntu.  E.g: IP Address: 192.168.3.10 Subnet Mask: 255.255.255.0 on the Device and IP Address: 192.168.3.20 Subnet Mask: 255.255.255.0 on the vNIC in Ubuntu.  Then the Device should be addressable by the Software under Ubuntu at 192.168.3.10.

nancyz
VMware Employee
VMware Employee
Jump to solution

I'm trying to connect a sensor board (Libelium Waspmote, if useful), something similar to Arduino as I have understood. The point is that the Development Kit for these boards is only available for Linux, so I have to use a VM. I need to connect them using the Host's Physical Ethernet Adapter, but manage the boards from the VM.

Hi duegard,

Welcome to the community. Just as WoodyZ said, you could connect your sensor board and your Mac directly using a RJ-45 Patch Cable. A little more to say, you should set up your Ubuntu VM to Bridged to Ethernet. This could be done via VM network adapter settings.

NIC.png

0 Kudos
WoodyZ
Immortal
Immortal
Jump to solution

A little more to say, you should set up your Ubuntu VM to Bridged to Ethernet.

No offense intended however frankly you're not adding anything more then what I've already said!  I already clearly stated "You need to use Bridged..." and "...setting the VM's Network Adapter to Bridged..." while giving an IP Address example.

This could be done via VM network adapter settings.

In the OP duegard states "I've tried to configure the network adapter of the guest as NAT, and as bridged too" so he obviously knows how to change the VM's Network Adapter settings and why it is/was not necessary to say any more then I did. "...setting the VM's Network Adapter to Bridged..."!

The bottom line is, other then the unnecessary inclusion of a picture the network adapter set to Bridged, which he clearly already knows how to do it and I already told him that it needs to be set to Bridged and further more touched on the know issue of using Bridged with WiFi, you've really added nothing to this discussion beyond what I've already said!

0 Kudos
duegard
Contributor
Contributor
Jump to solution

Just curious, what type Sensor board?

They are generic boards which can be used for multiple purposes. There are a lot of kinds of sensors to measure a wide range of magnitudes (gases, humiduty, radiation, etc.). They are supposed to use an external battery with high autonomy and to be wireless-connected with each other to get the data you need. The point is that using an IBM's OS is possible to use IPv6 to connect and manage the "motes" and that is what I'm trying to investigate without much success at the moment Smiley Happy.

What Model Mac do you have and how are you connecting the Device via Ethernet, Wired or WiFi?

I'm using a MacBook Pro of late 2011, and I'm connecting the device via Wired Ethernet (using an RJ-45 Patch Cable I think).

If connecting the Device directly via Wired Ethernet via a RJ-45 Patch Cable and setting the VM's Network Adapter to Bridged you should be able to manually set Static IP Address and Subnet Mask without Gateway and DNS IP Info to both the Device via USB first and then the Guest's NIC in Ubuntu.  E.g: IP Address: 192.168.3.10 Subnet Mask: 255.255.255.0 on the Device and IP Address: 192.168.3.20 Subnet Mask: 255.255.255.0 on the vNIC in Ubuntu.  Then the Device should be addressable by the Software under Ubuntu at 192.168.3.10.

That is what I was looking for. I've already tried a similar solution and it didn't worked. May be I am missing something. This week I'm on holidays, so I'll try your solution next week, and report the results. Thank you very much.

Anyway, just in case, if this doesn't work either, do you have any other idea of what I could be doing wrong? (I'm already out of ideas Smiley Sad).

Nancyz, actually, I already did know how to set the network adapter configuration, thanks anyway. If you can think something I might be doing wrong I will appreciate any help.

Best regards and thanks a lot.

0 Kudos
WoodyZ
Immortal
Immortal
Jump to solution

If connecting the Device directly via Wired Ethernet via a RJ-45 Patch Cable and setting the VM's Network Adapter to Bridged you should be able to manually set Static IP Address and Subnet Mask without Gateway and DNS IP Info to both the Device via USB first and then the Guest's NIC in Ubuntu.  E.g: IP Address: 192.168.3.10 Subnet Mask: 255.255.255.0 on the Device and IP Address: 192.168.3.20 Subnet Mask: 255.255.255.0 on the vNIC in Ubuntu.  Then the Device should be addressable by the Software under Ubuntu at 192.168.3.10.

That is what I was looking for. I've already tried a similar solution and it didn't worked. May be I am missing something.

What was "I've already tried a similar solution and it didn't worked"?

Normally when connecting two Wired Ethernet Devices directly together with an RJ-45 patch cable one would use a Crossed Cable or Cross-Over Cable however Mac's Wired Ethernet Ports typically employs Auto-Sensing, meaning if one uses a normal (straight) RJ-45 patch cable and it needs to be crossed it does it automatically in the Port itself.  If this is no longer true then an RJ-45 Cross-Over cable would need to be used.  I have an early 2013 MacBook Pro with Retina Display and does not have an Wired Ethernet Port so I cannot test to see if Auto-Sensing is still in later Macs then the one I had previously which did.   I'd assume yours does as it would not make much scene for Apple to have dropped that feature however Apple does do some dumb things at times just like every other Manufacture does! Smiley Wink

The reason I was asking for specific type sensor boards was I wanted to review the boards documentation however it sounds straight forward in that the device IP info is programable via USB and then can communicate via Ethernet.  I've worked with similar scenarios and as long as the IP Address/Subnet Mask are properly set then there shouldn't be an issue.  BTW when connecting two devices like this directly together there usually is no need for a Gateway IP Address or DNS Server IP Address so if you follow my previous example you should be fine.

Enjoy your vacation and let us know how things go when you get back and test.

0 Kudos
WoodyZ
Immortal
Immortal
Jump to solution

Sorry, I did leave out one important step.  You also need to configure the Host's Ethernet Adapter to use a Manual IP Address in the same Subnet that is assigned to the Virtual Machine and Sensor Board.

1.  Connect Sensor Board via USB and program the IP Address and Subnet Mask, the disconnect USB.

2.  Connect the Sensor Board to the Host's (Mac) Ethernet Port.

3.  In Apple menu > System Preferences... > Network > Ethernet > Configure IPv4: Manually, then set IP Address: and Subnet Mask: appropriately.

4. Virtual Machine's Settings > Network Adapter > Bridged Networking > Ethernet

5. In the VM's Guest OS manually set the appropriate IP Address and Subnet Mask.

Example:

Host's Ethernet Adapter IP Address: 192.168.3.1, Subnet Mask:255.255.255.0

Guest OS Ethernet Adapter IP Address: 192.168.3.2, Subnet Mask:255.255.255.0

Sensor Board Ethernet Adapter IP Address: 192.168.3.3, Subnet Mask:255.255.255.0

In this example the Sensor Board will be addressable by either the Host or the Guest at 192.168.3.3.

BTW I just tested this using my Thunderbolt Display Ethernet with a normal (straight not crossed) RJ-45 patch cable directly connected to an IP Addressable Device, VMware Fusion and a Windows VM.  Although the same does indeed work with a Ubuntu VM as I've done it in the past too.

This should work without issue however make sure that the Firewalls or other Security software on both the Host and the Guest are not blocking communications! Smiley Wink

0 Kudos
duegard
Contributor
Contributor
Jump to solution

Hi WoodyZ,

First of all, thank you very much for your solution. It worked perfectly. Now I´m able to address the mote from Host and Guest machines. I think the point I was missing before was to set the static IP Address to the Ethernet port on Host, so both machines were out of the net the whole time.

Just to clarify some issues named before:

What was "I've already tried a similar solution and it didn't worked"?

I meant that I used a similar network configuration (IP address, subnet mask...), not exactly the same values. With my configuration Host and Guest were on the same net, but not the mote because the Ethernet adapter was configured by default DHCP.

connecting the device via Wired Ethernet (using an RJ-45 Patch Cable I think).

Now I'm sure, I´m using the cable provided in the Libelium pack: UTP patch cable ISO/IEC 11801 (standard RJ-45 patch cable). I suspect that Macs still keep Auto-Sensing Smiley Wink.

No problem with firewalls either.

Thank you very much.

0 Kudos