AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • Início
  • system&network
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • Início
  • system&network
    • Recentes
    • Highest score
    • tags
  • Ubuntu
    • Recentes
    • Highest score
    • tags
  • Unix
    • Recentes
    • tags
  • DBA
    • Recentes
    • tags
  • Computer
    • Recentes
    • tags
  • Coding
    • Recentes
    • tags
Início / computer / Perguntas / 1834320
Accepted
Joshua E. Vines
Joshua E. Vines
Asked: 2024-03-09 06:57:41 +0800 CST2024-03-09 06:57:41 +0800 CST 2024-03-09 06:57:41 +0800 CST

Instalando o VirtualBox no Debian 12 Bookworm com erros

  • 772

Eu tenho um Clevo PD70SND-G, recém-chegado da China. Instalado o Debian 12 Bookworm. Estou tentando instalar e usar o VirtualBox. Tenho dados em uma máquina VirtualBox que preciso acessar.

Tentei instalar a partir do repositório oficial do Debian, depois de adicionar ao /etc/apt/sources.list, e obtive erros de dependência (veja abaixo). Então, fui ao VirtualBox.org e baixei o arquivo do pacote para o Debian 12 e instalei-o. O VirtualBox Manager parece funcionar bem, mas quando tento iniciar uma máquina, recebo erros sobre um driver de kernel não instalado (veja abaixo). E erros com módulos do kernel "não assinados". Os arquivos de assinatura MOK foram criados enquanto a GPU NVIDIA funcionava com o Secure Boot ativado.

A máquina é Ubuntu 22.04, criada em um host Windows 10.

Por favor ajude.

Sobre o sistema:

Info Center -> About this System:

Operating System: Debian GNU/Linux 12
KDE Plasma Version: 5.27.5 KDE
Frameworks Version: 5.103.0
Qt Version: 5.15.8
Kernel Version: 6.1.0-17-amd64 (64-bit)
Graphics Platform: X11
Processors: 32 × Intel® Core™ i9-14900HX
Memory: 62.5 GiB of RAM
Graphics Processor: Mesa Intel® Graphics
Manufacturer: Notebook
Product Name: > PD5x_7xSNC_SND_SNE
System Version: Not Applicable
$ neofetch
       _,met$$$$$gg.          user@Computer-Name 
    ,g$$$$$$$$$$$$$$$P.       ------------------------- 
  ,g$$P"     """Y$$.".        OS: Debian GNU/Linux 12 (bookworm) x86_64 
 ,$$P'              `$$$.     Host: PD5x_7xSNC_SND_SNE 
