Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Solved] Install VirtualBox or Virt-Manager

New to Debian (Or Linux in general)? Ask your questions here!
Message
Author
User avatar
limotux
Posts: 164
Joined: 2011-05-30 17:38
Has thanked: 37 times
Been thanked: 12 times

Re: [Solved] Install VirtualBox or Virt-Manager

#41 Post by limotux »

Well!
Here is my final findings and results I found and happened with me.
- Installing a virtual Debian Machine always failed to boot unfortunately.
- I downloaded MX Linux iso booted, installed, and booted the virtual machine which worked seamlessly. Not a single issue.
- Everything was really slow, whether during installation or the virtual machine itself (the MX Linux)

I will uninstall virt-managerand hopefull clean all traces.
I will try VirtualBox and see how it goes.

I will report back how it goes.
Debian 12 (bookworm), KDE Plasma, quad core Intel Core i7-8550U
Drives: 238.47 GiB SSD
Memory: 7690.7 MiB
(Installed 24/8/2023) (no techie)

CwF
Global Moderator
Global Moderator
Posts: 2719
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 201 times

Re: [Solved] Install VirtualBox or Virt-Manager

#42 Post by CwF »

There is a subject we kinda skipped, I did start out with
Ultimately, qemu/kvm/libvirt is a superior host for any purpose if you give it the hardware to do the job.
There are the virtualization extensions in cpu's and the particular architecture of the host that likely not only make a difference but could be make or break. You may want to check the specs and bios settings of the machine you're working with - does it have virtualization extensions and are they enabled. I think a i7-8550U is ok, check the bios. If not then the virtualization potential is essentially not 'accelerated'. Bummer.

A caveat to remember with my advice is it is coming from legit workstation class experience with a whatever it takes mandate - and I forget that sometimes... Laptops are not my interest or focus, unless you include my mention of under powered machines as vmm clients to my vm servers. Those are fast, up to what is possible within networking limits.

There are more holes in my experience. I haven't installed anything since an exploratory test with a bookworm beta quite awhile back. All my actual machines are from stretch and prior using vm's to upgrade them to current. That is why I mention qemu-utils, the magic that makes the infinite retries possible from a pool of images. I almost never start from scratch.
limotux wrote: 2024-03-19 15:29 I will try VirtualBox and see how it goes.
From what I understand VBox is much better on low end hardware and may be your answer. I do criticize it as being less representative of bare metal compatibility and performance, but maybe that's not the point.

User avatar
sunrat
Administrator
Administrator
Posts: 6511
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 119 times
Been thanked: 489 times

Re: [Solved] Install VirtualBox or Virt-Manager

#43 Post by sunrat »

CwF wrote: 2024-03-19 16:42 There is a subject we kinda skipped, I did start out with
...
There are the virtualization extensions in cpu's and the particular architecture of the host that likely not only make a difference but could be make or break. You may want to check the specs and bios settings of the machine you're working with - does it have virtualization extensions and are they enabled. I think a i7-8550U is ok, check the bios.
This ^. I vaguely recall having to enable Intel VT-x for my i5-6500. For AMD it's called AMD-V.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

User avatar
pbear
Posts: 329
Joined: 2023-08-27 15:05
Location: San Francisco
Has thanked: 1 time
Been thanked: 57 times

Re: [Solved] Install VirtualBox or Virt-Manager

#44 Post by pbear »

In the OP's defense, I spent a couple hours last night playing with virt-manager. Don't doubt it works, but it aint easy.

User avatar
limotux
Posts: 164
Joined: 2011-05-30 17:38
Has thanked: 37 times
Been thanked: 12 times

Re: [Solved] Install VirtualBox or Virt-Manager

#45 Post by limotux »

Well I guess I knew why nothing worked.
I did some search and reading your posts here, Virtualization was disabled in BIOS

I enabled it in BIOS, But I have already installed MX Linux (switched to systemd init) to be as Debian as possible.

Installed virtualbox and it went smooth.
Thanks guys I have learned a lot. I will try again later virt-manager.

