this post was submitted on 05 Sep 2023
46 points (94.2% liked)

Linux

47940 readers
1586 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

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

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 5 points 1 year ago (1 children)

Short answer: go ahead and install whichever Linux distro you like on Hyper-V and go from there.

Longer answers:

Linux works fine on VMs. There aren't really any caveats. Hyper-V should be fine. It's been a while since I used it but I remember thinking it was OK. I preferred it to Virtualbox; I think the Virtualbox drivers made some stuff flaky on my machine, but YMMV. I ended up shelling out for VMWare which I'd used at work. Some distros offer cloud images that are tailored for running as VMs, but unless you're running a cluster with a lot of VMs I don't think there's any advantage, any distro will work. There aren't any significant differences running Linux on a VM from running it on a physical machine.

As to which OS to use for a host, the commonly understood strengths & weaknesses of each OS apply the same as they do in other domains. Windows has better desktop hardware support, Linux tends to be more power-user friendly, etc. It depends on your priorities which you choose. Maybe the biggest factor is that Windows has Hyper-V, whereas Linux has Xen, KVM, and qemu. Either platform can use Virtualbox or VMWare.

P2V and V2P are definitely things. Searching for them online will return tools that will do this. Linux should be rather straightforward to transfer even without a specialized tool, assuming you aren't using a distro (or distro variant) that is specially built for VMs. dd should work like a charm. It should be possible to do invert the host and guest.

If that sounds like a whole lot of nothing it's because that's kind of the way it is with VMs. They just work.

[–] [email protected] 3 points 1 year ago

Thank you very much, it seems I'm on ~~the~~ a right path.