我有一个客户,他的网站需要 PHP 7.4 来运行一些自定义代码。为了测试修复,我需要创建一个可以运行 7.4 的本地 VM,但据我所知,此版本不再可供安装。我希望能够找到一个预装了 7.4 的映像,可以在 VirtualBox 或 VMWare Fusion 下运行。有人有什么建议吗?
我是一名工程专业的学生,在网络安全课上,教授假设每个人都使用 Mac 或 Windows(我是唯一一个使用 Ubuntu 的人)。他希望我们使用一个名为 LabTainer 的虚拟机,它在 VirtualBox(.ova 扩展名)上运行。不幸的是,当我尝试启动虚拟机时,我收到了错误消息
Result Code:
NS_ERROR_FAILURE (0x80004005)
Component:
MachineWrap
Interface:
IMachine {e36a5081-a82a-40bd-9e4e-42a44d6ce50f}
~/VirtualBox VMs/LabtainerVM24 文件夹中没有创建日志。经过几个小时的搜索,我找不到解决方案,这很令人沮丧,因为我在实际工作上浪费了时间。你知道如何解决这个问题吗?或者是否有 VirtualBox 的替代方案?我目前正在尝试转换 ova 文件以与虚拟机管理器一起使用。我已经尝试使用命令 purge and remove 卸载并从官方网站重新安装最新的 VirtualBox 版本 7.1,并且我有最新的 Qt 和 SDL 依赖项。
谢谢!
编辑:我终于找到了解决方案
我的 vanilla Vagrant Ubuntu 24.04 安装在 VirtualBox Guest Additions 的同一位置卡住了。我尝试了多次,但每次都停在相同的步骤和以下消息:
XXXXXXX@XXXXXX-PC MINGW64 /d/vagrant/projects/project6
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'apavy/ubuntu-24.04-desktop-amd64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'apavy/ubuntu-24.04-desktop-amd64' version '0.1.0' is up to date...
==> default: Setting the name of the VM: project6_default_1722119127024_28694
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default:
default: Vagrant insecure key detected. Vagrant will automatically replace
default: this with a newly generated keypair for better security.
default:
default: Inserting generated public key within guest...
default: Removing insecure key from the guest if it's present...
default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims: 6.0.0
VBoxService inside the vm claims: 7.0.14
Going on, assuming VBoxService is correct...
[default] GuestAdditions versions on your host (7.0.20) and guest (7.0.14) do not match.
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims: 6.0.0
VBoxService inside the vm claims: 7.0.14
Going on, assuming VBoxService is correct...
Reading package lists...
Building dependency tree...
Reading state information...
linux-headers-6.8.0-31-generic is already the newest version (6.8.0-31.31).
build-essential is already the newest version (12.10ubuntu1).
dkms is already the newest version (3.0.11-1ubuntu13).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Copy iso file C:\Program Files\Oracle\VirtualBox\VBoxGuestAdditions.iso into the box /tmp/VBoxGuestAdditions.iso
Mounting Virtualbox Guest Additions ISO to: /mnt
mount: /mnt: WARNING: source write-protected, mounted read-only.
Installing Virtualbox Guest Additions 7.0.20 - guest version is 7.0.14
Verifying archive integrity... 100% MD5 checksums are OK. All good.
Uncompressing VirtualBox 7.0.20 Guest Additions for Linux 100%
VirtualBox Guest Additions installer
Removing installed version 7.0.14 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
VirtualBox Guest Additions: Starting.
VirtualBox Guest Additions: Setting up modules
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel
modules. This may take a while.
VirtualBox Guest Additions: To build modules for other installed kernels, run
VirtualBox Guest Additions: /sbin/rcvboxadd quicksetup <version>
VirtualBox Guest Additions: or
VirtualBox Guest Additions: /sbin/rcvboxadd quicksetup all
VirtualBox Guest Additions: Building the modules for kernel 6.8.0-31-generic.
update-initramfs: Generating /boot/initrd.img-6.8.0-31-generic
VirtualBox Guest Additions: Running kernel modules will not be replaced until
the system is restarted or 'rcvboxadd reload' triggered
VirtualBox Guest Additions: reloading kernel modules and services
VirtualBox Guest Additions: kernel modules and services 7.0.20 r163906 reloaded
VirtualBox Guest Additions: NOTE: you may still consider to re-login if some
user session specific services (Shared Clipboard, Drag and Drop, Seamless or
Guest Screen Resize) were not restarted automatically
这Vagrantfile
:
Vagrant.configure("2") do |config|
# Machine Image
config.vm.box = "apavy/ubuntu-24.04-desktop-amd64"
# Provisioning
config.vm.provision :shell, path: "provision.sh"
end
我正在尝试使用 Vagrant 创建一个 Ubuntu 24.04 机器。我在 vagrantfile 中配置了一些配置选项,在 provision.sh 文件中配置了相当多的配置选项。这两个文件的内容都发布在下面。但是,看起来我的 Provision.sh 文件根本没有被执行。我需要帮助解决这个问题,这样我才能正确配置我的机器。
Vagrant文件:
Vagrant.configure("2") do |config|
config.vm.box = "apavy/ubuntu-24.04-desktop-amd64"
config.vm.provider "vmware_desktop" do |v|
v.gui = true
end
config.vm.provider "virtualbox" do |v|
v.memory = 2048
v.cpus = 2
v.name = "my_vm"
v.gui = true
v.check_guest_additions = false
end
# Provisioning Script
config.vm.provider "vmware_desktop" do |v|
v.vm.provision :shell, path: "provision.sh"
end
provision.sh:
#!/usr/bin/env bash
# Change the Default Keyboard Layout
sudo sed -i 's/"fr"/"us"/g' /etc/default/keyboard
# Install OS updates
sudo apt update
sudo apt upgrade -y
# Disable Unix Firewall
sudo ufw disable
# Install Desktop Tools
sudo apt install -y open-vm-tools-desktop build-essential dkms linux-headers-$(uname -r) curl wget git vim nano bash-completion
sudo poweroff
今天我花了大约一个小时安装它,因为安装失败了很多次。最后,我没有跳过这个步骤,而是接受了安装程序关于使用新版本的问题,它确实成功了!
嗯,至少在一段时间内是这样。机器启动了,添加了客户机,重新启动了,但几分钟后它显示图形失真。然后重新启动后,客户机添加不起作用(vboxclient 记录了一些东西但停止了挖掘)。有没有什么已知的解决方案?所有这些虚拟机创建都像它应该的那样简单。
我有一个虚拟盒子运行 Windows XP 以便使用一些旧的 OEM 数码相机程序和一些游戏。VirtualBox 通过其 ppa 进行安装,并在安全模式下将扩展包和来宾添加安装到 XP 中。最近更新到 7.0.18 后,我开始在缩放模式下的来宾中遇到鼠标问题,并且关闭了鼠标集成。光标最初停在 VirtualBox 窗口的边缘,然后穿过边缘进入 Ubuntu 桌面。在窗口上来回挥动一段时间后,光标有时会被映射到窗口中的错误位置或无法到达边缘。即使我卸载了来宾添加项,这种情况仍然会继续,而这是不应该发生的。捕获后,鼠标应完全包含在 VirtualBox 内。这是我在非窗口游戏中执行鼠标控制滚动的首选方法。
我尝试重新安装扩展包和来宾添加,但行为没有改变。
我想在 Ubuntu24.04 LTS 上安装 virtualbox,但我没有找到 virtualbox 适用于 Ubuntu 24.04 的软件包,我下载了 jammy 的 virtualbox 并尝试安装它,我得到了这个输出
arman@salar:~/Downloads$ sudo apt install ./virtualbox-7.0_7.0.16-162802~Ubuntu~jammy_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.16-162802~Ubuntu~jammy_amd64.deb'
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-7.0 : Depends: libvpx7 (>= 1.10.0) but it is not installable
Recommends: libsdl-ttf2.0-0 but it is not going to be installed
Recommends: gcc but it is not going to be installed
Recommends: make or
build-essential but it is not going to be installed or
dpkg-dev but it is not going to be installed
Recommends: binutils but it is not going to be installed
E: Unable to correct problems, you have held broken packages
有什么办法可以绕过这个错误,或者我们必须等待 virtualbox 官方网站为 ubuntu24.04TS 发布适当的软件包?
我的主机是 Windows 10 机器。我已经安装了 VirtualBox 7,它运行 Ubuntu 20.04 桌面操作系统。
VirtualBox 为我提供了插入 Guest Additions CD 的选项,我尝试过。它安装了访客附加功能。剪贴板共享工作正常。重启。剪贴板共享停止工作。
之后我花了两天时间尝试卸载 Guest Additions。我尝试尽我所能删除现有的安装:
sudo rmmod vboxguest
sudo rm -rf /opt/VBoxGuestAdditions-*
sudo find /usr/src -name "*vboxguest*" -exec rm -rf {} +
sudo find /usr/lib -name "*vboxguest*" -exec rm -rf {} +
reboot
现在我尝试按照以下步骤从 CD 再次安装它:
cd /media/$USER/VBOXADDITIONS_<version>/
sudo sh ./VBoxLinuxAdditions.run
此安装不起作用,因为它仍然不断检测现有安装并尝试卸载它。这是输出:
...
VirtualBox Guest Additions installer
/usr/sbin/vbox-uninstall-guest-additions: 9: /opt/VBoxGuestAdditions-7.0.12/uninstall.sh: not found
Failed to remove existing installation. Aborting...
该文件夹/opt/VBoxGuestAdditions-7.0.12
甚至不存在。但它仍然强迫性地尝试从那里卸载。
- 有没有办法强制安装(覆盖)来宾添加?
- 为什么安装程序不断搜索现有安装?有没有办法卸载所有痕迹?
抱歉,我不是专业人士。我需要使用带有 Linux 的虚拟机和大量磁盘空间。当我在 VirtualBox 中创建虚拟机时,我将虚拟硬盘大小设置为 80GB。但虚拟机中的系统告诉我,我只有 5GB 的可用空间。显然,我刚刚开始,我没有下载任何东西。当我进入设置时,我看到硬盘有 80GB。我如何访问它?
VirtualBox 现在对我来说很关键,因为我想在 Windows VM 中使用 Cursor IDE,因为 Linux AppImage 不起作用。
另外,我还学习了一些在学校运行 Kali 和虚拟机的安全知识。
什么是解决方法?
编辑:Virtualbox 7.0 可用(base) nyck33@nyck33-tt:~$ sudo apt install virtualbox
但是 OpenZiti 的隧道程序在 23.10 上不起作用,所以我开始怀疑这是否是一个坏主意。
一位开发人员在 OpenZiti 论坛上提供了使用 Jammy 版本的解决方法,但我听说这可能会导致操作系统出现问题。
当我再次遇到这种情况时,有哪些解决方法?