Hi, I’m an old windows user who have played with linux* a few times, but never commited to it.
I want to dive deeper and I though about installing linux in a VM. Some basic questions:
- Is that a good idea? / Anything I should take into account?
- Is there any preferred VM manager for this? Windows comes with Hyper-V, but I remember reading about how Hyper-V is not ideal (I could be wrong).
- Do different distributions work better or worse on VMs?
- Are there any major differences when using linux in a VM compared to a bare metal installation?
And some not-so-basic ones:
- Is there any [dis]advantage to “Linux VM on Windows” VS “Windows VM on Linux”?
- If I start with “Linux VM on Windows”, would it be possible to swap them in the future? What I mean is:
- Virtualize the Windows installation so it can be run as a VM.
- Un-virtualize the Linux VM (with all its contents and configuration) and move it to bare metal.
- Run Windows VM on linux.
Notes:
- I did a quick search and, although I found multiple articles about the topic, the ones I’ve read just show one way to do it without comparing it to the alternatives.
- I’m aware of WSL(2), but I would like to be able to decouple from Windows in the future.
- EIDT: I tried dual booting in the past. The main problem is that I’m too lazy to reboot every time I want to try something in linux and I end up not using it.
Thanks!
* Mandatory linux = GNU/Linux
While there’s nothing wrong with VMs or USB live systems. I’d like to put forward the suggestion of hopping on eBay and picking up a piece of old business e-waste. If you really want to dive in with security and safety. It’s about the best way. A 4th generation i7 Business Systems has been going on there for anywhere from 50 to $80.
Especially since if you are techie enough to have the itch to actually dive in on your own. Should you decide to keep exploring with it. You will eventually want a small Homeland set up of some sort most likely. At which point you can convert that system into your server for your main system.
I have a number of systems amassed over the last 30 40 years. And ironically despite having much newer rizen systems that I use for a bit of gaming here and there. One of the systems that I use the most is an old 4th generation i7. I have it near the bed so I can sit on it at night puttering around reading, light gaming or a little coding if the mood hits. Loaded up with endeavor os. I have a few other systems around with debian and fedora. One of them being a server. With home shares on NFS. Which makes things really nice because if anything happens to my user systems I just wiped reinstall toss on a couple configs and I’m back to where I was
Interesting suggestion, I’ll think about it.
Pre pandemic I would have recommended people get something like a Raspberry Pi to explore learn and experiment on. Even if you aren’t into all the electronics possibilities the gpio on them allows. They are awesome compact little systems. But right now they’re so costly and hard to find. These ancient x86 Business Systems are a more cost-effective platform for just having a learning system. Which is fairly nice. That way you’re not tying up one or the other. But can use both at once.
Though I actually am trying to hold off at the moment from getting one of those new Lichee pi 4a systems to toy around with riscv. They seem pretty polished already. But I’m not quite that technical and would rather wait around for a bit more polish on the software side lol. That and a host board with m.2 nvme support.
Yeah, RaspberryPi-alike stuff if also something I want to look into in the future. But it is probably best to take it one step at a time.
Thanks for the ideas!
Is this a good idea?
Sure!
any preferred VM manager
I like Virtualbox.
- Do different distributions work better or worse?
Depending on your specs, you may want to go lighter than you would on bare metal. For example, if you have 16 GB of RAM, you might want to only give your VM 4 GB of RAM so Windows can run on 12 GB, and then pick a lighter distro so it won’t be slow on 4 GB.
Any major differences?
Snapshots are way easier in a VM.
Advantage/disadvantage
Windows VM on linux is painfully slow and doesn’t have a license, so it’s much less good than linux VM on Windows IMO.
Would it be possible to swap?
Not as far as I’m aware, but smarter people than me have probably done it.
Windows vm on a Linux box is not painfully slow. It’s about the same as native, where did you get this idea?
Depending on your specs, you may want to go lighter (…)
Good point regarding balancing hardware resources.
Windows VM on linux is painfully slow and doesn’t have a license, so it’s much less good than linux VM on Windows IMO.
Good to know.
Thanks!
Vmware workstation player is extremely good. Setup is simple and as far as I know it is faster than VirtualBox. I use it with Windows 10/11 and RHEL Linux for developers.
If you’re interested in making a full jump to Linux at some point, then you’d probably be interested in dual-booting instead of using VM for Windows or Linux.
I think it’s far less invasive to setup a Linux VM that can be thrown away vs. setting up dual booting.
With Hyper-V or Virtualbox the OP can have a Linux distribution installed and booting very quickly without fear of disrupting his current Windows installation.
You’re right, but is it easy to convert a VM to a physical machine? I’ve never tried, so I’m genuinely asking.
I’ve always gone the other way, and ran my dual booting capable install in a virtual machine
I think if you can convert the virtualhard disk into raw files it should work the other way.
I would think so too, but I also wouldn’t be surprised if there was a catch.
Generally yes, but I’ve been working with VMs on various platforms for a very long time, so I’m probably not the best to qualify on what easy is. How easy will depend on what software you are using.
I’ve done many physical to virtual, and the very rare virtual to physical. Both can have problems you may need to work through (almost always driver related).
It’s definitely possible to convert in both directions. I’ve never done it though. The technical hurdles made it unpalatable. My main method of moving back and forth was to keep my personal data on a separate disk from the OS disk. That way I could always take my data with me when I changed OSes or VMs.
I tried dual booting in the past. The main problem is that I’m too lazy to reboot every time I want to try something in linux and I end up not using it :/.
I hope that with VMs I can have a smoother transition being able to work with both of them at the same time.
I should have added that… thanks for the suggestion.
It depends on what you are trying to accomplish.
If you want a pretty desktop environment or you need all the bells and whistles of a specific Linux distribution (Debian, Fedora, Ubuntu, CentOS, etc.) then a virtualize environment is probably the way to go.
If you just want to get used to playing with Linux commands using bash and you only need about 80% of the full functionality of a pure Linux environment, then Windows offers the Subsystem for Linux which installs like an app you can run at anytime.
I personally use the subsystem for Linux on my Windows work laptop so I can quickly write Python scripts and test application configs for production servers. It’s quick and dirty and I can easily share files between Windows and Linux. It also has a small footprint on the computer as oppose to a VM.
Whatever you decide, have fun! Linux is awesome.