This is the beuty of Linux, learning never ends.
Debian 12 (bookworm), KDE Plasma, quad core Intel Core i7-8550U
Drives: 238.47 GiB SSD
Memory: 7690.7 MiB
(Installed 24/8/2023) (no techie)

CwF
Global Moderator
Global Moderator
Posts: 2719
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 201 times

Re: [Solved] Install VirtualBox or Virt-Manager

#46 Post by CwF »

limotux wrote: 2024-03-20 16:01 Virtualization was disabled in BIOS
My apologies for not mentioning that earlier. In hindsight, any how-to should probably start with this detail. I wouldn't know if laptops default to disabled and why that would be. Workstation/server (Xeon) motherboards are default enabled as far as I know.

User avatar
limotux
Posts: 164
Joined: 2011-05-30 17:38
Has thanked: 37 times
Been thanked: 12 times

Re: [Solved] Install VirtualBox or Virt-Manager

#47 Post by limotux »

CwF wrote: 2024-03-20 16:08
limotux wrote: 2024-03-20 16:01 Virtualization was disabled in BIOS
My apologies for not mentioning that earlier. In hindsight, any how-to should probably start with this detail. I wouldn't know if laptops default to disabled and why that would be. Workstation/server (Xeon) motherboards are default enabled as far as I know.
No need to apologize @CwF, nobody would ever think it can be disabled by default. Maybe they have some hidden wisdom!
The last thing I could ever think of that it is disabled by default on a new laptop!
But anyway I have learned something.
Now I have VirtualBox on MX Linux (which I changed to sytemd init to be as Debian as much as possible).

I will try a Debian virtual machine on both VirtualBox and I will install virt-manager and try it.

I will report back to you, hoping this thread can be of value for others.
Debian 12 (bookworm), KDE Plasma, quad core Intel Core i7-8550U
Drives: 238.47 GiB SSD
Memory: 7690.7 MiB
(Installed 24/8/2023) (no techie)

User avatar
sunrat
Administrator
Administrator
Posts: 6511
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 119 times
Been thanked: 489 times

Re: [Solved] Install VirtualBox or Virt-Manager

#48 Post by sunrat »

I hadn't used Virt-manager or kvm-qemu for a while so fired it up tonight to try out the new Plasma 6 in OpenSuse Tumbleweed. After initial total failure, I realised I had somehow downloaded the netinstall image for S390x architecture rather than x86_64 :roll: 8)
After downloading the correct install image it was all pretty much plain sailing. A couple of things which may catch out novices:
- Give it at least 4096MB RAM, it would be slow or painful if your host has less than 8GB unless you're installing a really lighweight distro
- I prefer to set a custom location for the qcow2 virtual hard drive on a large disk. You need to click the + button to select location. YMMV.

OpenSuse Tumbleweed installed quite easily from the netinstall although it took way longer than a Debian netinstall. It's quite impressive actually and Plasma 6 seems rather good already even though it's in early stages (v 6.0.2 currently). I won't be switching from Debian as daily driver though.
Also found this simple pictorial tutorial on virt-manager setup. It's a few years old but hasn't changed much:
https://cubiclenate.com/2019/06/11/virt ... umbleweed/
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

User avatar
pbear
Posts: 329
Joined: 2023-08-27 15:05
Location: San Francisco
Has thanked: 1 time
Been thanked: 57 times

Re: [Solved] Install VirtualBox or Virt-Manager

#49 Post by pbear »

Most things are easy once one knows how. The tricky part is figuring out how in the first place. :mrgreen:

Doesn't help that so many tutorials and articles about KVM/QEMU are wrong and/or obsolete. Do you have any idea how disheartening it is to run a recommended command string, only to get back a no-can-do error from apt? Or how obscure the procedure to add a storage location for VM files? (By contrast, in VBox, it's the very first setting in Preferences.) Yeah, I figured it out, but it's not obvious. Likewise with how to boot a live session after installation (needed for system repair and/or dual boot), how to scale the VM desktop to window, snapshots, shared folders, etc.

