I recently needed to install Linux on Hyper-V in Windows 10. I needed to do this because some internal builds of Couchbase were temporarily broken on Windows, but I still needed to use the latest builds. I’d never used Hyper-V to install Ubuntu (my favorite) or any other Linux distro before, but it wasn’t that difficult. And the best part is that it comes with Windows: I don’t have to install VirtualBox or VMWare or anything like that.

Download Ubuntu

There are lots of great Linux distros out there, and Couchbase Server can be run on a variety of them. However, when it comes to Hyper-V and Linux, Ubuntu Desktop is my go-to.

The first thing I did was to download an Ubuntu Desktop ISO. I know that Couchbase support for Ubuntu 16 is coming, but for now I want to stick to Ubuntu 14. So, I downloaded an ISO of 14.04.5 (aka Trusty Tahr).

Make Sure Hyper-V is Enabled

Check to make sure that you have Hyper-V enabled on Windows.

First, open Control Panel. Next, go to Programs. Then, click “Turn Windows features on or off”. Finally, locate Hyper-V and click the checkbox (if it isn’t already checked).

Enable Hyper-V feature in Windows

You may also need to enable virtualization in the BIOS settings on your computer. The computer I’m using has it turned on by default. I wish I could give you instructions on how to do this, but it’s going to vary based on your BIOS.

Create a Hyper-V Virtual Switch

When connecting the virtual machine to a network, you’ll need to select a virtual switch. If you haven’t done this before, you’ll need to create one.

First, click “Virtual Switch Manager”, then select “External”. Click “Create Virtual Switch”. Finally, give the switch a name. (You also need to choose an external network; in my case I only have one). Hit “Apply”.

Create Hyper-V virtual switch

I wanted my machine to be connected to my home network, so I chose External. If you use External, it will connect to your network as a separate machine. After I create the machine (in the next section) it will appear on my router as it’s own machine:

Hyper-V machine attached to my network

Create a New Hyper-V Virtual Machine

Now you’re ready to get Ubuntu on Hyper-V with a new virtual machine.

First, open the Hyper-V Manager from the Start menu. Then, click “New” and then “Virtual Machine”. This will start a wizard.

First, give your machine a name (like “UbuntuForCouchbase”). Optionally, you can choose where to store this machine, or use the default directory.

Next, you must choose Generation 1 or Generation 2. I used Generation 1, but Ubuntu 14+ should work on Generation 2 as well.

After that, specify how much memory to allocate to the machine. I have a lot of RAM on my desktop, so I gave it 8192mb.

Next, select the switch that was created in the previous section.

Then, set up the virtual hard disk to your liking. You can choose the location and size of the disk. I don’t need very much, so I went with 60gb.

Finally, you need to select an operating system. I’ll choose “Install an operating system from a bootable CD/DVD-ROM”, and then “Image file”, and find the Ubuntu ISO that I downloaded.

Click “Next”, view the summary, and click “Finish”.

Create Ubuntu Virtual Machine in Hyper-V

Start the Machine and Install Couchbase

Now that you’ve created a machine, you must start it. Right-click on the machine and select “Start” (or there’s a “Start” button in the actions menu to the right).

This starts the machine, but you can’t actually see the machine yet. You have to “Connect” to the machine to see what it’s doing. Right-click and select “Connect” (or again, there’s a “Connect” button in the actions menu to the right).

Ubuntu in Hyper-V

I won’t go through the installation process, since Ubuntu’s installation is pretty easy and self-explanatory (and well-documented).

At the end of the Ubuntu installation, installing Couchbase Server is also pretty easy and self-explanatory. Just go to the Couchbase downloads page and select the Ubuntu 14 version of Couchbase.

Download Couchbase for Ubuntu


I normally use the Windows version of Couchbase, but sometimes I need to use Ubuntu (or other Linux distros). Hyper-V on Windows is a convenient way for me to spin up virtual machines.

If you have any questions about Couchbase or Hyper-V and Ubuntu, please ask away in the Couchbase Forums or check out the Couchbase Developer Portal.

You can also contact me at Twitter @mgroves.


Posted by Matthew Groves

Matthew D. Groves is a guy who loves to code. It doesn't matter if it's C#, jQuery, or PHP: he'll submit pull requests for anything. He has been coding professionally ever since he wrote a QuickBASIC point-of-sale app for his parent's pizza shop back in the 90s. He currently works as a Senior Product Marketing Manager for Couchbase. His free time is spent with his family, watching the Reds, and getting involved in the developer community. He is the author of AOP in .NET, Pro Microservices in .NET, a Pluralsight author, and a Microsoft MVP.


  1. […] A guide for how to install Ubuntu Linux or any Linux in a virtual machine on Windows with Hyper-V. Source link […]

  2. A year later to the day, this is much helpful in getting startet with an ubunto instance for my docker — thanks for taking the time! :)

  3. I followed the above steps, after having downloaded and trying to install Couchbase-server through “ubuntu software center” I got the following error:
    “Dependency is not satisfiable libncurses5(>=6)”

    Is there a tested Linux matching version for Couchbase v6, maybe Ubuntu 18.04 ? is using Server edition (instead of desktop edition) a good to be used as database Server ?

    1. I have no idea what the Ubuntu software center is trying to install. I’d recommend downloading from couchbase.com and following the instructions here: https://docs.couchbase.com/server/6.0/install/ubuntu-debian-install.html

      I’m not sure what the exact matrix is for Distro-to-Couchbase Server support, but Couchbase 6 should work fine on Ubuntu 18.

  4. sanjeev kumar N March 3, 2020 at 5:13 am

    Hi Matthew Groves,

    Good day,

    We have a docker requirement, where we need to run the test cases on Robot Frame work Docker images and same should be accessed via eclipse tool.
    I was able to achieve this, by enabling hyper-v, creating Virtual adapter and creating VM using docker-machine command
    (docker-machine create -d hyperv –hyperv-virtual-switch “E Virtual Switch” Manager2).
    We need Windows 10 or server 2016 VM to be created using Docker-machine,
    Can we create the Windows VM using the same above mentioned steps.
    Please advise.

    Sanjeev Kumar N

Leave a reply