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 ?
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.
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.
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.
Ok Many thanks
This is great
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 ?
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.
Ok. thank you Neville
I found it in the options where i can give more memory or ram .
This may help with Boxes
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.
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âŚ
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.
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âŚ
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
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.