Arduino Pro Micro (sparkfun) and virtualbox. Uploads with Duemilanove worked

Hopefully I'm not the only one thats come across this issue.

My setup.

I'm using a windows 7 host running virtualbox. I installed the USB drivers from sparkfun for the Pro Micro. The windows hosts detects it and loads the right drivers.

When I go into my virtual machine running Ubuntu. I load the virtual USB device for the OS that the arduino is connected to.

Then, I set my board and USB accordingly. The problem is that when I upload the sketch. It disconnects from the host (windows), making that disconnect, then reconnect sound. Then after a few seconds later, the arduino IDE gives me an error..

I was using the same setup with an older duemilanove board with the same sketch and it was not having the same problem. Is it the bootloader causing the USB to disconnect?

Any help would be greatly appreciated

The Pro Micro, Micro, Leonardo, and other ATmega32U4-based boards have a different style of bootloading and resetting compared to Uno, Nano, Duemilanove, and other ATmega328P-based boards. The ATmega328P-based boards do not lose contact with the USB driver when they are resetting and uploading. The ATmega32U4-based boards not only lose contact with the USB temporarily during reset, but they also use a different COM port for the bootloader compared to when the board is running and communicating via Serial.

So, I have found it difficult to get them working via a virtual box, such as connecting to a guest OS in VirtualBox. In theory you can set VirtualBox so both COM ports are mapped to your guest OS, but I don't know if the mapping would happen fast enough to allow the bootloader to do its work. I custom-compiled the Leonardo bootloader to use the same USB identification information as the core, and it is tricky to get perfect, but that did allow me to upload from a VirtualBox guest. It was a tedious exercise and one I did just out of curiosity, but I did not keep notes or keep the custom bootloader, and I moved on to other things. As a result, at this point I just know it can be done, but I found it to be not worth the trouble. I'm sorry because I know that is not going to be useful to you.

In the end I found it more useful to program the ATmega32U4-based boards via ICSP and a programmer instead of USB when it is more convenient to do so, or to use the Optiboot bootloader and an external FTDI adapter and program them like a Pro Mini. I use the Leonardo bootloader and USB when uploading from the host OS.