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

[Solved] Install VirtualBox or Virt-Manager

#1 Post by limotux »

Hi,
Sorry if this is a repeated question.
I have already read viewtopic.php?t=80468 and viewtopic.php?t=133006

But my question is a bit more simple.
On some others distros I was on, I used to download and install the relevant packages and extension pack from https://www.virtualbox.org/wiki/Downloads

I tried:

Code: Select all

root@debian:/home/limo# sudo apt install virtualbox virtualbox-ext-packReading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package virtualbox is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package virtualbox-ext-pack is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'virtualbox' has no installation candidate
E: Package 'virtualbox-ext-pack' has no installation candidate
root@debian:/home/limo# 
So, it is in not in the default repos.
(I won't really like to play with repos or change them, my rule of thumb always is better stick to defaults.)

So, would it be OK to download from the VirtualBox website and install from the downloaded .deb files?
Would this add the virtualbox repos?
Would I be getting updates automatically?

Sorry for the lengthy post, but I feel in my case or my question is just a bit different from the case in other 2 threads.

UPDATE:
I tried AI Bard/Gemini and it suggested:

Code: Select all

sudo wget https://www.virtualbox.org/download/linux_repositories/debian/virtualbox.list -O /etc/apt/sources.list.d/virtualbox.list
sudo apt update
sudo apt install virtualbox virtualbox-ext-pack
I though prefer asking the experts.here. Better than AI.
Last edited by limotux on 2024-03-15 14:03, edited 1 time in total.
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)

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: [Software] Install VirtualBox

#2 Post by steve_v »

Virtualbox is (last time I looked anyway) available from the debian-fasttrack repository.

As to your other questions:
Probably.
No, unless you add their repository.
No, as above.
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: [Software] Install VirtualBox

#3 Post by friendlysalmon88 »

I think that it would be beneficial if the OP consider using the fastback,debain.net package archive, as it tends to have the newest releases of YirtualBox that have been thoroughly back the Debian community.
I've had great sucess using the verion of Virtual box from the aforementioned repository.

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

Re: [Software] Install VirtualBox

#4 Post by limotux »

steve_v wrote: 2024-03-12 18:39 Virtualbox is (last time I looked anyway) available from the debian-fasttrack repository.

As to your other questions:
Probably.
No, unless you add their repository.
No, as above.
Thanks @steve_v
I will read a bit more to understand what is the fasttrack repository. I hope it is a stable as default Debian repos, I don't really care about frequent updates (I came to Debian from EndeavourOS which is a rolling release and I really enjoyed it for about a year)

I am thinking doing:

Code: Select all

sudo wget https://www.virtualbox.org/download/linux_repositories/debian/virtualbox.list -O /etc/apt/sources.list.d/virtualbox.list
sudo apt update
sudo apt install virtualbox virtualbox-ext-pack
and adding the virtualbox.org repos to my sources list if it will be more stable or better than adding the fasttrack repo.

Any more ideas or comments?
I believe in brainstorming and discussion to learn more.
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
limotux
Posts: 164
Joined: 2011-05-30 17:38
Has thanked: 37 times
Been thanked: 12 times

Re: [Software] Install VirtualBox

#5 Post by limotux »

friendlysalmon88 wrote: 2024-03-12 23:47 I think that it would be beneficial if the OP consider using the fastback,debain.net package archive, as it tends to have the newest releases of YirtualBox that have been thoroughly back the Debian community.
I've had great sucess using the verion of Virtual box from the aforementioned repository.
Thanks @friendlysalmon88 for your input.
Allow me to ask again as per my previous reply, as you are using fasttrack repo, what are the differences between this fasttrack repo and adding the virtualbox.org repo?

Does the fast track repo get more frequent updates to all installed packages?
I will appreciate helping me more with your experience.

I will do my homework and study more about fasttrack repo.

What do you think about what I suggested above, to add the virtualbox.org repo? Would it be better, more stable?
I am just brain storming and listenning to different points of view and learning from others experiences.
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)

