Can't access USB UART in VirtualBox Guest on macOS host


Martin

I have created a virtualbox via docker-machine:

$ docker-machine create --driver virtualbox default

In the guest OS, I want to access my USB serial device, which is the Nordic nRF52840 DevKit, listed in macos /dev/tty.usbmodem144241.

However, virtualbox does not list this device as a USB device. I also tried adding the device as a serial port using the port mode "Host Device" as described in this link , without success:

USB devices in VirtualBox Serial Port in VirtualBox

If I add the Serial Port as .tty-usbmodem the virtualbox will hang in 'Starting', I have to kill all virtualbox processes or disconnect the serial cable in order to start again. If I use .cu-usbmodem the virtualbox starts up but immediately crashes.

I'm running out of ideas here. I'm stuck at this issues since docker for mac does not support the --devices mapping without virtual machine, and for the virtual machine I somehow can't manage to add the port.

Any ideas on what else I could try?

martin

So as it turns out virtualbox is quite picky about when a device is actually connected and does not work as seamlessly as I'm used from using VMWare:

  • The device I was using really just shows up as SEGGER J-Link in the USB menu
  • It must be added as filter (filter is really confusing > first I thought it would ignore the device)
  • The device cannot be added to the virtualbox 'on the fly' (using the USB-icon in the 'Show' window, see screenshot), it must not be connected before the virtualbox starts up.
  • The serial-tab is irrelevant > it's all handled via the USB tab.

Virtualbox greys out device - device was connected before powering on enclosure

The important fact is that the device must not be connected wenn the virtualbox fires up. So the steps to add a device are the following:

  • Power down the virtualbox
  • Make sure the USB controller is enabled
  • Connect the USB/serial device to the computer (host)
  • Add it to the filter in the virtual box

Now every time you want to use the device with the virtualbox:

  • Make sure the virtualbox is down (e.g. docker-machine stop default)
  • Disconnect the USB/Serial device from the computer
  • start virtualbox (eg, docker-machine start default)
  • Virtualbox should now be able to "intercept" the device and list it in /deve.g./dev/ttyACM0

Device is connected!

Once the box is open, unplugging and unplugging the filtered device also works (if you forget to disconnect the device before starting it, you don't have to power off the virtual box again. Just wait for the box to come up, unplug it, and plug it back in again) available), should be fine).

Related


Can't access USB UART in VirtualBox Guest on macOS host

Martin I have created a virtualbox via docker-machine: $ docker-machine create --driver virtualbox default In the guest OS, I want to access my USB serial device, which is the Nordic nRF52840 DevKit, listed in macos /dev/tty.usbmodem144241. However, virtualbox

Can't access USB UART in VirtualBox Guest on macOS host

Martin I have created a virtualbox via docker-machine: $ docker-machine create --driver virtualbox default In the guest OS, I want to access my USB serial device, which is the Nordic nRF52840 DevKit, listed in macos /dev/tty.usbmodem144241. However, virtualbox

Can't access USB UART in VirtualBox Guest on macOS host

Martin I have created a virtualbox via docker-machine: $ docker-machine create --driver virtualbox default In the guest OS, I want to access my USB serial device, which is the Nordic nRF52840 DevKit, listed in macos /dev/tty.usbmodem144241. However, virtualbox

VirtualBox: No USB hub detected on Linux Guest - MacOS host

Youssif Saeed I'm trying to connect multiple USB devices to my Linux guest by using a USB hub, however, the hub doesn't seem to be detected on the guest. During testing, I noticed the following: The USB hub works fine if connected directly to Mac OS. If I conn

VirtualBox: No USB hub detected on Linux Guest - MacOS host

Youssif Saeed I'm trying to connect multiple USB devices to my Linux guest by using a USB hub, however, the hub doesn't seem to be detected on the guest. During testing, I noticed the following: The USB hub works fine if connected directly to Mac OS. If I conn

Audio doesn't work on VirtualBox Windows 10 guest (macOS host)

Ahmed Alps Balkans I'm running on a Windows 10 Home guest OS on a VirtualBox VM , the MacOS host running 10.13.6 High Sierra with VirtualBox 5.2.23. The audio worked a few times and then stopped working. (Not sure, maybe due to virtualbox version update or my

Audio doesn't work on VirtualBox Windows 10 guest (macOS host)

Ahmed Alps Balkans I'm running on a Windows 10 Home guest OS on a VirtualBox VM , the MacOS host running 10.13.6 High Sierra with VirtualBox 5.2.23. The audio worked a few times and then stopped working. (Not sure, maybe due to virtualbox version update or my

Can't access USB in VirtualBox

daisy I am using Linux mint16. Already installed virtualbox and created two vhd. One is Windows Server 2008 and the other is Windows7. In the settings, I enabled both options to enable USB, and the installed virtual box extension still doesn't have access to t

VirtualBox Windows 7 host, XP Guest can't play audio

DCookie As the topic says, I can't get the XP guest to produce sound on a Windows 7 Ultimate 32-bit host. The sound works fine on the host OS. If the host audio driver is set to "null audio driver" and the audio controller is set to ICH AC97, everything seems

VirtualBox Windows 7 host, XP Guest can't play audio

DCookie As the topic says, I can't get the XP guest to produce sound on a Windows 7 Ultimate 32-bit host. The sound works fine on the host OS. If the host audio driver is set to "null audio driver" and the audio controller is set to ICH AC97, everything seems

Setup Network on Virtualbox Guest to Access Host VPN

nixgadget I'm trying to get this setup going, but I'm having a lot of trouble. Host OS: Windows 8 64bit Guest OS: CentOS 6.5 64-bit I use the Cisco VPN client on the host to connect to many remote servers that I want to access from the Guest OS. Currently I ha

Access site on host from guest using VirtualBox?

Gilchaz I'm running VirtualBox on a Mac (host) and the VM used is Windows 7 (guest). VirtualBox is set up to use a NATnetwork adapter and has internet access (google, msn, etc.) fine, but I'm hosting a site on a Mac (host) so I can't access it from the VM. The

Access VPN host by name from VirtualBox guest

username I have an Ubuntu guest running under VirtualBox on a W10 host with VPN. I've set up the host-only adapter and the NAT adapter as suggested in other answers here, and everything works fine. The only problem is from the guest that I can't access the hos

How to access Apache from host (on VirtualBox guest)?

urok93 I have Apache installed on an Ubuntu VM. When I go into the client machine and load Firefox, I can see that Apache is running fine when I browse to localhost. I want to access the same page through the host. I tried using the guest's IP address, but not