Filter results by

VirtualBox and Ubuntu OS

Creating a virtual Linux environment on your Windows PC provides a great deal of functionality when you plan to do general Linux-based development.

The Oracle VirtualBox® program for Windows provides a way to run several "virtual" machines on a Windows PC. Here we'll describe how to install it for emulating an ARM Linux machine running the Ubuntu OS.

Install VirtualBox for Windows

There is already a WikiHow tutorial that does a great job taking you through VirtualBox and Ubuntu installation – click on the link so that we can refer to their steps below.

  1. Install VirtualBox to your computer from here:

  2. Under Settings, leave Network set to NAT.

  3. Download Ubuntu from here: (64-bit)
    It is an ISO file – formatted as an optical disk (CD) image.

  4. The download will take a while, so preview the WikiHow tutorial while waiting for the download to complete.

  5. Attach Ubuntu to VirtualBox, following the WikiHow tutorial from Part 3. Pay particular attention to the following steps along the way.

    1. Allocate enough memory space and hard drive space for Ubuntu.
      • Reserve at least 4GB of memory.
      • Choose "Dynamically Expanding Storage".
      • Reserve at least 80GB for the hard drive.
    2. At step 3 of Part 4 – Setting The CD To Start, you have to choose the CD icon pointed to at the bottom of the Storage Tree box, select Optical drive, then point it to your Ubuntu ISO file location. Otherwise, you won't be able to attach the ISO image properly.

    3. Partition and install.
      • Do not accept "Erase disk and install Ubuntu" in step 7 of Part 5!

      Warning. When you reach step 7 of "Part 5 – Installing Ubuntu", choose "Something Else" and partition your space cautiously.

      • You will now need to assign partition information, a procedure not shown in the tutorial. At minimum, set up one partition with [New Partition Table], double-click on "free space", and assign its Mount point as "/" to proceed. Otherwise you will get an error message.

      • Follow the rest of the instructions, including the "Guest Additions" part, and finish the installation and configuration.

      Troubleshooting. If you get error messages when you start Ubuntu in VirtualBox, it is likely due to a hard drive or memory allocation issue. Remove Ubuntu and start installation again.

  6. Start Ubuntu from VirtualBox.

Accessing PC Peripheral Devices from VirtualBox

When you use VirtualBox, you'll of course want to make use of the peripheral devices – keyboard, mouse, hard disk, USB port devices, etc. – of your PC. In general, VirtualBox lets you share in a way that doesn't interfere with Windows operations.

  • Keyboard and mouse work seamlessly across Windows and VirtualBox environments.

  • Internet connections are passed through a virtual repeater to use your existing PC connections.

  • Hard disk space is partitioned the way you set it during installation, such that no overlap occurs between Windows and VirtualBox environments.

That all seems straightforward – but you'll eventually run into limitations while using USB, copy/paste, and file sharing.

USB Port Access

USB ports cannot be accessed unless explicitly transferred to VirtualBox control. You will need to enable use of the FTDI ports shown, for example, to allow flash update of the ARTIK 053 Starter Kit board through its JTAG port.

Simple enough, except that it switches both ports – including the COM port that the ARTIK 053 uses for its debug port. So you would need to use a Linux terminal emulator (like screen) through VirtualBox, instead of using PuTTY through Windows.

You'll find that VirtualBox handles the switch-over very cleanly: Once you are done and either exit VirtualBox or disable the settings, the USB resources are reassigned to Windows exactly as they were available previously. So you may find it acceptable to manually switch back and forth.

Troubleshooting Hint. If your port switching was working and then suddenly stops, refer to this article.

If it shows "Captured" when you hover over the device in the drop-down list, but doesn't put a check mark next to the captured device, you might need to shut down and restart your Windows OS and try again.

Copy and Paste

Copy and paste between environments is prohibited by default. The "Guest Additions" program is meant to address this issue. Use the "Drag and Drop" and "Shared Clipboard" settings to enable the features.

Troubleshooting Hint. VirtualBox is somewhat challenging when it comes to enabling the copy and paste features. We can't make any guarantees that these points are sufficient to make it work, but they seem to help if done in the order listed.

  • Make sure you install Ubuntu with updates.
  • Before running the Guest Additions program, use sudo -i to log in as superuser in a terminal window.
  • Do not try to enable the Drag and Drop or Shared Clipboard settings before installing Guest Additions.
  • After installing Guest Additions and restarting the guest system as directed, check that Guest Additions shows up as one of the IDE storage devices.

  • When you do then make the settings above, choose only "Host to Guest". Doing so should enable copying from the Windows environment and pasting into the Linux terminal screen. "Bi-directional" settings may not work.
  • Restart the guest system after making the changes.

File Sharing

File sharing/access is prohibited by default. The "Guest Additions" program is meant to address this issue, but the configuration of your PC may also block it; you may not be able to overcome this, depending on your corporate IT security policies. Refer to VirtualBox documentation for details.

Network Proxy

If your network goes through a proxy server, you'll find this Ubuntu information useful.

Ubuntu proxy profile information goes in /etc/apt/apt.conf (create it if it does not exist). Contents:

Acquire::http::proxy "";
Acquire::https::proxy "";

Refer to the Proxies and Certificates article for more information.

Last updated on: