Better VM Ubuntu on Windows 10 or VM Windows 10 on Ubuntu?
Put Windows on the VM. That way if you never have to worry that porting your Windows installation to a new machine will invalidate the installation ;) If you'll be using Ubuntu more often than Windows, having Ubuntu as the host will save you a lot of boot time.
Pro tip 1: if you have plenty of disk space, create the VM with a raw partition rather than a virtual disk. That will make the VM perform at near native speed.
Pro tip 2: Windows is considerably more of a resource hog than Linux (generally speaking - I'm sure you could configure a Linux install to use lots of resources if you tried hard). You'll need to give the VM an absolute minimum of 8Gigs for the VM to even be usable and min of 16Gig for decent performance.
If you are using Ubuntu as your daily operating system, then install Ubuntu on your physical computer and install Windows 10 as a guest OS in a virtual machine. The large size of Ubuntu's default software repositories makes it easy to install and upgrade the development software that you use every day. Because you're going to be installing a lot of software in Windows 10, the bare minimum for disk space is 25 GB1 2 (preferably on the SSD), and you will probably need much more than that, especially if you plan on installing Microsoft Visual Studio in Windows 10.
For example, let's say you need to use Microsoft Visual Studio. You can install the more lightweight Visual Studio Code from the default Ubuntu repositories with sudo snap install code --classic
. It is possible to run Python, C, C++, JavaScript, PHP, Java, R and some other programming language code blocks directly in Visual Studio Code using the Code Runner extension. You can install some of your favorite Visual Studio extensions in Visual Studio Code, and switch from VSCode in Ubuntu to Visual Studio in Windows 10 when things get out of hand. You're going to need a virtual machine in order to quickly and easily switch back and forth between Ubuntu and Windows 10.
If you are planning to do graphics-intensive tasks in the VM, there is a distinct advantage in using VMware Workstation 11 or later over VirtualBox. In VMware Workstation 11 for graphics-intensive applications, 2GB of video memory can be allocated for additional workload processing power, compared to a maximum of 256MB maximum video memory in VirtualBox. VMware Workstation 15 and later supports virtual graphics memory up to 3GB. Your computer has a Core i7 CPU and 16GB RAM, so there should be no problem allocating 2 virtual CPUs and 8GB virtual RAM to the guest OS.
Why use Ubuntu for development?
The broadest and best development tools and libraries
The fastest route from development to deployment on desktop, mobile, server or cloud
The desktop of choice for developers at some of the world's leading technology companies
Lightweight to either run natively or in a VM, on a PC or a Mac
Ideal for any resource-intensive environment
Ubuntu is the world's most popular open source OS for development
Ubuntu is used by thousands of development teams around the world because of its versatility, reliability, constantly updated features, and extensive developer libraries.
If you're managing developers, Ubuntu is the best way to increase your team's productivity and guarantee a smooth transition from development all the way to production. Ubuntu is the world’s most popular open source OS for both development and deployment, from the data center to the cloud.
And, as the Ubuntu OS converges, these same applications will be able to run on desktop, tablets, phone and even on the Internet of Things — one application across Ubuntu's full range of devices.
Source: Ubuntu Desktop for developers
I'm going to make a case for the opposite here.
The quick answer to why is windows driver support and how good Vmware is at passing hardware resources to the guest.
I spend 70% of my time on my computer inside a VM. The VM gets 10 of my 16gigs for ram (could possibly stretch it a bit more but as people say Ubuntu doesn't need as much ram) and access to all my CPU cores as well as giving it 3d acceleration and 3gigs of Vram.
Some of my development tasks run faster in this VM than they do natively in windows. (eg docker containers and unit test run up to 6 times faster than a native windows setup)
Ubuntu is awesome and sometimes think what if it had all the hardware to itself? 🤔 Every now and then I decided I should try installing it as my main and see if it has gotten easier to set up. My experience so far has been painful.
Every time I install ubuntu as a main I spend ridiculous amounts of time just trying to get it to work as good as it does in a VM with some drivers making it unstable, run slower and not to mention wasting a truckload of my time. And then hoping to open windows in a VM to run a game or something CPU or GPU intensive, how can I expect it able to run well when the host OS can't even use the hardware properly.
Plus the fact that my development OS in the VM can be easily encrypted and easily copied/moved around to other machines along will all my work and configs and customized plugins.
The VM inherits the following advantages of windows driver support with no setup required:
- Freesync / Vsync (i get screen tearing in native ubuntu)
- You can use Logitech software for all your Logitech gear.
- Wireless headsets
- specialized keyboard software and macros etc all working because they are supported in windows out of the box.
- 144hz (partially see below)
- wireless displays casting can be done in windows
- entire VM can be encrypted without having to setup native encryption
You can only run the VM at 60hz which is a downside however, somehow the mouse movement is still buttery smooth typing is responsive even if the app windows inside only refresh at 60hz. (don't ask me how this is working)
Another plus is when you need to say run several versions of PHP and apache and maybe an android app you can easily just do it all. I've still haven't found a way to hot-swap apache and PHP and MySQL on ubuntu at all let alone as easily as windows can.
Or maybe you need DirectX for some game development project on the side or many other scenarios where ubuntu just can't do it without up to a week of stuffing around and it's not going to run as fast if windows is inside the VM under Ubuntu.
And then when you feel like a break, just suspend your VM and open AAA game titles running at max capacity, 144hz with free sync and all your custom gear working perfectly because is all run faster in windows albeit at the cost of an extra gig of ram being used meh.
I have 16g/ram and I give 10g to the VM and windows still has enough for steam downloads, discord and a heap of other game launchers downloaders and even a web server running in background tasks to run while I'm working in the VM.
When I finish work I close the VM and get straight into my games or just stay in ubuntu and work on my own things.
There are some cons tho:
- scrolling in Ubuntu inside the VM on some apps such as chrome doesn't work while the mouse is moving. (Firefox doesn't have this problem) You have to stop moving the pointer and then scroll which is pretty annoying. I get around this by just using Chrome windows on another screen and full-screen ubuntu in the other. Or just use Firefox.
- multiple screens can bugout sometimes and you have to stop VM using them exit fullscreen, go back to fullscreen and then tell it to use your extra screens again.
- you are wasting up to 5 gigs of ram.
VMWARE VS VBOX?:
Vmware is def superior to work in compared to Vbox purely because of the GPU performance and the ability to give it 3gig of VRAM.
Vbox is better if you're not fussed about graphical performance, don't want ubuntu's animations and want to frequently switch between windows and fullscreen Ubuntu with host key shortcuts. Plus it also has snapshots feature where u can save the machine at multiple stages and just boot up a previous state if something goes wrong. ( if Vbox had the same Graphical performance as Vmware I wouldn't consider VMware at all )