arzgi
Posts: 1198
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 32 times

Re: [Software] Install VirtualBox

#6 Post by arzgi »

virtualbox was in the repo for quite a short time. It was removed because they did not made secure patches to flaws Linux devs told.

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: [Software] Install VirtualBox

#7 Post by steve_v »

arzgi wrote: 2024-03-13 18:38It was removed because they did not made secure patches to flaws Linux devs told.
It was removed because Oracle wouldn't provide backported security patches for the version Debian was shipping, which means the only way to have those fixes is to run the latest upstream release. That obviously won't work with the Debian stable release model.
Debian-fasttrack exists specifically to serve packages like this (i.e. can't be run through the usual unstable -> testing -> stable workflow) to Debian stable users.

As for which repo to use, virtualbox upstream is probably faster than fasttrack when it comes to new releases, but it doesn't get any testing by Debian maintainers at all. Pick your poison.
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

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

Re: [Software] Install VirtualBox

#8 Post by limotux »

steve_v wrote: 2024-03-13 19:39
arzgi wrote: 2024-03-13 18:38It was removed because they did not made secure patches to flaws Linux devs told.
It was removed because Oracle wouldn't provide backported security patches f........
As for which repo to use, virtualbox upstream is probably faster than fasttrack when it comes to new releases, but it doesn't get any testing by Debian maintainers at all. Pick your poison.
I see, I have to pick a poison.
I read about fast track, if I added it -as I understand - I will be updating all installed software, which is not the Debian philosophy or tue Debian quality and stability, which is why I am here (from a rolling release as I previously mentioned)

So, perhaps adding the virtualbox.org repos is the safest that I can have only virtualbox and only its updates not everything, while keeping the rest of the system the amazing Debian and its stability.

What do you think guys?
Any reliable alternative that is as good as virtualbox perhaps.
Any ideas or suggestions? Any suggested alternatives that are in the Debian repos that might fit the bill?
May I suggest that Debian select a stable version and add it to the Debian repos? I am not interfering with their business, I appreciate what they are doing but hoping to find the best solution!
Well, for me, since 2000 on Linux, Linux is to try, test, experiment with the same distro or with other distros.

I will think out loud with you, if you allow me.
As I know, my default installation did not come with Python, so I was thinking of using virtualbox and install Debian on it and add Python and play with it. This way, I will be keeping my Debian installation as default as it is.

I started to think of installing something like TimeShift, but it is not that practical in this case.
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: [Software] Install VirtualBox

#9 Post by CwF »

limotux wrote: 2024-03-13 20:37 Any reliable alternative that is as good as virtualbox perhaps.
It may be more relevant what you want to do with your vm's and on what hardware you have to work with. Ultimately, qemu/kvm/libvirt is a superior host for any purpose if you give it the hardware to do the job.

Post edit for more ongoing details-->

There really isn't a master meta package since exact usage and function varies.
I think for a minimal Libvirt/qemu/kvm with Virt-manager base install;
virt-manager
qemu-system-x86
Those two alone get you a minimally into a working setup, I think. Those will bring in necessary libvirt stuff, if not we want to add package libvirt-daemon.

For host communication with the virtual machine through spice with or without a guest network install within the guest these packages;
qemu-guest-agent
spice-vdagent
This gives file drag and drop from host to guest desktop.
For windows guest there are similar guest drivers available. I'm not that expert,
Fedora link?

For sharing files with the host I balk... First off there are many ways, many old ways and upcoming ways. I'm not so interested in most of the methods. Since kernel 5.4 and still maturing is qcow2 as a block device and I've lost track of it after my first dive a few years ago. I'll pick up on that someday. A long time ago I decided (for me) that virtual network bridging was a bad idea, which works fine. To sidestep this I use extra hardware and mcvtap's only - to the same result. My brains auto-floppy-loader may eventual find that floppy.

In the meantime, and preferably I use usb thumbdrives or virtual drives connected as such. So pass, or mount these devices on demand, do your thing, and disconnect. Anything online is in that group. Other mixed intranet guest have a peer vm offering samba. Easy.

For external remote access there are some packages commonly missed.
ssh-askpass
netcat-openbsd
dnsmasq
iptables <-- I think the transition away is almost complete in bookworm?
Not everyone will access vm's from another machine, but is is a good way to give under powered computers access to a vm more powerful than itself. And note that usb's on one machine may be passed to vm's on another - that's a nice trick that fits tightly into my file sharing method.

qemu-utils is all alone, install this to gain superior imaging tools, read man qemu-img
libguestfs-tools is very fat, install this to gain extra image format tools, namely virt-sparsify

There are more extras and expansions for most of these starter packages. Extra bios type support, foreign disk formats, and things I don't know about. Still maturing is video pass through support like virgl and whatever else. Overall this is an are where VirtualBox's 'additions' patches the gap for superior guest performance on simplistic machines. On a big box we can eliminate the issue by passing a gpu, eth, and other devices with vfio. So the top end of vm performance under Libvirt/qemu/kvm is essentially unlimited by the host. This has its own long learning curve.

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

Re: [Software] Install VirtualBox

#10 Post by limotux »

Just to update you, I found after searching and asking Bard/Gemini AI, I can use

Code: Select all

virt-manager
As far as I understood it uses a built in emulator, and it works as a frontend for the virtual machines, similar to VirtualBox.

If it is OK and works as VirtualBox it would be much better than VirtualBox?

Anybody used

Code: Select all

virt-manager
How is it?
Would I need to install anything else other than virt-manager?
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: [Software] Install VirtualBox

#11 Post by sunrat »

virt-manager is (generally) used as a front-end for KVM/QEMU. Yes it is better than VBox if you ask most people who use it including me. It works a bit differently so you'll have to learn a few things but is mostly fairly easy and performs better.
It's also open source and available in Debian main repo.
“ 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: [Software] Install VirtualBox

#12 Post by pbear »

limotux, what's your experience level with VBox? If you've only dabbled in it, starting over with KVM/QEMU probably makes more sense in the long run. OTOH, if you're used to VBox, getting it installed in Debian is quite easy. Never mind the Bard/Gemini instructions (whoever/whatever that is); they're wrong. This is the correct method per Oracle (link in your first post). Run one line at a time, using copy-and-paste. Install wget first, if you don't have already.

Code: Select all

echo "deb [arch=amd64 signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] https://download.virtualbox.org/virtualbox/debian bookworm contrib" | sudo tee -a /etc/apt/sources.list
wget -O- https://www.virtualbox.org/download/oracle_vbox_2016.asc | sudo gpg --dearmor --yes --output /usr/share/keyrings/oracle-virtualbox-2016.gpg
sudo apt update
sudo apt install virtualbox-7.0
That's adapted slightly, (a) to edit your sources list directly (using the tee command) and (b) to correct a typo in the Oracle instructions (which still say 6.1, where obviously it should be 7.0). You download the extension pack separately (same Oracle link) and install it from within VBox. No need to download guest additions, as they're part of the app package.

A simpler method, by the way, is to install from deb file (yup, same link). Doesn't update automatically, but you can configure VBox to check periodically. Then you update manually, which entails downloading the next version and installing it over the old one. This is the method I use, mainly because it takes no longer than automatic update and makes it a little easier for me to keep multiple systems on the same version.

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

Re: [Software] Install VirtualBox

#13 Post by limotux »

sunrat wrote: 2024-03-14 03:16 virt-manager is (generally) used as a front-end for KVM/QEMU. Yes it is better than VBox if you ask most people who use it including me. It works a bit differently so you'll have to learn a few things but is mostly fairly easy and performs better.
It's also open source and available in Debian main repo.
Thanks a lot @sunrat
I will learn more about virt-manager
I will ttry it first on ots own, and see if I need to install KVM or QEMU, I will try to find what difference installing any of them would make.
As I said, I am not after something complicated or too advanced, simply a virtual machine where I install everything I already have on host PLUS Python to play with Python a little and maybe AI later on.

My impression as of what I have read till now, I am tending to like virt-manager more (though not yet installed)
I will appreciate any feedback or guidance.
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
limotux
Posts: 164
Joined: 2011-05-30 17:38
Has thanked: 37 times
Been thanked: 12 times

Re: [Software] Install VirtualBox

#14 Post by limotux »

pbear wrote: 2024-03-14 04:52 limotux, what's your experience level with VBox? If you've only dabbled in it, starting over with KVM/QEMU probably makes more sense in the long run. OTOH, if you're used to VBox, getting it installed in Debian is quite easy. Never mind the Bard/Gemini instructions (whoever/whatever that is); they're wrong. This is the correct method per Oracle (link in your first post). Run one line at a time, using copy-and-paste. Install wget first, if you don't have already.

Code: Select all

echo "deb [arch=amd64 signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] https://download.virtualbox.org/virtualbox/debian bookworm contrib" | sudo tee -a /etc/apt/sources.list
wget -O- https://www.virtualbox.org/download/oracle_vbox_2016.asc | sudo gpg --dearmor --yes --output /usr/share/keyrings/oracle-virtualbox-2016.gpg
sudo apt update
sudo apt install virtualbox-7.0
That's adapted slightly, (a) to edit your sources list directly (using the tee command) and (b) to correct a typo in the Oracle instructions (which still say 6.1, where obviously it should be 7.0). You download the extension pack separately (same Oracle link) and install it from within VBox. No need to download guest additions, as they're part of the app package.

A simpler method, by the way, is to install from deb file (yup, same link). Doesn't update automatically, but you can configure VBox to check periodically. Then you update manually, which entails downloading the next version and installing it over the old one. This is the method I use, mainly because it takes no longer than automatic update and makes it a little easier for me to keep multiple systems on the same version.
Thanks a lot @pbear
I used VBox some time ago on another distro and it was fine.
I mainly used it to test different distros or install same distro I am on on a virtual machine to play with it without breaking my installation.
I hope my previous reply explains what I am after.
I feel I am about to install virt-manager and try and read more or hopefull hear more from the experts here about what QEMU would add to my experience given my use case.

I believe in brainstorming and thinking out loud!
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)

