On my Ubuntu the port is /dev/ttyACM0. To confirm you can do a “ls /dev” with the Mega plugged in. /dev/ttyACM0 should show up. Unplug it and the /dev/ttyACM0 should have gone.
Do you have the ArduionIDE installed in the VM? Did the firmware upload go well?
Thanks @Gero and @Bee for your help. I had originally loaded the Arduino from Windows and when I tried it from the ubuntu VM, it wouldn’t connect.
After trying everything I could, I gave up and found another old laptop onto which I loaded ubuntu natively (i.e. not VirtualBox). Everything works now - loading the Arduino and running some tests with motors connected.
In case anyone else is reading this, I did have to run this command before I could connect to the Arduino: