In the devices menu of the VM, select the USB device you want to mount. Once your computer restarts, log in and start your virtual machine.
In most cases you probably will only have one user so check the box to include your user in the group put in your admin password when prompted, and then restart your computer.
#How to create a usb virtual port serial
Scroll down in the group settings and highlight the vboxusers group and then click properties on the right. A USB virtual COM port is a software interface that enables applications to access a USB device as if it were a built-in serial port. Navigate to the System -> Administration -> Users and Groups option and click on manage groups on the left side. The next thing you need to do is add your user to the vboxusers group on your system.
Select any devices you would like to mount in the guest OS and then close out of the settings window. You should see PA11 and PA12 be automatically configured for USBDM and USBDP. Type in a name for your new USB printer port for example, 'USB003.' Click 'OK' to create the port and then select the printers manufacturer and model on the following page. In the Pinout & Configuration tab, go to Categories > Connectivity and click USB.
Plug in your USB device and click on the second icon to view available USB devices that can be mounted into the guest OS. In the CubeMX configuration perspective, you’ll need to enable a few options to initialize the USB as a Virtual COM Port. These filters are where you can tell Virtualbox what USB devices you want to have available to your guest OS. Along the right hand side there will be a few icons to set up USB filters.