pwzhangzz
Posts: 441
Joined: 2020-11-11 17:42
Has thanked: 10 times
Been thanked: 27 times

Re: [Software] Install VirtualBox

#15 Post by pwzhangzz »

(The following comments are not relevant to the original question--OP runs bookworm, but I am posting it anyway just to show the versatility of Debian.)

We are running Sid and we install VirtualBox with a simple command:

Code: Select all

sudo apt update && sudo apt install virtualbox virtualbox-ext-pack virtualbox-guest-additions-iso
(The virtualbox package will automatically install virtualbox-dkm to take care of kernel upgrade. You probably also need to install build-essential and linux-headers-$(uname -r), which we routinely install after each Debian installation).

Thus, another command if those packages were not already installed:

Code: Select all

sudo apt install build-essential linux-headers-amd64
Sid developers did a very consistent job in packaging VirtualBox into the Sid contrib repo. It usually got updated within one or two days after Oracle released an upgrade. Almost like a clockwork. There were a couple of exceptions but it turned out that the held-backs were due to serious regressions in the VBox upgrade. I definitely got a feeling that Sid developers care a lot about VirtualBox. They don't have to but they did.

One of the best advantages of VBox over qemu/kvm is the ease to create share folders and doing copy & paste between host and guests. No effort is required. But as I mentioned (primarily as a note to self) in a separate thread:

