VM as in Virtual Machine

I hear most of you try distros in vm,how does it work,to install a vm and a distro in it ,i have never used it only heard you all here and others talk about it . Will i just have a feel for the distro in vm or does it work as installed in bare metal ?

1 Like

Maybe the easiest way and the way most get started with that is to install VirtualBox. Then you download an ISO image and create a VM in VirtualBox from that image.

Here are a couple videos showing how to install Ubuntu in VirtualBox.

3 Likes

It works the same as a hard disk install. The only difference is that the environment that the VM provides does not include your hardware, so the install will not test if the distro has drivers for your hardware.

In order of increasing difficulty ( and inreasing performance) , you could try

  • Gnome Boxes
  • Virtualbox
  • Virt Manager

I know @pdecker suggested Virtualbox, but I think you would find Gnome Boxes easier to start with.

I personally use Virtmanager.

4 Likes

Ok Thank you both for this i will give it a try.
Can i install soft ware in that distro in wm as normal ?

Yes. You have something like a remote control session for the VM. You can install software in the VM just as if you installed the OS on hardware.

3 Likes

Ok Many thanks

This is great :grinning_face: i installed boxes and debian 13 and it is ok i think a bit diffrent from others and how do i enable more memory to a distro in boxes ?

1 Like

I forget exactly. It is in the menues. With Boxes you have to do it when the VM is not running.
With VirtManager you can do it dynamically , while the VM is running. Not sure about Virtualbox.

3 Likes

Ok. thank you Neville

I found it in the options where i can give more memory or ram .

1 Like

This may help with Boxes

3 Likes

Is it possible to for example to install graphic drivers in virtual machines ?

There has to be a visible device for the driver to work with
In VirtManager , I know you can make devices visible to the VM. Then when you install and boot, the drivers will be loaded into the kernel.
Dont know about Gnome Boxes… it may not be able to make devices visible.

A normal VM , ie what you get by default, will not see any of the hosts devices … all it sees is an ethernet interface that connects to a virtual network.
That is why a VM is a safe place to try things … it cant do any damage to your filesystem.

3 Likes

There’s little point…

Most distros support KVM, VMware and VirtualBox these days… i.e. they have drivers for various stuff built in and most of them run the appropriate “agent” - e.g. vmware-tools for VMware or - “spice-agent” for KVM… and I think some other agent if the HyperVisor is VirtualBox

If you wanted your VM to be able to access your GPU - that’s a whole other level - and I’d suspect a bit beyond your current experience / skills… Generally called “device pass through”.

Effectively - you have to disable the GPU in the host O/S (i.e. your physical hardware) - I think some people achieve this by having dual GPUs - e.g. an onboard Intel GPU + a discrete GPU in a PCIe slot… My motherboard is capable of having onboard and discrete - except my AMD CPU doesn’t have an “APU” (i.e. GPU engine on the CPU die) - so my only GPU is an AMD one in a PCIe slot.

If I really, REALLY, wanted to - I could put a 2nd GPU in another PCIe slot (risky) and blacklist it in the host O/S so I could access it in KVM… too much effort for little reward…

The most common way users do this (or try) - is in VirtualBox - the “use case” being n00bies trying to learn Pentesting (penetraion testing) with Kali Linux as a guest - you’d attach a USB WiFi dongle that can do “monitor mode”, and pass it through to the VM (i.e. don’t USE the dongle in the host OS) so the guest VM can “directly” access the hardware…

Summary : I don’t think you want to do this… You don’t want to blacklist your GPU in the host O/S…

Some common terminology :

  • “host” : i.e. the bare metal operating system hosting guest VMs
  • “guest” : i.e. a VM on “the host”
  • “device passthrough” : hardware on the “host” is blacklisted so it can be directly accessed on a guest, there’s “GPU passthrough” “NIC passthrough” and “USB Passthrough”. USB is probably the easiest - and least risky…

Note: “containers” or things like Docker - aren’t strictly virtualization - but - you can do things like access a GPU in a docker container - but you don’t need drivers for that…

4 Likes

Yes , important point.
Only one OS should access any hardware at a time.
For example , if I setup a VM and a host to both have direct access to a disk partition , the result would be catastrophic loss of filesystem in that partition, and maybe the whole disk.

3 Likes

Ok. Thank you Neville and Dan, no i wont do all that stuff i was more Curious if it was possible.

If you want to test out an alernative Linux distribution - with an alternative DE - test driving it in a VM is way easier than trying to do it on bare metal…

The VM drivers (i.e. stuff that does display, and network and keyboard, mouse etc) are so mature - you can get a near “native” experience on a VM…

That’s so much better (IMHO) than trying other DEs on “bare metal” and risking dual booting…

I HIGHLY recommend using any of the mainstream Virtualization solutions - to test out other Operating Systems - versus - dual or multiple booting…

  • VirtualBox
  • KVM (what you use in Boxes and Virt-Manager - the best - 'cause your Linux kernel does all the heavy lifting)
  • VMware
  • HyperV (if you’re on Windows - this is the default - but the drivers are pretty shit)

there are others - I think the “xen” hypervisor is reasonably mature…

3 Likes

Yes im using gnome boxes and it works well, i meant i wont do all the hassle with getting graphic drivers to work.. And now i know why Garuda didn’t install on my pc, i tried to install it on boxes and it said i need to dissable secure boot in bios and i thought i already did that and i did but it didn’t work its always on auto mode and i need to reset bios or something to dissable secure boot and i dont know how and i realy dont want to mess to much with bios if anything goes wrong.

We discover things in strange ways

2 Likes

Are you talking about your host (real computer) or VM?

If you were trying to install on a VM, then I believe it is talking about the VM’s secure boot (VM’s have their own virtual firmware (BIOS or UEFI)). I do not use gnome boxes, so I don’t know how or if you can disable the VM’s secure boot easily.- I use, Virt manager and Virtualbox, which you can turn off VM’s secure boot.

3 Likes