(VM = Virtual Machine)
Hello, so as a developer currently studying I am working on a laptop under Windows 10 OS, so I would like to install Ubuntu OS on my daily laptop, the problem is that I know in some rare condition I will need to still have a working Windows 10 environment working for groups project and/or use of specific software.
So my question is the following: Is it better * to install Ubuntu and use a Windows 10 Virtual machine when needed or to use Windows 10 ans an Ubuntu VM running most of the time on it ?
*by better I mean depending on the information privacy and also the performances of the computer as I know some VM can be slow.
Knowing that I only have one location for the SSD I was thinking to use VMs but if I'm wrong and doing a Dual boot in your opinion is a better idea feel free to tell me.
In order to give you more details about it: the computer have 16GB of ram and an i7 CPU
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.
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:
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:
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 )