VirtualBox 笔记
1 tips
- IDE设备挂载点在 /dev/sr0 sr1 ... # redhat9.1
2 在VirtualBox下安装Linux的增强功能(鼠标无缝切换等)
- 官网下载安装(可能要更新VirtualBox版本):Oracle_VM_VirtualBox_Extension_Pack-7.0.4.vbox-extpack
- 虚拟机安装成功后,运行虚拟机,点击设备-安装增强功能,在虚拟机内部弹出安装对话框,按照步骤安装。 不行可跳到第3步。
- 在VirtualBox安装目录下找到 VBoxGuestAdditions.iso,执行步骤1后就有了。
- 将VBoxGuestAdditions.iso挂载到虚拟机,其中有一个 VBoxLinuxAdditions.run 文件,直接运行就行了。
- 可以看到VBoxGuestAdditions.iso下有不同系统的对应程序。
[root@localhost ~]# mount /dev/sr2 /media/sr2
mount: /media/sr2: WARNING: source write-protected, mounted read-only.
[root@localhost ~]# ls /media/sr2
AUTORUN.INF runasroot.sh VBoxSolarisAdditions.pkg
autorun.sh TRANS.TBL VBoxWindowsAdditions-amd64.exe
cert VBoxDarwinAdditions.pkg VBoxWindowsAdditions.exe
NT3x VBoxDarwinAdditionsUninstall.tool VBoxWindowsAdditions-x86.exe
OS2 VBoxLinuxAdditions.run windows11-bypass.reg
安装Linux的增强功能有问题
https://www.reddit.com/r/virtualbox/comments/gabkpr/vb_guest_additions_install_issue_on_fedora_32/
*** THIS IS ONLY TO RESOLVE THE ValueError ***
Hey! I stumbled across this same issue today, but was able to resolve the ValueError above. That particular issue is SELinux-related. It involves the VirtualBox installation of Guest Additions (GAs) trying to add a file context for the mount.vboxsf file when it is already set. To at least resolve that error:
Be sure that the GAs that come with Fedora are removed using yum, and that the kernel-devel, gcc, make, and perl binaries are installed on your Fedora VM with yum.
Escalate to root: sudo -i or su -
As root:
semanage fcontext -d /opt/VBoxGuestAdditions-/other/mount.vboxsf
restorecon /opt/VBoxGuestAdditions-/other/mount.vboxsf
And then run the VBoxGuestAdditions installer, and reboot. At the very least, it should not have the ValueError shown above. As far as testing some of the other functionality, let me know if that works out for anyone, because I do not use clipboards and shared folders!
- 安装 kernel-devel, gcc, make, 和 perl
semanage fcontext -d /opt/VBoxGuestAdditions-<VERSION>/other/mount.vboxsf
restorecon /opt/VBoxGuestAdditions-<VERSION>/other/mount.vboxsf
- 重启 reboot