虚拟机启动后崩溃

虚拟机启动后崩溃

在 Ubuntu 16.10 上重新安装 Virtualbox 并尝试启动虚拟机后,出现以下情况

    Failed to open a session for the virtual machine trial.

The virtual machine 'trial' has terminated unexpectedly during startup with
     exit code 1 (0x1).

Result Code: NS_ERROR_FAILURE (0x80004005)
Component: MachineWrap
Interface: IMachine {b2547866-a0a1-4391-8b86-6952d82efaa0}

$ dkms 状态

给出

 bbswitch, 0.8, 4.8.0-58-generic, x86_64: installed
bbswitch, 0.8, 4.8.0-59-generic, x86_64: installed
nvidia-304, 304.135, 4.8.0-58-generic, x86_64: installed
nvidia-304, 304.135, 4.8.0-59-generic, x86_64: installed
virtualbox, 5.1.6, 4.8.0-59-generic, x86_64: installed (WARNING! Diff 
between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) 
(WARNING! Diff between built and installed module!)

可以連線嗎?

Virtualbox 建议我尝试

 $ modprobe vboxdrv

但它没有效果。

怎样才能让它发挥作用呢?

$ dpkg -l virtualbox*

给出

    Desired=Unknown/Install/Remove/Purge/Hold| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|
    / Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
    ||/ Name                      Version           Architecture    Description
    +++-=========================-=================-=================-========================================================
ii  virtualbox                5.1.6-dfsg-2      amd64             x86 virtualization solution - base binaries
un  virtualbox-2.0            <none>            <none>            (no description available)
un  virtualbox-2.1            <none>            <none>            (no description available)
un  virtualbox-2.2            <none>            <none>            (no description available)
un  virtualbox-3.0            <none>            <none>            (no description available)
un  virtualbox-3.1            <none>            <none>            (no description available)
un  virtualbox-3.2            <none>            <none>            (no description available)
un  virtualbox-4.0            <none>            <none>            (no description available)
un  virtualbox-4.1            <none>            <none>            (no description available)
un  virtualbox-4.2            <none>            <none>            (no description available)
un  virtualbox-4.3            <none>            <none>            (no description available)
un  virtualbox-5.0            <none>            <none>            (no description available)
rc  virtualbox-5.1:i386       5.1.26-117224~Ubu i386              Oracle VM VirtualBox
ii  virtualbox-dkms           5.1.6-dfsg-2      all               x86 virtualization solution - kernel module sources for 
un  virtualbox-guest-addition <none>            <none>            (no description available)
un  virtualbox-guest-modules  <none>            <none>            (no description available)
un  virtualbox-guest-x11      <none>            <none>            (no description available)
un  virtualbox-modules        <none>            <none>            (no description available)
un  virtualbox-ose            <none>            <none>            (no description available)
ii  virtualbox-qt             5.1.6-dfsg-2      amd64             x86 virtualization solution - Qt based user interface
un  virtualbox-source         <none>            <none>            (no description available)

它是通过安装的

$ sudo apt-get install virtualbox

$ sudo dpkg -s virtualbox 

给出

Package: virtualbox
Status: install ok installed
Priority: optional
Section: contrib/misc
Installed-Size: 70997
Maintainer: Ubuntu Developers <[email protected]>
Architecture: amd64
Version: 5.1.6-dfsg-2
Depends: adduser, procps, virtualbox-dkms (>= 5.1.6-dfsg-2) | virtualbox-source (>= 5.1.6-dfsg-2) | virtualbox-modules, init-system-helpers (>= 1.18~), python2.7, python:any (<< 2.8), python:any (>= 2.7.5-5~), libc6 (>= 2.15), libcurl3-gnutls (>= 7.16.2), libdevmapper1.02.1 (>= 2:1.02.97), libgcc1 (>= 1:3.0), libgsoap9, libpng16-16 (>= 1.6.2-1), libpython2.7 (>= 2.7), libsdl1.2debian (>= 1.2.11), libssl1.0.0 (>= 1.0.0), libstdc++6 (>= 5.2), libvncserver1 (>= 0.9.10), libvpx3 (>= 1.5.0), libx11-6, libxcursor1 (>> 1.1.2), libxext6, libxml2 (>= 2.7.4), libxmu6, libxt6, zlib1g (>= 1:1.1.4)
Recommends: virtualbox-qt (= 5.1.6-dfsg-2), libgl1-mesa-glx | libgl1, libqt5core5a (>= 5.6.0~beta), libqt5opengl5 (>= 5.0.2) | libqt5opengl5-gles (>= 5.0.2), libqt5widgets5 (>= 5.0.2)
Suggests: vde2, virtualbox-guest-additions-iso
Conflicts: virtualbox-2.0, virtualbox-2.1, virtualbox-2.2, virtualbox-3.0, virtualbox-3.1, virtualbox-3.2, virtualbox-4.0, virtualbox-4.1, virtualbox-4.2, virtualbox-4.3, virtualbox-5.0, virtualbox-5.1
Conffiles:
 /etc/default/virtualbox 903beafa3922607d1ac07950d9ae2d50
 /etc/init.d/virtualbox 3aed81b34e30eca2393ca3c9730da675
Description: x86 virtualization solution - base binaries
 VirtualBox is a free x86 virtualization solution allowing a wide range
 of x86 operating systems such as Windows, DOS, BSD or Linux to run on a
 Linux system.
 .
 This package provides the binaries for VirtualBox. Either the virtualbox-dkms
 or the virtualbox-source package is also required in order to compile the
 kernel modules needed for virtualbox. A graphical user interface for
 VirtualBox is provided by the package virtualbox-qt.
Original-Maintainer: Debian Virtualbox Team <[email protected]>
Homepage: http://www.virtualbox.org/

$ sudo dpkg -s virtualbox-5.1

给出

Package: virtualbox-5.1
Status: deinstall ok config-files
Priority: optional
Section: contrib/misc
Installed-Size: 158172
Maintainer: Oracle Corporation <[email protected]>
Architecture: i386
Version: 5.1.26-117224~Ubuntu~yakkety
Config-Version: 5.1.26-117224~Ubuntu~yakkety
Replaces: virtualbox
Provides: virtualbox
Depends: libc6 (>= 2.15), libcurl3 (>= 7.16.2), libdevmapper1.02.1 (>= 2:1.02.97), libgcc1 (>= 1:4.2), libgl1-mesa-glx | libgl1, libpng16-16 (>= 1.6.2-1), libqt5core5a (>= 5.6.0~beta), libqt5gui5 (>= 5.3.0) | libqt5gui5-gles (>= 5.3.0), libqt5opengl5 (>= 5.0.2) | libqt5opengl5-gles (>= 5.0.2), libqt5printsupport5 (>= 5.0.2), libqt5widgets5 (>= 5.6.0~beta), libqt5x11extras5 (>= 5.6.0), libsdl1.2debian (>= 1.2.11), libssl1.0.0 (>= 1.0.0), libstdc++6 (>= 5.2), libvpx3 (>= 1.5.0), libx11-6, libxcb1, libxcursor1 (>> 1.1.2), libxext6, libxinerama1, libxml2 (>= 2.7.4), libxmu6, libxt6, zlib1g (>= 1:1.1.4), psmisc, adduser
Pre-Depends: debconf (>= 1.1) | debconf-2.0
Recommends: libasound2, libpulse0, libsdl-ttf2.0-0, kmod | kldutils | module-init-tools, linux-headers-generic | linux-headers-generic-pae | linux-headers-686-pae | linux-headers-amd64 | linux-headers-2.6-686 | linux-headers-2.6-amd64 | linux-headers, linux-image, gcc, make | build-essential | dpkg-dev, binutils, pdf-viewer, libgl1
Conflicts: virtualbox, virtualbox-guest-additions-iso, virtualbox-ose
Description: Oracle VM VirtualBox
 VirtualBox is a powerful PC virtualization solution allowing you to run a
 wide range of PC operating systems on your Linux system. This includes
 Windows, Linux, FreeBSD, DOS, OpenBSD and others. VirtualBox comes with a broad
 feature set and excellent performance, making it the premier virtualization
 software solution on the market.
Python-Version: 2.7

答案1

这里存在一个问题(可能还有更多):

dkms 状态显示...

virtualbox, 5.1.6, 4.8.0-59-generic, x86_64: installed (WARNING! Diff between built and installed module!)

有时这个错误可能很难修复。

这个dkms内核驱动有问题...

ii  virtualbox-dkms           5.1.6-dfsg-2      all               x86 virtualization solution - kernel module sources for 

首先尝试一个简单的修复...

sudo apt-get purge virtualbox-dkms # uninstall it
sudo apt-get update # update the software database
sudo apt-get install virtualbox-dkms # reinstall it
dkms status # check the status

看看“警告!构建模块和安装模块之间存在差异!”是否消失了。如果没有,我们将不得不再试一次,但方法很难。

笔记:如果只有客户操作系统“试用版”出现故障,而其他客户操作系统运行正常,则客户操作系统“试用版”的快照文件可能已损坏。

另一种选择...可能更容易...

卸载您现有的 5.1.6 版本,并安装 5.1.26 版本。

sudo apt-get purge virtualbox
sudo apt-get purge virtualbox-dkms
sudo apt-get purge virtualbox-qt
sudo apt-get update
sudo apt-get install virtualbox-5.1

相关内容