在 ARM Mac 上安装带有来宾添加的 VirtualBox

Written by

in

有关在具有 ARM64 处理器的 Mac 上的 VirtualBox 中安装 Ubuntu Server 并连接 Guest Additions 的说明。

安装 VirtualBox

下载 VirtualBox 的 ARM64 版本,安装映像并将 VirtualBox.app 传输到应用程序。

配置虚拟机

我们创建一台新机器,指定Linux类型和Ubuntu版本(64位ARM)。在设置中我们设置:

  • TPM – 禁用
  • UEFI – 禁用
  • RAM – 4096 MB。
  • 图形控制器 – VMSVGA(用于 VBoxLinuxAdditions)。
  • 处理器 – 4 核。

安装 Ubuntu 服务器

将 ARM64 的 Ubuntu Server ISO 映像挂载到 CD-ROM 驱动器中。在下载部分,将光驱放在列表中的第一位。我们启动机器并安装 Ubuntu Server。

安装 xubuntu-desktop

安装XFCE图形环境:

sudo apt update
sudo apt install -y xubuntu-desktop

在登录管理器选择对话框中,选择 lightdm。

重新启动访客系统:

sudo reboot

来宾添加

首次启动后,安装用于构建内核模块的软件包:

sudo apt update
sudo apt install -y build-essential linux-headers-$(uname -r)

我们通过 VirtualBox 菜单安装带有 Guest Additions 的磁盘:Devices → Mount Guest Additions 磁盘映像。该磁盘将出现在 guest 虚拟机内的 /media/$USER 目录中。

在 Xubuntu 中打开终端,进入挂载磁盘的目录并运行安装程序:

cd /media/$USER/*
sudo ./VBoxLinuxAdditions-arm64.run

重新启动访客系统:

sudo reboot

安装后应该如何工作

我们检查内核模块是否已加载:

lsmod | grep vbox

输出应包括 vboxguest 和 vboxsf。

在计算机属性中添加共享文件夹并将其安装在来宾中:

sudo mkdir -p /media/sf_shared
sudo mount -t vboxsf shared /media/sf_shared

工作特点:

  • 共享文件夹 – 主机目录通过 vboxsf 在来宾中可见。
  • 共享剪贴板 – 在主机和访客之间复制文本。
  • 鼠标集成 – 光标自由延伸到机器窗口之外。
  • 自动更改分辨率 – 访客屏幕会根据窗口大小进行调整。
  • 时间同步 – 客人的时间调整为主人的时间。

来源

https://www.virtualbox.org/manual/topics/guestadditions.html
https://forums.virtualbox.org/viewtopic.php?t=112886

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

DemensDeum
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.