Intelligence is simply talking to many people

VMs on Linux (VirtualBox and QEMU) in 2024

QEMU would be better, because it's FOSS (VirtualBox is very not FOSS), but it has limitations).

Limitations of QEMU:

  • hard to install OSs on VMs because you have to know what 'system' to select? For Kali22.3 do I use genericUbuntu22? or do I use Debian11?
  • Drag and drop LinuxHost to LinuxGuest works immediately, but G>H won't work at all (there's no setting to make it work, you would have to do some unknown tech thing to make it work maybe)
  • Shared folders LHost/LGuest can be set up, and so can LHost/W7Guest it seems though something called Spice, but you have to figure that out
  • Screen doesn't resize very nicely. It seems to always have the same aspect ratio, so you can only control the width

So if you want to run Ableton on a Win7 VM, you won't be able to exchange files without that Spice thing. And you can't easily exchange files (or maybe it's easy once you figure it out) with LinuxVMs.

So VirtualBox often doesn't work right away on whatever Machine/OS you're installing it on (occasionally it does though). It gives that error when you try to launch a VM. vboxmodprobe. This has many solutions given over the years that worked for various people on their machine/OS at the time, but none are THE solution that will work on your computer.

So you have to try lots of things to make VirtualBox run on your computer (by run I mean launch a VM without that error).


INSTALL OF VIRTUALBOX in 2024

(Remember when cloning a VM, generate a new mac)

on the X1 in 2024 I tried to install the jammy version from the VirtualBox website (after trying many Terminal attempts, which may have been just as good if I had proceeded to the commands below to modify things. You can possibly just do sudo apt-get install virtualbox-dkms),

But got the gDebi error: Dependency is not satisfyable: libvpx7 (> =1.10.0)

... So downloaded an ('insecure') package from ubuntu from:

https://packages.ubuntu.com/jammy/amd64/libvpx7/download

... then gDebi installed the jammy deb file from https://www.virtualbox.org/wiki/Linux_Downloads.

But then got the old modprobe error when I tried to launch a VM.

Things you can try to get it to work:

sudo /etc/init.d/vboxdrv setup

sudo dpkg-reconfigure virtualbox-dkms

sudo apt-get dist-upgrade

(initramfs) fsck /dev/sda1 -y

(the -y means you won't have to type y a hundred times.)

... or ... /sdaX

(this one worked last time on x1 carbon 11thgen kali 22.3:)

sudo apt install --reinstall linux-headers-$(uname -r) virtualbox-dkms dkms

... then

sudo modprobe vboxdrv

(...But I had already installed virtualbox with the deb file from virtualboxwebsite, then sudo apt-install virtualbox-dkms, and also did many updates/dist-upgrade, and that dpkg-reconfigure. So not sure if these were necessary. Maybe next time just try sudo apt install virtualbox virtualbox-dkms then this above set of commands and might work.

A link if you're troubleshooting. There are many. ... Some of the troubleshooting pages you will find talk about (finding and then) modifying a directory with .config/VirtualBox/VirtualBox.xml and .xml-prev, but if you edit these, or delete one and rename the other, when you restart a VM it will just reset them anyway. Rebooting doesn't affect this.

https://askubuntu.com/questions/217972/virtualbox-does-not-run-ns-error-failure

A common error message (at the side of the program):

The virtual machine 'YourMachineName' has terminated unexpectedly during startup with exit code 1 (0x1).
Result Code:
NS_ERROR_FAILURE (0X80004005)
...
Kernel driver not installed (rc=-1908)

And the pop up dialogue:


The VirtualBox Linux kernel driver is either not loaded or not set up correctly. Please try setting it up again by executing

'/sbin/vboxconfig'

as root.

If your system has EFI Secure Boot enabled you may also need to sign the kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load them. Please see your Linux system's documentation for more information.

where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) - The support driver is not installed. On linux, open returned ENOENT. 

.

QEMU

(Note Kemu didn't want to install Kali22.3 on a new VM, maybe I didn't pick the right system options like generic22.3 or debian11? so I used a download from Kali for Qemu, and it works.

https://www.makeuseof.com/how-to-install-qemu-ubuntu-set-up-virtual-machine/

apt get install qemu-system

apt-get install virt-manager

(it's called virtual-machine-manager in your GUI menu)

Qemu/virt-manager shared folders Linux>Linux

https://www.debugpoint.com/share-folder-virt-manager/

Shared folders Linux>Windows7

https://askubuntu.com/questions/1495060/how-do-i-share-a-folder-between-ubuntu-22-04-client-and-windows-7-guest-usin

Another set of install instructions?

https://www.youtube.com/watch?v=vyLNpPY-Je0

Tutorial for Ubuntu-style machines. There's another video I noticed for Manjaro.

slcpu | grep Virtualization

to check you have virtualization running on the computer

sudo apt-get update

sudo apt install qemu-kvm &&
sudo apt install libvirt-daemon-system libvirt-clients
sudo adduser $USER kvm 

reboot

(now it you type ‘groups’ you'll see the groups the user belongs to, now includes kvm and libvirt)

sudo apt install virt-manager 

(now you can open it from the start menu)

Comments: 0

Interested to discuss? Leave a comment.

Image




Your email will not be published nor shared with anyone. In your text you can use markdown for marking up *italic*, links <http://example.org> and other elements. These comments are moderated and published manually as soon as possible.