Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: Proper way to Add VBox in 22.04

  1. #1
    Join Date
    Mar 2010
    Location
    undisclosed
    Beans
    Hidden!
    Distro
    Ubuntu Studio

    Proper way to Add VBox in 22.04

    What is the proper way to install VirtualBox in Ubuntu 22.04 ???

    Previously, after Fresh install of 22.04 on new SSD, after all updates, installed Synaptic and found VirtualBox selecting install.
    After next boot screen filled up with continous Error messages. Managed to write down the Error, screen fills up with ...

    "UBSAN: array index out of bounds in /var/lib/dkms/virtualbox 6.1.50/build/vboxdrv/SUPDrvGip"

    Had to Re-install the OS. Now need to Add VirtualBox back in because I use it for my Trading Software which runs on Windows ONLY.

    Any Help would be appreciated. Thanks!

  2. #2
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 24.04 Noble Numbat

    Re: Proper way to Add VBox in 22.04

    I would suggest that you download and install Virtualbox directly from the downloads available at https://www.virtualbox.org/wiki/Linux_Downloads then enable their repos using the info shown in the section on Debian-based Linux distributions.
    That will make sure that your Virtualbox version is kept updated automatically along with all other packages in Ubuntu.

    I no longer use Virtualbox having moved over to KVM/QEMU a long time ago which in my opinion is much better if using a Linux host OS.
    I would therefore recommend that you try it yourself, easily done by installing the virt-manager package which will automatically pull in everything else needed to use KVM/QEMU

    See https://help.ubuntu.com/community/KVM and https://help.ubuntu.com/community/KVM/Installation for more details.

  3. #3
    Join Date
    Mar 2010
    Location
    undisclosed
    Beans
    Hidden!
    Distro
    Ubuntu Studio

    Re: Proper way to Add VBox in 22.04

    Is Ubuntu / UbuntuStudio v22.04 considered a mixed installation being made on an AMD64 kernel with 32 bit packages?
    If so, the VirtualBox page above says ii is not supported, and would need to setup a 64-bit chroot environment (whatever that means).

    My Vbox data is extensive, with Trading Software etc. 60 GB on separate Drive. Can not Install all over again, and don't have time to learn new Software (KVM/QEMU). I can't make another mistake.

    Followed your advice to download the DEB file from VirtualBox website, but had to follow these instructions https://gcore.com/learning/how-to-in...box-on-ubuntu/ to add ppa and keys. Now up and running in no time, after adding my appliance (via its own folder).

    Thanks!
    Last edited by Rick St. George; 4 Weeks Ago at 01:26 AM.

  4. #4
    Join Date
    Mar 2010
    Location
    undisclosed
    Beans
    Hidden!
    Distro
    Ubuntu Studio

    Re: Proper way to Add VBox in 22.04

    Quote Originally Posted by ajgreeny View Post
    I would therefore recommend that you try it yourself, easily done by installing the virt-manager package which will automatically pull in everything else needed to use KVM/QEMU
    Question: Since my Data is extensive within my VM Appliance, is there a way to transfer or export it into KVM?

    I may try it since I believe I need to Delete/Remove Vbox as my computer is having trouble booting (black screen) See Here.

    Thanks!

  5. #5
    Join Date
    Sep 2006
    Beans
    1,952
    Distro
    Ubuntu 24.04 Noble Numbat

    Re: Proper way to Add VBox in 22.04

    Hello,

    I do not know about the transfer you are asking about, yet the errors you are facing during boot have to do with kernel-virtualbox issues, that I have come across as well and which haven't affected my booting experience, except seeing the error messages for a little while. I think that you might have to look elsewhere for your booting problem.

    Regards!

  6. #6
    Join Date
    Mar 2010
    Location
    undisclosed
    Beans
    Hidden!
    Distro
    Ubuntu Studio

    Re: Proper way to Add VBox in 22.04

    Found the following via AI.

    kernel-virtualbox issues in Ubuntu v22.04

    The kernel-virtualbox issue in Ubuntu v22.04 seems to be related to the VirtualBox kernel driver not being installed or set up correctly.
    Here are some possible solutions:

    1. Run the following command as root to set up the VirtualBox kernel driver again.

    Code:
    sudo /sbin/vboxconfig
    2. If your system has EFI Secure Boot enabled, you may need to sign the kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before loading them. You can do this by following your Linux system’s documentation for more information.

    To troubleshoot the issue, you can try the following steps:

    1. Check if the VirtualBox kernel driver is installed by running the command
    Code:
    lsmod | grep vbox
    If the driver is not installed, you can install it by running the command
    Code:
    sudo apt-get install virtualbox
    2. Check if the kernel modules are signed by running the command
    Code:
    lsmod | grep vbox | xargs modinfo
    If the modules are not signed, you can sign them by running the command
    Code:
    sudo sign-kernel-module vboxdrv vboxnetflt vboxnetadp vboxpci
    Note: this would not work for me (sign-kernel-module: command not found)

    3. Try to load the VirtualBox kernel driver by running the command

    Code:
    sudo modprobe vboxdrv
    I have tried these, and will Shutdown and ReStart to see what happens, and report back.

  7. #7
    Join Date
    May 2024
    Beans
    Hidden!

    Re: Proper way to Add VBox in 22.04

    I would do everything in your power to move off VirtualBox.

    You're adding substantial security risk to your data and systems by using it. Don't believe me? Just see https://www.cvedetails.com/vulnerabi...irtualbox.html

    There really are much more elegant solutions to virtualization and containers.

    Since you're into trading, the value proposition of a good investment should not be lost on you.

  8. #8
    Join Date
    Mar 2010
    Location
    undisclosed
    Beans
    Hidden!
    Distro
    Ubuntu Studio

    Re: Proper way to Add VBox in 22.04

    VirtualBox running now, but had to also install "Guest Additions".

    Will Research alternative to VirtualBox and hope I can Clone / Transfer / Export Appliance or whatever its called, to be able to IMPORT it into the next Virtual program! Any idea what that would be called?

  9. #9
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Proper way to Add VBox in 22.04

    Quote Originally Posted by Rick St. George View Post
    Question: Since my Data is extensive within my VM Appliance, is there a way to transfer or export it into KVM?

    I may try it since I believe I need to Delete/Remove Vbox as my computer is having trouble booting (black screen) See Here.

    Thanks!
    Lots of times, vendors will give out vDisks, of their OS. or others with applications. Some of them (like Windows VM's are time-bombed. I convert vDisk formats often. Many Vagrant formatted disks out there...

    A virtual disk (vDisk), is just a file. Files can be copied very easily... You say you don't want to lose what you had ---> have you made a copy of that yet for the just-in-cases? You know that convert usually creates a new file, not overwriting the old, right?

    So you saying you have complicated data and don't want to lose it... Doesn't really hold water. Because you don't have to lose anything at all. You can just work on the copy of what you had. It can stay there (safe) in it's original form.

    Although VBox supports many vDisk formats, the default format for a VirtualBox vDisk is .vdi... Two of the most popular vDisk formats for KVM is qcow2 & raw... Everyone seems to use vmdk files for demo's...

    Say if you wanted to covert that from within VBox:
    Code:
    vboxmanage clonemedium noble-desktop-24.04.vdi noble-desktop-24.04.img --format raw
    If you further wanted to convert to qcow2
    Code:
    qemu-img convert -f raw noble-desktop-24.04.img -O qcow2 noble-desktop-24.04.qcow2
    That is what the VBox world will tell you to do... What they do not understand, that these also work without VBox. Not documented, but works if you think of it in the qemu-img man page, under convert > formats, as "other"
    Code:
    qemu-img convert noble-desktop-24.04.vdi -O raw noble-desktop-24.04.img  
    qemu-img convert noble-desktop-24.04.vdi -O qcow2 noble-desktop-24.04.qcow2
    In KVM Virtual Machine manager > New > Import Existing Image >> Create the machine, using the vDisk file as the storage file.

    Easy Peasy.

    Not saying you must try this. Nor that this is what you 'should do'. Just saying you have more options than you seem to think you have. Nothing said as a cut or anything. Just making you aware... I want to help you with that. Even if you do not try KVM, and stay with VBox. Make a copy of what you don't want to lose. That just makes sense.
    Last edited by MAFoElffen; 1 Week Ago at 03:22 AM.

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  10. #10
    Join Date
    Mar 2010
    Location
    undisclosed
    Beans
    Hidden!
    Distro
    Ubuntu Studio

    Re: Proper way to Add VBox in 22.04

    Quote Originally Posted by MAFoElffen View Post

    That is what the VBox world will tell you to do... What they do not understand, that these also work without VBox. Not documented, but works if you think of it in the qemu-img man page, under convert > formats, as "other"
    Code:
    qemu-img convert noble-desktop-24.04.vdi -O raw noble-desktop-24.04.img  
    qemu-img convert noble-desktop-24.04.vdi -O qcow2 noble-desktop-24.04.qcow2
    In KVM Virtual Machine manager > New > Import Existing Image >> Create the machine, using the vDisk file as the storage file.
    If I understand you correctly ... "noble-desktop-24.04.vdi" is the Virtual Disk name from VirtualBox, and using the code above will convert to QEMU Format - Yes? But I get this ;

    Code:
    ms7640:/media/VirtualBox VMs$ qemu-img convert VirtualDisk-TradeSoft.vdi -o qcow2 VirtualDisk-Tradesoft.qcow2
    qemu-img: Invalid parameter 'qcow2'
    
    ms7640:/media/VirtualBox VMs$ qemu-img convert VirtualDisk-TradeSoft.vdi -o raw VirtualDisk-Tradesoft.img
    qemu-img: Invalid parameter 'raw'
    
    ms7640:/media/VirtualBox VMs$ qemu-img convert VirtualDisk-TradeSoft.vdi -o VirtualDisk-Tradesoft.img
    qemu-img: Must specify image file name
    When attempting use the ".vdi" file, I get this;

    Code:
    Unable to complete install: 'internal error: process exited while connecting to monitor: 2024-05-21T20:45:06.205521Z qemu-system-x86_64: -blockdev bla bla bla
    
    ms7640:/media/VirtualBox VMs$ qemu-img convert VirtualDisk-TradeSoft.vdi -o qcow2 VirtualDisk-Tradesoft.qcow2
    qemu-img: Invalid parameter 'qcow2'
    qemu-img: Invalid parameter 'qcow2'
    Command 'qemu-img:' not found, did you mean:
      command 'qemu-img' from deb qemu-utils (1:6.2+dfsg-2ubuntu6.15)
    Try: sudo apt install <deb name>
    
    ms7640:/media/VirtualBox VMs$ sudo apt install qemu-utils
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    qemu-utils is already the newest version (1:6.2+dfsg-2ubuntu6.19).
    qemu-utils set to manually installed.
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

    What am I doing wrong ? ? ?
    Thanks!
    Last edited by Rick St. George; 1 Week Ago at 10:18 PM.

Page 1 of 3 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •