首页 > 编程语言 >How to install VirtualBox 6.x with phpVirtualbox web interface on Debian 11 bullseye/openmediavault

How to install VirtualBox 6.x with phpVirtualbox web interface on Debian 11 bullseye/openmediavault

时间:2022-12-29 01:44:06浏览次数:66  
标签:11 web openmediavault -- sudo Virtual install Box VirtualBox

How to install VirtualBox 6.x with phpVirtualbox web interface on Debian 11 bullseye/openmediavault 6

The new Open Media Vault 6 uses Debian 11 as the base system. And for a long time, Virtual Box didn't support it. After it did, everyone whose using OMV6 has gone to the KVM platform for virtualization needs. And for the cause of that, everything related to this topic is either fractions or incomplete. I have tried KVM for a short time, and the overall experience of that is just something off for me. So I am doing this with Virtual Box again and writing this down for later use, or maybe it just helps someone who's in flavoured with me in Virtual Box.

1. Prerequisites:

A working system could be either a Debian 11 bullseye or the open media vault 6, which is essentially Debian 11.

2. Plans:

  1. Install Virtual Box 6 headless version.
  2. Install Docker to containerize the web interface coming from the project phpvirtualbox.
  3. Setting up phpvirtualbox using Docker/Docker Compose.

3. Installations:

3.1 Install Virtual Box

First, before we install the Virtual Box itself, we need to tackle the dependencies for it to run without errors.

Use this command line to install them.

sudo apt install wget build-essential python2

Next, we need to download the installer. There're many ways to install Virtual Box on a Linux system. But for the sake of this tutorial, I'll go with the installer one.

Here's a list of all the releases: https://download.virtualbox.org/virtualbox/

Because the PHP program for the web interface is only supporting up to 6.x, so we'll go with 6.1.40, which is the last version before 7.

Use wget to download the files straight into the file system. And then, add the execute permission for the installer and run it.

# download file
wget https://download.virtualbox.org/virtualbox/6.1.40/VirtualBox-6.1.40-154048-Linux_amd64.run

# grant permission
chmod u+x VirtualBox-6.1.40-154048-Linux_amd64.run

# execute it
sudo ./VirtualBox-6.1.40-154048-Linux_amd64.run

Virtual Box extension pack is a binary package that extends the functionality of Virtual Box. It provides extensions like USB support and hardware pass-through. But for the most important ones, we need it for RDP, which stands for Remote Desktop Protocol. Because it is headless, we can't exactly see anything unless we use another system to connect to it. That's why we have to install it.

# download
wget https://download.virtualbox.org/virtualbox/6.1.40/Oracle_VM_VirtualBox_Extension_Pack-6.1.40.vbox-extpack

# installation
sudo vboxmanage extpack install --replace Oracle_VM_VirtualBox_Extension_Pack-6.1.40.vbox-extpack

Next, we need to create a user and a user group for Virtual Box.

# create user with a home directory
sudo useradd -m username

# change its password
sudo passwd username

Log in as that user and add a user group for yourself.

sudo usermod -aG vboxusers $(id -un)

You can verify it by typing id -nG. It will show all your groups like this:

users www-data vboxusers home

Then we reboot for things to kick in.

reboot

Up to this point, you should be able to verify the installation by this.

virtualbox -h

If nothing goes wrong, then it will output something like this:

Oracle VM VirtualBox VM Selector v6.1.40
(C) 2005-2022 Oracle Corporation
All rights reserved.

No special options.

If you are looking for --startvm and related options, you need to use VirtualBoxVM.

But of course, it goes wrong on my side...

See if you're having the same issues I have:

3.1.1 Common errors:

1. Header problem:

WARNING: The vboxdrv kernel module is not loaded. Either there is no module
         available for the current kernel (6.0.0-0.deb11.2-amd64) or it failed to
         load. Please recompile the kernel module and install it by

           sudo /sbin/vboxconfig

         You will not be able to start VMs until this problem is fixed.

And we do as it says:

sudo /sbin/vboxconfig

Output something like this:

vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
    linux-headers-amd64 linux-headers-6.0.0-0.deb11.2-amd64
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
    linux-headers-amd64 linux-headers-6.0.0-0.deb11.2-amd64
    ...

This is caused by not having the headers lib installed. Follow what it suggests and install them all.

sudo apt install linux-headers-amd64 linux-headers-6.0.0-0.deb11.2-amd64

Then try these two again:

sudo /sbin/vboxconfig

virtualbox -h

2. GL problem:

If it shows something like:

/opt/VirtualBox/VirtualBox: error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory

That's because it lacks OpenGL support. Install this:

apt install libglu1-mesa

If it works, congratulations!

标签:11,web,openmediavault,--,sudo,Virtual,install,Box,VirtualBox
From: https://www.cnblogs.com/pulsgarney/p/omv-6-vbox-6.html

相关文章

  • WebMvcConfigurer 配置swagger的权限
      importorg.springframework.context.annotation.Bean;importorg.springframework.context.annotation.Configuration;importorg.springframework.web.servlet.......
  • XML语言的基本语法-Java Web
    (目录)一、说明XML(eXtendedMarkupLanguage,可扩展的标记性语言)被设计用来定义结构、传输和存储数据,不用于表现和展示数据,目的是数据的内容HTML中的元素都是固定的,以显......
  • vue中 WebSocket connection to 'ws://192.168.10.103:8080/ws' failed 问题的解决
    首先吧 vue中WebSocketconnectionto'ws://192.168.10.103:8080/ws'failed这个报错它不会影响你代码的运行,但是报错一定程度上影响页面的美观度。   下面我们......
  • websocket
    /***websocket工具类*WSocket.js*/classWSocket{constructor(baseUrl){this.ws=null;//this.timeout=10000;this.timeoutObj......
  • Web前端期末大作业--马尔代夫旅游网页设计(HTML+CSS+JavaScript+)实现
    目录​​前言介绍:​​​​网站首页:​​​​关于马尔代夫:​​​​酒店信息介绍:​​​​最新优惠政策:​​​​旅游须知模块:​​​​关于我们模块:​​​​主要源码结构:​​​......
  • 爱上 Mybatis源码 (2019-08-11)
     第一次学习源码,自己很难吃透源码,也做不到直接撸源码,一句一句的解析。先学习一下别人的文章,吃透源码的流程,日后有能力了再逐句撸。 源码的乐趣就在于首先能明白为什么我......
  • WebStorm 工具的简单配置的使用
    1.系统设置1.1自动保存设置1.2模板代码可根据自己需要设置相应的模板代码1.3prettierPrettier一般不需自己配置,当在文件中鼠标右键无ReformatwithPrettier......
  • Web 批量大文件上传下载
    ​ 文件上传是一个老生常谈的话题了,在文件相对比较小的情况下,可以直接把文件转化为字节流上传到服务器,但在文件比较大的情况下,用普通的方式进行上传,这可不是一个好的办法......
  • AcWing1169. 糖果
    题目描述幼儿园里有\(N\)个小朋友,老师现在想要给这些小朋友们分配糖果,要求每个小朋友都要分到糖果。但是小朋友们也有嫉妒心,总是会提出一些要求,比如小明不希望小红分到......
  • WEB应用安全测试丨Acunetix功能简介
    快速查找并修复使您的Web应用程序面临攻击风险的漏洞。享受更多的安心——无需花费更多有限的时间。  产品功能发现与爬行01、发现所有......