Having gotten pretty far along on the learning curve, I'll repeat my earlier advice. If one is just starting out with virtualization, it's probably better in the long run to learn KVM/QEMU rather than VirtualBox. Just understand, as with most things Linux, you've got some work to do. Conversely, if you value ease of use over performance, or want a solution which works in Windows also, you might want to go with VBox.

CwF
Global Moderator
Global Moderator
Posts: 2719
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 201 times

Re: [Solved] Install VirtualBox or Virt-Manager

#50 Post by CwF »

sunrat wrote: 2024-03-22 11:56 - Give it at least 4096MB RAM, it would be slow or painful if your host has less than 8GB unless you're installing a really lighweight distro
Yes, 3 out of 4 is often good. Noob's often give them vm the whole farm. More cpu cores if not necessary is usually worse for example.

Notes on memory - Memory ballooning works well. Notice that there are both current allocation and maximum. This is a good way to explore a browser running out of memory, up the current allocation and it magically comes back to life! Maximum is set only at start, current allocation can be changed while running and we can pull memory also. Utilities like zram will see and size according to Maximum so keep that in mind. I usually limit the current and do have a reserve set with maximum. This is very useful and the literal safety valve when running more than a few vm's with maximum totaling more than host - over allocation does work and needs manual management.
This hot-plug idea does extend to cpu's, pci devices and drives. Virt-manager can handle this, if the guest OS can.
sunrat wrote: 2024-03-22 11:56 - I prefer to set a custom location for the qcow2 virtual hard drive on a large disk. You need to click the + button to select location. YMMV.
This is a very good idea! In addition to adding a storage pool location we can simply link external storage files or disk into default storage.

Code: Select all

# ln -s --target-directory=/var/lib/libvirt/images $target
This does need to be done as root. Sudo and doas can do so in a script or other cli tool like thunar's 'Custom Actions' or as done in my herder.tk GUI for this purpose. cows, herder, get it? Yes the icon is a fenced in cow, I didn't find a good one with a herder dog...

Once used, this file will be claimed by root regardless of location and not really an issue. I think adding to the storage pool as sunrat suggest avoids that if the location is in user space. ?
Also if not present at start we may see warnings in the journal:

Code: Select all

libvirtd[1165]: ignoring dangling symlink '/var/lib/libvirt/images/i686_xfce_12_0000_dev.qcow2'
libvirtd[1165]: ignoring dangling symlink '/var/lib/libvirt/images/amd64_xfce_bookworm-bb_0000_dev.qcow2'
libvirtd[1165]: ignoring dangling symlink '/var/lib/libvirt/images/Linked'
libvirtd[1165]: ignoring dangling symlink '/var/lib/libvirt/images/ata-TOSHIBA_HDWL120_X9DHPASBT'
No worries, they can come online any time after.
The first two show my standard naming.
The 'Linked' one shows sloppiness in my herder.tk when I tried '&& notify-send Linked'. I should fix that...
The last one shows an entire disk linked from /dev/disk/by-id/. You can link partitions too - don't.

Further on into advanced management I mentioned qemu-utils.
'qemu-img info vm.qcow2' gives a quick summary.
'qemu-img convert' is powerful, and complete substitute for any other 'imager' like dd and others.
Used for compressing existing qcows, imaging from disk to qcow2 or qcow2 to disk. Can handle most any format.

Even further is libguestfs-tools. This is unfortunately pretty fat and gives the tools for just about all formats. I wish one of the components could be pulled out for a slimmer footprint but oh well...

Code: Select all

# virt-sparsify --in-place $basefile
This performs an offline 'trim' of the qcow2 file. To be followed by a qemu-img compression. The qcow2 will grow in use, these two steps bring it back into a tidy size. We then replace the old qcow2 with this new one, and continue.

