I tried looking into this myself but I couldn’t really find much about this error. The only solutions I could find didn’t work for me. The first one was to use mokutil but at the point where I was supposed to run sudo mokutil --import MOK.der it gives me the error message “Failed to get file status, MOK.der” even though I did everything it told me to do. The other one was to disable secure boot and then run sudo '/sbin/vboxconfig' but even though it looked like it worked, I’m still getting the error message. I have re-enabled secure boot, so you don’t have to worry about that.

Is there something else I can try or does VirtualBox not work in Linux Mint for some reason?

  • EddyBot@feddit.de
    link
    fedilink
    arrow-up
    20
    arrow-down
    2
    ·
    1 year ago

    if you just need software to set up virtual machines you might look into Gnome Boxes or virt-manager which don’t require external kernel modules like Virtuap Box to work

    anyway these issues typically happen on Ubuntu based distros (like Linux Mint) because your linux kernel is to new for the Virtual Box version (or the Virtual Box version is simply too old)

    • vortexal@lemmy.mlOP
      link
      fedilink
      arrow-up
      3
      ·
      1 year ago

      So I tried virt-manager but it’s giving me an error message about not being able to connect to “libvirt qemu:///system” and it wont let me install a virtual machine. I’m assuming that I’m supposed to download “libvirtd”, but I can’t figure out how to install it. I think it wants me to build it from the source but there doesn’t seem to be a guide on how to do that.

      • Pantherina@feddit.de
        link
        fedilink
        arrow-up
        6
        ·
        edit-2
        1 year ago

        Yayy, I have the same problem.

        Try a

        sudo systemctl enable --now libvirtd
        

        I dont know how manual everything is in Mint

        Also add your user to thr libvirt group

        groupadd libvit
        sudo usermod -aG libvirt $USER
        
        • aksdb@feddit.de
          link
          fedilink
          arrow-up
          4
          ·
          1 year ago

          Just FYI, if you want to enable and start, you can use systemctl enable --now ....

      • JoshCodes@programming.dev
        link
        fedilink
        arrow-up
        3
        ·
        1 year ago

        Are you using a package manager or downloading everything from virtualboxs website? When I installed virtual box earlier today it all worked fine so that’s why I ask.

        • vortexal@lemmy.mlOP
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          1 year ago

          I installed it through apt with just sudo apt install virtualbox-7.0. I also downloaded the deb file from their website but, at least when installed through apt, it just ignores it and uses the version from Mint’s repository anyways.

          Edit: Because I just checked and you can’t install it directly like that anymore, I first tried installing VirtualBox a few months ago, with an older version of Linux Mint. When I tried installing it several hours ago, it was with the deb file but for some reason apt still selects a different version when it actually installs it.

                • vortexal@lemmy.mlOP
                  link
                  fedilink
                  arrow-up
                  1
                  arrow-down
                  1
                  ·
                  1 year ago

                  I literally stated in my comment that you can’t install it like that anymore. The reason why is because you get an error saying “E: Package ‘virtualbox-7.0’ has no installation candidate”. This means that in Linux Mint, you have to install it via the deb file.

      • Nik282000@lemmy.ca
        link
        fedilink
        arrow-up
        7
        ·
        1 year ago

        virt-manager

        I’ve used VirtualBox for years and only just tried virt-manager. I wish I had tried years ago, so much simpler and it is in my distro’s default repository.

        • vortexal@lemmy.mlOP
          link
          fedilink
          arrow-up
          1
          ·
          1 year ago

          I tried virt-manager but it’s giving me an error message about not being able to connect to “libvirt qemu:///system” and it wont let me install a virtual machine. I’m assuming that I’m supposed to download “libvirtd”, but I can’t figure out how to install it. I think it wants me to build it from the source but there doesn’t seem to be a guide on how to do that.

          • Patch@feddit.uk
            link
            fedilink
            arrow-up
            4
            ·
            1 year ago

            I’m assuming that I’m supposed to download “libvirtd”, but I can’t figure out how to install it.

            Try sudo apt install libvirt-daemon-system libvirt-clients in the terminal and rebooting the system.

            • vortexal@lemmy.mlOP
              link
              fedilink
              arrow-up
              3
              ·
              1 year ago

              It stated that they were already installed so I went through the process of re-installing them and rebooting the computer, which seems to have fixed the problem. I wont really be able to test it much right now because of how late it is for me but I was able to at least start the installation for Windows XP.

          • Pantherina@feddit.de
            link
            fedilink
            arrow-up
            1
            ·
            1 year ago

            On fedora its sudo dnf install qemu qemu-kvm virt-manager

            Virt-manager alone is just the viewer, its also intended to be used for things like remote viewing. This would be an easy solution

    • vortexal@lemmy.mlOP
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      I’m currently installing virt-manager but I ran into a problem with Gnome Boxes where I’m trying to run a Windows XP virtual machine but I can’t figure out how to get files from my host to the guest. Apparently, I need some software to be running on the guest but the website that I need to download the software from doesn’t work in internet explorer and I obviously can’t just download it on the host and transfer it to the guest.

  • bizdelnick@lemmy.ml
    link
    fedilink
    arrow-up
    14
    ·
    edit-2
    1 year ago

    First of all, check that hardware virtualization is enabled in your UEFI setup.

    You need to have packages virtualbox-dkms and linux-headers installed (together with all their dependencies, but you don’t have to check them manually). linux-headers must be of the same version as linux-image. That’s all that you need to get driver properly built. Don’t listen those users who recommend you to remove and reinstall these packages or install additional packages manually, this kind of magic doesn’t work.

    Also note that you cannot use kvm and virtualbox simultaneously. If you are using some kvm-based virtualization system, it causes a conflict.

    • rufus@discuss.tchncs.de
      link
      fedilink
      arrow-up
      2
      arrow-down
      1
      ·
      1 year ago

      🏆

      virt-manager and libvirt. That works quite well and is easy to use. Virtualbox not so much.

  • SteveTech@programming.dev
    link
    fedilink
    English
    arrow-up
    9
    ·
    1 year ago

    Is there something else I can try

    I use virt-manager, since it uses KVM which should already be present in the kernel.

    • vortexal@lemmy.mlOP
      link
      fedilink
      arrow-up
      5
      ·
      1 year ago

      How similar to VirtualBox is virt-manager? I’ve only ever used VirtualBox but if virt-manager is easy to use, I have no problem trying it out.

      • Kid_Thunder@kbin.social
        link
        fedilink
        arrow-up
        7
        ·
        1 year ago

        Gnome’s Boxes is pretty easy to use and of course uses qemu + KVM. This would be a type 1 hypervisor vs. Virtualbox’s type 2. It is point and click like Virtualbox. You don’t need to use Gnome’s DE to use Boxes.

        I have seen people post about your specific error for years when using the virtualbox website’s repository instead of their own distro’s repository (if it exists).

        • vortexal@lemmy.mlOP
          link
          fedilink
          arrow-up
          2
          ·
          1 year ago

          I just tried Gnome Boxes and it seems to work mostly fine but the only problem I’m having is that I’m trying to run a Windows XP virtual machine but I can’t figure out how to get files from my host to the guest. Apparently, I need some software to be running on the guest but the website that I need to download the software from doesn’t work in internet explorer and I obviously can’t just download it on the host and transfer it to the guest.

          • Kid_Thunder@kbin.social
            link
            fedilink
            arrow-up
            2
            ·
            edit-2
            1 year ago

            In Boxes, power down your XP VM, click Settings -> Sharing Panel -> Enable Sharing toggle. Click File Sharing and enable File Sharing. Power on the VM.

            At that point you should be able to drag and drop from your host direct into your VM for a file transfer.

            You can also click the vertical dots menu in the Guest’s console “screen” and click Send File… menu option.

            In the same menu you can click Devices & Shares -> Realtek USB or whatever -> Local Folder -> Select from the dropdown for the Host’s folder that you’d like to share -> Save -> Make sure Toggle on the right is on.

            Then your folder, I believe in XP, will show up as a removable drive like a USB drive would.

            • vortexal@lemmy.mlOP
              link
              fedilink
              arrow-up
              1
              ·
              1 year ago

              Ok so I’ve already determined a solution for Boxes but I should mention that none what you said works for me. I’m not sure if I have a different version of Boxes than you (even though the only version that seems to exist is the one on flathub) but there is no sharing panel in settings. The only three options in settings is keyboard shortcuts, help and about boxes. When I’m running a VM, the option for “send file” is grayed out and can’t be selected.

              For “devices & shares” that is, at least for me, located in the preferences for each VM. I can’t use USB devices because it’s not supported in the flatpak version and if I try to use the shared folders option, the folder I specified doesn’t show up in the VM. From what I can tell this might be an issue specific to some guests, like Windows XP, because Boxes links to a specific program that the guest needs to be running but when I try to run it in Windows XP, I get an error message stating that Windows XP isn’t a supported guest.

              The only solution that seems to work for me, is taking the files I want to use in the VM and compress them into an iso file (if they’re not already) and mount it to the VM. It might be tedious but it’s the only thing that seems to be working for me.

      • SteveTech@programming.dev
        link
        fedilink
        English
        arrow-up
        3
        ·
        1 year ago

        I probably wouldn’t describe it as similar, but virt-manager is fairly simple but powerful at the same time (like it will let you expose more advanced KVM/QEMU features like PCIe passthrough and similar).

        But like the other guy said, gnome boxes is very straight forward and probably more similar in it’s simplicity.

        They both use QEMU + KVM, so you can have both virt-manager and boxes installed at once, and I believe virt-manager (probably boxes too) easily let you use existing VirtualBox .vdi files, if you’ve got an existing VM you want to run. Also like I said before, KVM is already mainlined into the Linux kernel, so you don’t have to install sketchy kernel modules and stuff.

        I’ve only used VirtualBox once though, so I can’t really compare them.

        • vortexal@lemmy.mlOP
          link
          fedilink
          arrow-up
          1
          ·
          1 year ago

          I tried both virt-manager and Gnome Boxes but I’m having issues with both of them.

          Gnome Boxes works mostly fine but I can’t seem to get files from the host to the guest. It says that the guest is supposed to have some special software but I’m trying to use Windows XP and I can’t seem to figure out how to get the required software because the website doesn’t work in internet explorer and I obviously can’t just download it from the host and transfer it over.

          For virt-manager, it’s giving me an error message about not being able to connect to “libvirt qemu:///system” and it wont let me install a virtual machine. I’m assuming that I’m supposed to download “libvirtd”, but I can’t figure out how to install it. I think it wants me to build it from the source but there doesn’t seem to be a guide on how to do that.

          • SteveTech@programming.dev
            link
            fedilink
            English
            arrow-up
            2
            ·
            1 year ago

            It says that the guest is supposed to have some special software

            That sounds like virtio-win. I usually use the iso and mount it from virt-manager, but if the internet is working then I guess you can download the exe.

            I’m assuming that I’m supposed to download “libvirtd”

            Just searched it up, something like this should work: sudo apt install qemu-kvm libvirt-clients libvirt-daemon-system bridge-utils virtinst libvirt-daemon

            Sorry I don’t have too much experience with gnome boxes either, I mostly use virt-manager.

    • vortexal@lemmy.mlOP
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      So I tried virt-manager but it’s giving me an error message about not being able to connect to “libvirt qemu:///system” and it wont let me install a virtual machine. I’m assuming that I’m supposed to download “libvirtd”, but I can’t figure out how to install it. I think it wants me to build it from the source but there doesn’t seem to be a guide on how to do that.

  • penquin@lemm.ee
    link
    fedilink
    arrow-up
    6
    ·
    edit-2
    1 year ago

    Try

    sudo apt-get install linux-headers-$(uname -r)

    Then reboot your machine. Virtualbox needs the kernel headers to work.

    • vortexal@lemmy.mlOP
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      I tried that but It’s giving me the error message E: Unable to locate package kernel-headers.

      • penquin@lemm.ee
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        My bad, I haven’t run Debian based distros for a while. Run this instead

        sudo apt-get install linux-headers-$(uname -r)

        I’ve edited my comment

        • vortexal@lemmy.mlOP
          link
          fedilink
          arrow-up
          1
          ·
          1 year ago

          It’s telling me that they are already installed: j@j-HP-Notebook:~$ sudo apt-get install linux-headers-$(uname -r) [sudo] password for j: Reading package lists... Done Building dependency tree... Done Reading state information... Done linux-headers-5.15.0-88-generic is already the newest version (5.15.0-88.98). linux-headers-5.15.0-88-generic set to manually installed. The following packages were automatically installed and are no longer required: brave-keyring libu2f-udev linux-headers-5.15.0-76 linux-headers-5.15.0-76-generic linux-headers-5.15.0-78 linux-headers-5.15.0-78-generic linux-headers-5.15.0-79 linux-headers-5.15.0-79-generic linux-headers-5.15.0-82 linux-headers-5.15.0-82-generic linux-headers-5.15.0-83 linux-headers-5.15.0-83-generic linux-headers-5.15.0-84 linux-headers-5.15.0-84-generic linux-headers-5.15.0-86 linux-headers-5.15.0-86-generic linux-image-5.15.0-76-generic linux-image-5.15.0-78-generic linux-image-5.15.0-79-generic linux-image-5.15.0-82-generic linux-image-5.15.0-83-generic linux-image-5.15.0-84-generic linux-image-5.15.0-86-generic linux-modules-5.15.0-76-generic linux-modules-5.15.0-78-generic linux-modules-5.15.0-79-generic linux-modules-5.15.0-82-generic linux-modules-5.15.0-83-generic linux-modules-5.15.0-84-generic linux-modules-5.15.0-86-generic linux-modules-extra-5.15.0-76-generic linux-modules-extra-5.15.0-78-generic linux-modules-extra-5.15.0-79-generic linux-modules-extra-5.15.0-82-generic linux-modules-extra-5.15.0-83-generic linux-modules-extra-5.15.0-84-generic linux-modules-extra-5.15.0-86-generic Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

          • penquin@lemm.ee
            link
            fedilink
            arrow-up
            2
            ·
            1 year ago

            Then restart you machine. That normally needs to be done after installing virtualbox. See if it works.

            • vortexal@lemmy.mlOP
              link
              fedilink
              arrow-up
              2
              ·
              1 year ago

              I already restarted my computer twice after installing it, is there any reason I would have restart my computer a third time?

                • vortexal@lemmy.mlOP
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  1 year ago

                  Is there something specific from that link that I’m supposed to use because I tired the top solution and it just gave me a bunch of error messages:

                  j@j-HP-Notebook:~$ sudo apt-get install build-essential linux-headers-`uname -r` dkms virtualbox-dkms
                  [sudo] password for j:  
                  Reading package lists... Done
                  Building dependency tree... Done
                  Reading state information... Done
                  dkms is already the newest version (2.8.7-2ubuntu2.1mint1).
                  build-essential is already the newest version (12.9ubuntu3).
                  linux-headers-5.15.0-88-generic is already the newest version (5.15.0-88.98).
                  The following packages were automatically installed and are no longer required:
                    libqt5help5 libqt5sql5 libqt5sql5-sqlite libqt5xml5 libsdl-ttf2.0-0
                  Use 'sudo apt autoremove' to remove them.
                  The following additional packages will be installed:
                    libgsoap-2.8.117 liblzf1 libvncserver1 virtualbox virtualbox-qt
                  Suggested packages:
                    vde2 virtualbox-guest-additions-iso
                  The following packages will be REMOVED:
                    virtualbox-7.0
                  The following NEW packages will be installed:
                    libgsoap-2.8.117 liblzf1 libvncserver1 virtualbox virtualbox-dkms virtualbox-qt
                  0 upgraded, 6 newly installed, 1 to remove and 0 not upgraded.
                  Need to get 0 B/46.5 MB of archives.
                  After this operation, 43.0 MB disk space will be freed.
                  Do you want to continue? [Y/n] y
                  debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
                  (Reading database ... 642834 files and directories currently installed.)
                  Removing virtualbox-7.0 (7.0.12-159484~Ubuntu~jammy) ...
                  debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
                  dpkg: error processing package virtualbox-7.0 (--remove):
                   installed virtualbox-7.0 package pre-removal script subprocess returned error exit status 1
                  dpkg: too many errors, stopping
                  vboxdrv.sh: failed: modprobe vboxdrv failed. Please use 'dmesg' to find out why.
                  
                  There were problems setting up VirtualBox.  To re-start the set-up process, run
                    /sbin/vboxconfig
                  as root.  If your system is using EFI Secure Boot you may 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.
                  Errors were encountered while processing:
                   virtualbox-7.0
                  Processing was halted because there were too many errors.
                  E: Sub-process /usr/bin/dpkg returned an error code (1)
                  j@j-HP-Notebook:~$ sudo modprobe vboxdrv
                  modprobe: ERROR: could not insert 'vboxdrv': Operation not permitted
                  
    • vortexal@lemmy.mlOP
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      No, it’s giving me the following error message:

      j@j-HP-Notebook:~$ sudo modprobe vboxdrv
      [sudo] password for j:  
      modprobe: ERROR: could not insert 'vboxdrv': Operation not permitted
      
    • vortexal@lemmy.mlOP
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      That doesn’t work for me as they give me error messages:

      j@j-HP-Notebook:~$ sudo apt remove virtualbox-dkms
      [sudo] password for j:  
      Reading package lists... Done
      Building dependency tree... Done
      Reading state information... Done
      Package 'virtualbox-dkms' is not installed, so not removed
      0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
      j@j-HP-Notebook:~$ sudo apt-get install make gcc build-essential linux-headers-'uname -r' dkms
      Reading package lists... Done
      Building dependency tree... Done
      Reading state information... Done
      E: Unable to locate package linux-headers-uname -r
      j@j-HP-Notebook:~$ sudo apt install virtualbox-dkms
      Reading package lists... Done
      Building dependency tree... Done
      Reading state information... Done
      The following packages were automatically installed and are no longer required:
        libqt5help5 libqt5sql5 libqt5sql5-sqlite libqt5xml5 libsdl-ttf2.0-0
      Use 'sudo apt autoremove' to remove them.
      The following additional packages will be installed:
        libgsoap-2.8.117 liblzf1 libvncserver1 virtualbox virtualbox-qt
      Suggested packages:
        vde2 virtualbox-guest-additions-iso
      The following packages will be REMOVED:
        virtualbox-7.0
      The following NEW packages will be installed:
        libgsoap-2.8.117 liblzf1 libvncserver1 virtualbox virtualbox-dkms virtualbox-qt
      0 upgraded, 6 newly installed, 1 to remove and 0 not upgraded.
      Need to get 0 B/46.5 MB of archives.
      After this operation, 43.0 MB disk space will be freed.
      Do you want to continue? [Y/n] y
      debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
      (Reading database ... 642834 files and directories currently installed.)
      Removing virtualbox-7.0 (7.0.12-159484~Ubuntu~jammy) ...
      debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
      dpkg: error processing package virtualbox-7.0 (--remove):
       installed virtualbox-7.0 package pre-removal script subprocess returned error exit status 1
      dpkg: too many errors, stopping
      vboxdrv.sh: failed: modprobe vboxdrv failed. Please use 'dmesg' to find out why.
      
      There were problems setting up VirtualBox.  To re-start the set-up process, run
        /sbin/vboxconfig
      as root.  If your system is using EFI Secure Boot you may 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.
      Errors were encountered while processing:
       virtualbox-7.0
      Processing was halted because there were too many errors.
      E: Sub-process /usr/bin/dpkg returned an error code (1)
      
      • kuneho@lemmy.world
        link
        fedilink
        arrow-up
        4
        ·
        edit-2
        1 year ago

        I guess the “uname -r” part should be $(uname -r) but this isn’t the problem with vbox IMO

        • vortexal@lemmy.mlOP
          link
          fedilink
          arrow-up
          2
          ·
          1 year ago

          I’m not sure what you mean but it doesn’t matter because VirtualBox still isn’t working and I’ve decided to uninstall it and try some alternatives that people have mentioned.

  • danielfgom@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 year ago

    That’s really odd. I’m running Linux Mint Debian Edition 6 and I installed virtual box from the oracle website just fine.

    As others have said, try Gnome Boxes and see if they works. If it also has issues then it’s something with your system.

    • vortexal@lemmy.mlOP
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      I actually just tried Gnome Boxes and it seems to work mostly fine but the only problem I’m having is that I’m trying to run a Windows XP virtual machine but I can’t figure out how to get files from my host to the guest. Apparently, I need some software to be running on the guest but the website that I need to download the software from doesn’t work in internet explorer and I obviously can’t just download it on the host and transfer it to the guest.

      • danielfgom@lemmy.world
        link
        fedilink
        English
        arrow-up
        3
        ·
        1 year ago

        Have you tried to download it on the host to a USB (formatted with fat32) and then in Boxes select that usb in Windows to copy and run the software?

        • vortexal@lemmy.mlOP
          link
          fedilink
          arrow-up
          2
          ·
          1 year ago

          While I have already found a solution (and with it found out that the software doesn’t even work in windows xp) the only way to download Boxes that I could find was through flathub, which doesn’t allow usb devices for some reason. What does work is that I can just put all of the files I want transferred into an iso file and mount it to the VM.

          Also, if there is a way to install Boxes outside of flathub, I’ll have to check it out tomorrow because of late it is for me right now.

  • Presi300@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    Use virt-manager or gnome boxes, they are both better and tend to run faster in my experience

  • 1henno1@feddit.ch
    link
    fedilink
    arrow-up
    1
    arrow-down
    2
    ·
    edit-2
    1 year ago

    I had the same problem (running Fedora 38), and this post really helped me - it goes through the whole MOK generation/enrollment and then provides a script to automatically sign the modules. I had to make a couple of adjustments to make it work on my system and to automatically load the modules with modprobe , but now I just run /sbin/vboxconfig; /root/bin/sign-vbox-modules each time my kernel gets updated and can use VBox fine again.

  • db2@sopuli.xyz
    link
    fedilink
    arrow-up
    2
    arrow-down
    4
    ·
    1 year ago

    It works fine. Install the kernel driver like it’s telling you to.