Establishing Pymavlink connection on Virtual Machine

I am trying to connect my CubePilot to a program running on an Lubuntu virtual machine on a Windows computer. The program is based on the following:
iq_pymavlink_tutorial/ at master · Intelligent-Quads/iq_pymavlink_tutorial (

I am running it in VS Code. I changed the ‘udpin:localhost:14551’ line to ‘dev/ttyS3’ because I have the CubePilot plugged into the COM4 serial port on my computer. I run the code, but nothing happens.


You need to make sure you’re properly forwarding the serial port (or USB port) into the virtual machine.

Do you know how I can do this for an Lubuntu VM running on VirtualBox?

Along these lines: How to Enable USB in VirtualBox | TechRepublic