This sequence may start with a image that compresses to a few gigs. After a full update like 11 to 12, it will have grown to 5-6GB+. After the sparsify and compression steps we're back to a gig or two from which we run! This process is also why I have all installations at least part time live as a vm. My full featured hypervisor image gets backed up to a qcow2 and is 3.1GB. A typical vm qcow2 is only 1-2GB on disc if we manage it in this way.

Lastly, moving beyond using only virt-manager, all can be done with 'virsh' a cli utility. This is provided by 'libvirt-clients'. This is useful for integrating into DE's panels, or other gui tools. For sending keys, ballooning, attaching/detaching storage or devices, start up, shutdown, pause and resume - pretty much anything that can be done.
pbear wrote: 2024-03-22 19:06 I'll repeat my earlier advice. If one is just starting out with virtualization, it's probably better in the long run to learn KVM/QEMU rather than VirtualBox.
Yes, worth repeating.
I'd like to reiterate the name 'libvirt', that's more accurately what we're typing about here. I name it differently every time, libvirt/qemu/kvm ???

steve_v
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 1418
Joined: 2012-10-06 05:31
Location: /dev/chair
Has thanked: 80 times
Been thanked: 191 times

Re: [Solved] Install VirtualBox or Virt-Manager

#51 Post by steve_v »

CwF wrote: 2024-03-19 16:42 A caveat to remember with my advice is it is coming from legit workstation class experience with a whatever it takes mandate
...
From what I understand VBox is much better on low end hardware and may be your answer.
I've mentioned it before, but it probably bears mentioning again: While KVM/QEMU performance is great from a CPU perspective (especially with GNU/Linux guests), unless you're using PCI passthrough and a dedicated GPU VirtualBox still blows it out of the water for graphics performance with Windows guests... Primarily because it includes a custom WINE/DXVK-based Windows driver as part of the "Virtualbox guest additions", which for most "simple" 3D workloads (including acceleration of the windows UI/Aero etc) "just works" with no fiddling required.
If the goal is an easy to set up on-demand Winblows installation for casual desktop use, much as I loathe Oracle, VirtualBox really does offer a compelling solution. Doubly so if you also want your VM image to be just a couple of files that you can drop on a flash drive and boot up on a random Windows host.

For a more permanent solution with many always-on (primarily GNU/Linux) VMs, efficient host resource sharing, network (spice/vnc etc.) graphics, and better native integration and CLI tooling, QEMU/libvirt all the way... But I get the impression that's not really the OPs use-case.
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

friendlysalmon88
Posts: 50
Joined: 2023-12-08 16:48
Location: Seattle,Wa USA
Has thanked: 3 times
Been thanked: 3 times

Re: [Solved] Install VirtualBox or Virt-Manager

#52 Post by friendlysalmon88 »

The fasttract repository version of Virtualbods caries Debian specific patches and it ll so has a back port repository that is associated that caries packages that have been backported from earlier releases of Debian

you canfind a moore detailed explanation of the scope of the backports repositories on both backports.debian.net and the Debian wiki pafe requarding the same repositories

https://fasttrack.debian.net/

https://wiki.debian.org/Backports

trinidad
Posts: 299
Joined: 2016-08-04 14:58
Been thanked: 16 times

Re: [Solved] Install VirtualBox or Virt-Manager

#53 Post by trinidad »

I wouldn't know if laptops default to disabled
Whether or not virtualization is enabled is due to the originally installed operating system, not just board capability, i/e Windows 10 Home would have been disabled by default.

Also, though nobody seems to like to discuss it, gnome-boxes is the easiest virtualization application to use for new users.

TC
You can't believe your eyes if your imagination is out of focus.

Enigma83
Posts: 80
Joined: 2024-01-03 08:03
Location: Deep space
Has thanked: 9 times
Been thanked: 3 times

Re: [Solved] Install VirtualBox or Virt-Manager

#54 Post by Enigma83 »

Ever since I discovered Virt Manager, I've havent used any other virtualization solutions on Linux. It is, to me, far superior to VMware Workstation and VirtualBox. I will still use them in Windows if needed, of course Virt Manager can't work there.

Post Reply