VirtualBox中与主机共享文件夹

报错信息:

未能加载虚拟光盘 D:\Program Files\Oracle\VirtualBox\VBoxGuestAdditions.iso 到虚拟电脑 ToolOS-lhj.
Could not mount the media/drive 'D:\Program Files\Oracle\VirtualBox/VBoxGuestAdditions.iso' (VERR_PDM_MEDIA_LOCKED).

  主要安装过程如下;

[root@toolos media]# /.VBoxLinuxAdditions.run
-bash: /.VBoxLinuxAdditions.run: No such file or directory
[root@toolos media]# ./VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 6.1.18 Guest Additions for Linux........
bzip2 not found.  Please install: bzip2 tar; and try again.
[root@toolos media]# 
[root@toolos /]# mount -o loop  /dev/cdrom /media/
[root@toolos /]# yum install bzip2
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Resolving Dependencies
--> Running transaction check
---> Package bzip2.x86_64 0:1.0.6-13.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

======================================================================================================================================
 Package                     Arch                         Version                               Repository                       Size
======================================================================================================================================
Installing:
 bzip2                       x86_64                       1.0.6-13.el7                          redhat7.6                        52 k

Transaction Summary
======================================================================================================================================
Install  1 Package

Total download size: 52 k
Installed size: 86 k
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : bzip2-1.0.6-13.el7.x86_64                                                                                          1/1 
  Verifying  : bzip2-1.0.6-13.el7.x86_64                                                                                          1/1 

Installed:
  bzip2.x86_64 0:1.0.6-13.el7                                                                                                         

Complete!
[root@toolos /]# 

  安装

[root@toolos media]# ./VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 6.1.18 Guest Additions for Linux........
VirtualBox Guest Additions installer
Copying additional installer modules ...
Installing additional modules ...
VirtualBox Guest Additions: Starting.
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 
3.10.0-957.el7.x86_64.

  重启后自动挂载

上一篇:Linux之blkid命令


下一篇:禁用Windows Defender Antivirus Service