go away spammer

Author Topic: Programming from a Virtual Machine on Ubuntu  (Read 2765 times)

0 Members and 1 Guest are viewing this topic.

Offline adanvascoTopic starter

  • Full Member
  • ***
  • Posts: 107
  • Helpful? 6
  • Necessity is the mother of invention.
Programming from a Virtual Machine on Ubuntu
« on: May 16, 2011, 12:08:20 PM »
Hi. If you are like me that don't use Windows but unfortunately have to program your devices using software made for Microsoft's OSes, read on.

Initially I thought of using a dual boot setup, but after having a multiboot with various flavors of Linux, I know from previous experience that adding Windows to the mix is a pain in the...

So I decided to use Oracle's free VirtualBox. It works like a charm after you make some changes to the VM. After downloading VirtualBox from http://www.virtualbox.org/wiki/Linux_Downloads, create a new virtual machine with the version of Windows you'll be using. I have tested it so far with XP. When the VM is running and ready to use, shut down the guest OS and open its settings from the VirtualBox OSE Manager. Select "Serial Ports" from the list on the left. On the first tab, "Port 1", select "Enable Serial Port". It usually works with COM1, IRQ 4 and I/O Port 0x3F8. In the "Port Mode" select "Host Device" and in the "Port / File Path" enter your port location, usually /dev/ttyS0. After doing that, click OK and start the VM again.

Now you have to manually add the serial port to Windows. To do this go to Control Panel, and select "Add Hardware". Click next on the "Add Hardware Wizard" and after the scan, select "Yes, I have already connected the hardware". Next scroll to the bottom of the list and select "Add a new hardware device" and click next. Then select "Install the hardware that I manually select from a list (Advanced)". Now from the "Common hardware types" select "Ports (COM & LPT)". On the following window select "Standard port types" from the manufacturers list and "Communications Port" from the model list (the first two). Click next twice and if you get no errors you're done! Reboot and you should now see the port on the hardware manager and your software should see it too.

If you need help finding your port settings on Linux, try this from a terminal: dmesg | grep tty

Good luck!!! ;D
Knowledge does not weigh.


Get Your Ad Here