',$$P       ,ggs.     `$$b:   Kernel: 6.1.0-18-amd64 
`d$$'     ,$P"'   .    $$$    Uptime: 7 mins 
 $$P      d$'     ,    $$P    Packages: 2984 (dpkg) 
 $$:      $$.   -    ,d$$'    Shell: bash 5.2.15 
 $$;      Y$b._   _,d$P'      Resolution: 1920x1080 
 Y$$.    `.`"Y$$$$P"'         DE: Plasma 5.27.5 
 `$$b      "-.__              WM: KWin 
  `Y$$                        Theme: [Plasma], Breeze [GTK2/3] 
   `Y$$.                      Icons: [Plasma], breeze [GTK2/3] 
     `$$b.                    Terminal: konsole 
       `Y$$b.                 CPU: Intel i9-14900HX (32) @ 2.200GHz 
          `"Y$b._             GPU: NVIDIA GeForce RTX 4060 Max-Q / Mobile 
              `"""            GPU: Intel Raptor Lake-S UHD Graphics 
                              Memory: 2373MiB / 64000MiB 

Tentando instalar o VirtualBox dos repositórios oficiais do Debian 12:

$ sudo apt install fasttrack-archive-keyring
Append to /etc/apt/sources.list:
    deb https://fasttrack.debian.net/debian-fasttrack/ bullseye-fasttrack main contrib 
    deb https://fasttrack.debian.net/debian-fasttrack/ bullseye-backports-staging main contrib

$ sudo apt update
$ aptitude search virtualbox
p   boinc-virtualbox                                     - metapackage for virtualbox-savvy projects                     
p   virtualbox                                           - x86 virtualization solution - base binaries                   
p   virtualbox-dbgsym                                    - debug symbols for virtualbox                                  
p   virtualbox-dkms                                      - x86 virtualization solution - kernel module sources for dkms  
p   virtualbox-ext-pack                                  - extra capabilities for VirtualBox, downloader.                
p   virtualbox-guest-additions-iso                       - guest additions iso image for VirtualBox                      
v   virtualbox-guest-modules                             -                                                               
p   virtualbox-guest-utils                               - x86 virtualization solution - non-X11 guest utilities         
p   virtualbox-guest-utils-dbgsym                        - debug symbols for virtualbox-guest-utils                      
p   virtualbox-guest-x11                                 - x86 virtualization solution - X11 guest utilities             
p   virtualbox-guest-x11-dbgsym                          - debug symbols for virtualbox-guest-x11                        
v   virtualbox-modules                                   -                                                               
p   virtualbox-qt                                        - x86 virtualization solution - Qt based user interface         
p   virtualbox-qt-dbgsym                                 - debug symbols for virtualbox-qt                               
p   virtualbox-source                                    - x86 virtualization solution - kernel module source
$ sudo apt install virtualbox
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 virtualbox : Depends: python3 (< 3.10) but 3.11.2-1+b1 is to be installed
              Depends: python3.9 but it is not installable
              Depends: libgsoap-2.8.104 but it is not installable
              Depends: libssl1.1 (>= 1.1.1) but it is not installable
              Depends: libvpx6 (>= 1.6.0) but it is not installable
              Recommends: virtualbox-qt (= 7.0.12-dfsg-1~fto11+1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Tentando instalar o VirtualBox a partir de um arquivo de repositório baixado:

$ sudo apt install .../virtualbox-7.0_7.0.14-161095~Debian~bookworm_amd64.deb 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'virtualbox-7.0' instead of '.../virtualbox-7.0_7.0.14-161095~Debian~bookworm_amd64.deb'
Recommended packages:
  linux-image
The following NEW packages will be installed:
  virtualbox-7.0
0 upgraded, 1 newly installed, 0 to remove and 3 not upgraded.
Need to get 0 B/92.4 MB of archives.
After this operation, 218 MB of additional disk space will be used.
Get:1 .../virtualbox-7.0_7.0.14-161095~Debian~bookworm_amd64.deb virtualbox-7.0 amd64 7.0.14-161095~Debian~bookworm [92.4 MB]
Preconfiguring packages ...
Selecting previously unselected package virtualbox-7.0.
(Reading database ... 343483 files and directories currently installed.)
Preparing to unpack .../virtualbox-7.0_7.0.14-161095~Debian~bookworm_amd64.deb ...
Unpacking virtualbox-7.0 (7.0.14-161095~Debian~bookworm) ...
Setting up virtualbox-7.0 (7.0.14-161095~Debian~bookworm) ...
addgroup: The group `vboxusers' already exists as a system group. Exiting.
vboxdrv.sh: failed: Unable to sign vboxdrv.ko.

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.
Processing triggers for desktop-file-utils (0.26-1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1.1) ...
Processing triggers for shared-mime-info (2.2-1) ...
Processing triggers for mailcap (3.70+nmu1) ...
N: Download is performed unsandboxed as root as file '.../virtualbox-7.0_7.0.14-161095~Debian~bookworm_amd64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)

Mensagem de erro registrada na Central de Notificações:

VM Name: Ubuntu 22.04

The virtual machine 'Ubuntu 22.04' has terminated unexpectedly during startup with exit code 1 (0x1).
Result Code:
NS_ERROR_FAILURE (0X80004005)
Component:
MachineWrap
Interface:
IMachine {300763af-5d6b-46e6-aa96-273eac15538a}

Mensagem de erro na janela pop-up:

VirtualBox - Error in suplibOsInit

Kernel driver not installed (rc=-1908)

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 you system has EFI Secure Boot enabled you may also need to sign the kernel modules (vboxnetflt, vboxnetadp, vboxpci) before you can load them. Please see your Linux system's documentation for more information.

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

Resultados da execução do comando fornecido:

$ sudo /sbin/vboxconfig 
vboxdrv.sh: Stopping VirtualBox services. 
vboxdrv.sh: Starting VirtualBox services. 
vboxdrv.sh: Building VirtualBox kernel modules. 
vboxdrv.sh: Signing VirtualBox kernel modules. 
vboxdrv.sh: failed: Unable to sign vboxdrv.ko. 
 
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. 

Script: sign-virtualbox

#!/bin/bash
for modfile in $(dirname $(modinfo -n vboxdrv))/*.ko; do
        echo "Signing $modfile"
        /usr/lib/linux-kbuild-6.1/scripts/sign-file sha256 /var/lib/shim-signed/mok/MOK.priv /var/lib/shim-signed/mok/MOK.der "$modfile"
#       /usr/src/kernels/$(uname -r)/scripts/sign-file sha256 /var/lib/shim-signed/mok/MOK.priv /var/lib/shim-signed/mok/MOK.der "$modfile"
done

Como você pode ver, não há vboxpcimódulo:

$ sudo KBUILD_SIGN_PIN=[passcode] sign-virtualbox 
Signing /lib/modules/6.1.0-18-amd64/misc/vboxdrv.ko 
Signing /lib/modules/6.1.0-18-amd64/misc/vboxnetadp.ko 
Signing /lib/modules/6.1.0-18-amd64/misc/vboxnetflt.ko

Informação adicional:

$ sudo modinfo vboxdrv 
filename:       /lib/modules/6.1.0-18-amd64/misc/vboxdrv.ko 
version:        7.0.14 r161095 (0x00330004) 
license:        GPL 
description:    Oracle VM VirtualBox Support Driver 
author:         Oracle and/or its affiliates 
srcversion:     152A8CB5D422DE621E72BD6 
depends:         
retpoline:      Y 
name:           vboxdrv 
vermagic:       6.1.0-18-amd64 SMP preempt mod_unload modversions  
parm:           force_async_tsc:force the asynchronous TSC mode (int)

$ sudo modinfo vboxnetadp 
filename:       /lib/modules/6.1.0-18-amd64/misc/vboxnetadp.ko 
version:        7.0.14 r161095 ((0xA2CDe001U)) 
license:        GPL 
description:    Oracle VM VirtualBox Network Adapter Driver 
author:         Oracle and/or its affiliates 
srcversion:     DE548A71E9FEE840BC241DC 
depends:        vboxdrv 
retpoline:      Y 
name:           vboxnetadp 
vermagic:       6.1.0-18-amd64 SMP preempt mod_unload modversions  
 
$ sudo modinfo vboxnetflt 
filename:       /lib/modules/6.1.0-18-amd64/misc/vboxnetflt.ko 
version:        7.0.14 r161095 ((0xA2CDe001U)) 
license:        GPL 
description:    Oracle VM VirtualBox Network Filter Driver 
author:         Oracle and/or its affiliates 
srcversion:     5B4916269D291622038DB48 
depends:        vboxdrv 
retpoline:      Y 
name:           vboxnetflt 
vermagic:       6.1.0-18-amd64 SMP preempt mod_unload modversions 
virtualbox
  • 1 1 respostas
  • 102 Views

1 respostas

  • Voted
  1. Best Answer
    Joshua E. Vines
    2024-03-12T11:55:22+08:002024-03-12T11:55:22+08:00

    Em minha pesquisa, encontrei um script /sbin/rcvboxdrvpara iniciar os módulos do kernel que foi criado durante a instalação. Na verdade, este é um link simbólico para /usr/lib/virtualbox/vboxdrv.sh. https://www.virtualbox.org/manual/ch02.html#install-linux-prereq

    Eu digitei o comando:

    $ sudo rcvboxdrv setup
    

    Entre os resultados estava uma mensagem de erro indicando falha na assinatura do vboxdrvmódulo:

    ...
    vboxdrv.sh: failed: Unable to sign vboxdrv.ko.
    

    (Muito útil, Oráculo!)

    Em seguida, analisei o script (vboxdrv.sh) e encontrei a linha (805) onde a mensagem de erro foi lançada, estava mascarando a saída de erro real do comando canalizando-o para nulo. Removi isso e as mensagens resultantes (desculpe, não tenho uma cópia da saída real, fiquei muito feliz por ter encontrado a solução.) me informaram que estava faltando a senha!

    A correção: remova 2>/dev/nulla linha 805 de vboxdrv.she execute novamente o script:

    802   # Sign modules.
    803   for i in $MODULE_LIST; do
    804       "$SIGN_TOOL" "$sig_hashalgo" "$DEB_PRIV_KEY" "$DEB_PUB_KEY" \
    805           /lib/modules/"$KERN_VER"/misc/"$i".ko 2>/dev/null || failure "Unable to sign $i.ko"
    806   done
    
    $ sudo KBUILD_SIGN_PIN=[passcode] rcvboxdrv setup
    

    Obrigado pelo seu tempo.

    • 0

relate perguntas

  • Uma máquina virtual herda os recursos de segurança de seu host?

  • Adições do VirtualBox Guest para Linux Guest com kernel 5.0.5

  • caixa virtual convidado linux morto após atualização automática do host MacOS enquanto o convidado estava em execução

  • Como o Genymotion ignora a falta de emulação Wi-Fi do VirtualBox?

  • O virtualbox requer uma CPU para suportar VT-d para hospedar sistemas operacionais convidados de 64 bits?

Sidebar

Stats

  • Perguntas 205573
  • respostas 270741
  • best respostas 135370
  • utilizador 68524
  • Highest score
  • respostas
  • Marko Smith

    Como posso reduzir o consumo do processo `vmmem`?

    • 11 respostas
  • Marko Smith

    Baixar vídeo do Microsoft Stream

    • 4 respostas
  • Marko Smith

    O Google Chrome DevTools falhou ao analisar o SourceMap: chrome-extension

    • 6 respostas
  • Marko Smith

    O visualizador de fotos do Windows não pode ser executado porque não há memória suficiente?

    • 5 respostas
  • Marko Smith

    Como faço para ativar o WindowsXP agora que o suporte acabou?

    • 6 respostas
  • Marko Smith

    Área de trabalho remota congelando intermitentemente

    • 7 respostas
  • Marko Smith

    O que significa ter uma máscara de sub-rede /32?

    • 6 respostas
  • Marko Smith

    Ponteiro do mouse movendo-se nas teclas de seta pressionadas no Windows?

    • 1 respostas
  • Marko Smith

    O VirtualBox falha ao iniciar com VERR_NEM_VM_CREATE_FAILED

    • 8 respostas
  • Marko Smith

    Os aplicativos não aparecem nas configurações de privacidade da câmera e do microfone no MacBook

    • 5 respostas
  • Martin Hope
    Vickel O Firefox não permite mais colar no WhatsApp web? 2023-08-18 05:04:35 +0800 CST
  • Martin Hope
    Saaru Lindestøkke Por que os arquivos tar.xz são 15x menores ao usar a biblioteca tar do Python em comparação com o tar do macOS? 2021-03-14 09:37:48 +0800 CST
  • Martin Hope
    CiaranWelsh Como posso reduzir o consumo do processo `vmmem`? 2020-06-10 02:06:58 +0800 CST
  • Martin Hope
    Jim Pesquisa do Windows 10 não está carregando, mostrando janela em branco 2020-02-06 03:28:26 +0800 CST
  • Martin Hope
    andre_ss6 Área de trabalho remota congelando intermitentemente 2019-09-11 12:56:40 +0800 CST
  • Martin Hope
    Riley Carney Por que colocar um ponto após o URL remove as informações de login? 2019-08-06 10:59:24 +0800 CST
  • Martin Hope
    zdimension Ponteiro do mouse movendo-se nas teclas de seta pressionadas no Windows? 2019-08-04 06:39:57 +0800 CST
  • Martin Hope
    jonsca Todos os meus complementos do Firefox foram desativados repentinamente, como posso reativá-los? 2019-05-04 17:58:52 +0800 CST
  • Martin Hope
    MCK É possível criar um código QR usando texto? 2019-04-02 06:32:14 +0800 CST
  • Martin Hope
    SoniEx2 Altere o nome da ramificação padrão do git init 2019-04-01 06:16:56 +0800 CST

Hot tag

windows-10 linux windows microsoft-excel networking ubuntu worksheet-function bash command-line hard-drive

Explore

  • Início
  • Perguntas
    • Recentes
    • Highest score
  • tag
  • help

Footer

AskOverflow.Dev

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve