服务器:Ubuntu 20.04 LTS
Virtualbox 版本:6.1.26r145957
VBoxManage list extpacks
Extension Packs: 1
Pack no. 0: Oracle VM VirtualBox Extension Pack
Version: 6.1.26
Revision: 145957
Edition:
Description: Oracle Cloud Infrastructure integration, USB 2.0 and USB 3.0 Host Controller, Host Webcam, VirtualBox RDP, PXE ROM, Disk Encryption, NVMe.
VRDE Module: VBoxVRDP
Usable: true
Why unusable:
检查 vboxweb.service 的状态时:
systemctl status vboxweb.service
● vboxweb.service Loaded: masked (Reason: Unit vboxweb.service is
masked.) Active: inactive (dead)
如果我尝试手动启动该服务:
sudo systemctl start vboxweb
Failed to start vboxweb.service: Unit vboxweb.service is masked.
phpvirtualbox 配置.php:
/* Username / Password for system user that runs VirtualBox */
var $username = '***';
var $password = '***';
/* SOAP URL of vboxwebsrv (not phpVirtualBox's URL) */
var $location = 'http://127.0.0.1:18083/';
/* Default language. See languages folder for more language options.
* Can also be changed in File -> Preferences -> Language in
* phpVirtualBox.
*/
var $language = 'en';
/* Set the standard VRDE Port Number / Range, e.g. 1010-1020 or 1027 */
var $vrdeports = '9000-9100';
config.php 中的用户是 vboxusers 组的一部分。
phpvirtualbox web文件夹中的文件属于该用户。
使用admin/admin登录后浏览器中出现phpvirtualbox错误(我也试过在phpvirtualbox config.php中配置的用户名和密码):
Exception Object
(
[message:protected] => Could not connect to host (http://127.0.0.1:18083/)
[string:Exception:private] =>
[code:protected] => 64
[file:protected] => /mnt/raiddisk/public_html/phpvirtualbox/endpoints/api.php
[line:protected] => 134
[trace:Exception:private] => Array
(
)
[previous:Exception:private] =>
)
如果我尝试在 systemctl 中查找错误:
systemctl --failed
vboxweb-service.service loaded failed failed vboxweb-service.service
我不知道还能尝试什么。我已经使用来自 virtualbox 网站的源代码直接安装了 virtualbox。我还尝试卸载并重新安装所有内容。
据我所知,vboxweb-service.service 无法启动。但没有有用的错误消息来了解原因。
答案1
事实证明,问题出在这里:https://www.virtualbox.org/ticket/20479
我手动将丢失的文件从 virtualbox deb 文件中复制出来,然后尝试启动 vboxwebsrv 服务,但没有成功。我必须取消屏蔽并启用 vboxwebsrv 服务,然后我才能启动它:
systemctl unmask vboxweb-service
systemctl enable vboxweb-service
systemctl restart vboxweb-service