viewtopic.php?t=158331&sid=6dd6b610fcb8 ... 50&start=9

share folders and copy & paste can also be done in kvm, but it requires some under the sink plumbing--easy for forum elders but for those coming from the Windows world, we might just as well speak Klingon.
Last edited by pwzhangzz on 2024-03-23 23:28, edited 1 time in total.

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

Re: [Software] Install VirtualBox

#16 Post by limotux »

pwzhangzz wrote: 2024-03-14 13:32 (The following comments are not relevant to the original question--OP runs bookworm, but I am posting it anyway just to show the versatility of Debian.)

We are running Sid and we install VirtualBox with a simple command
....
One of the best advantages of VBox over qemu/kvm is the ease to create share folders and doing copy & paste between host and guests.
..
Thanks @pwzhangzz
Now I have an extra task to sort out, shared folder, copy and paste between host and guest. Maybe a cloud drive can help?

Well, SID is/was sort of interesting for me (I came from EndeavourOS - a rolling release.
How is Debian SID compared to EndeavourOS in regards to stability... etc?
How is the default Debian vs SID regarding stability?
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: [Software] Install VirtualBox

#17 Post by CwF »

limotux wrote: 2024-03-14 13:29 I believe in brainstorming and thinking out loud!
Me too.
If you promise to eventually change the OP title to "[SOLVED] Install VirtualBox or Virt-Manager" I'll take some time to type as I think! This could be an informative thread. There are many experts here familiar with VirtualBox and they are posting their secrets already. Let's put all current solutions here.
Libvirt/qemu/kvm specifics are harder to come by since as that 'name' suggest it is an amalgam of technologies and components to be pieced together according to need. Virt-manager is a common 'front-end' to utilize virtual machines.

I will edit my smug qemu/kvm/libvirt superiority post #9 above with additions...
viewtopic.php?p=795167#p795167

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

Re: [Software] Install VirtualBox

#18 Post by limotux »

CwF wrote: 2024-03-14 17:58
limotux wrote: 2024-03-14 13:29 I believe in brainstorming and thinking out loud!
Me too.
If you promise to eventually change the OP title to "[SOLVED] Install VirtualBox or Virt-Manager" I'll take some time to type as I think! This could be an informative thread. There are many experts here familiar with VirtualBox and they are posting their secrets already. Let's put all current solutions here.
Libvirt/qemu/kvm specifics are harder to come by since as that 'name' suggest it is an amalgam of technologies and components to be pieced together according to need. Virt-manager is a common 'front-end' to utilize virtual machines.

I will edit my smug qemu/kvm/libvirt superiority post #9 above with additions...
viewtopic.php?p=795167#p795167
Thanks @CwF
Done as you suggested. You were reading my mind by the way.
As far as I have learned till now, it seems to me that though VirtualBox may seem a bit more advanced or user friendly, I think Virt-Manager is a good solution for my use case, just to have some machines to play with.

I will appreciate if we can make this thread more informative and hopefully users would be using Virt-Manager instead of VirtualBox as Virt-Manager is in the repos and meets Debian standards.
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: [Software] Install VirtualBox

#19 Post by sunrat »

limotux wrote: 2024-03-15 14:09... VirtualBox may seem a bit more advanced or user friendly...
VBox is possibly a bit more user friendly, but not as "advanced". virt-manager/KVM/QEMU is capable of more but needs a bit more knowledge of how to do some things.
“ 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
limotux
Posts: 164
Joined: 2011-05-30 17:38
Has thanked: 37 times
Been thanked: 12 times

Re: [Solved] Install VirtualBox or Virt-Manager

#20 Post by limotux »

Thanks a lot @sunrat
I have a feeling I better install Virt-Manager.
For my simple use case, just to create one or more virtual machines, would Virt-Manager only be enough or I should install something else?
As far as I know for now, QEMU is more convenient but what would it add to my use case?
UPDATE 1:
Installing

Code: Select all

sudo apt install virt-manager
I will update you how is it going.

UPDATE 2:
Installed successfully
Well some attempts initially failed to even start the installation of Debian.
Other attempts worked, but failed to create file system!
Last edited by limotux on 2024-03-16 12:45, edited 3 times in total.
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)

Post Reply