How does the centos7 virtual machine in vmware access the disk of the win10 host

insert image description here

sudo mount -t fuse.vmhgfs-fuse .host:/ /D -o allow_other

In VMware, you can use the shared folder feature to allow virtual machines to access the host's disks. Here are the steps to enable CentOS 7 virtual machine to access Windows 10 host disk in VMware Workstation:

  1. Open the CentOS 7 virtual machine in VMware Workstation and log in to the virtual machine.

  2. Select the "Virtual Machine" menu, then select the "Settings" option.

  3. In the "Hardware" tab, select the "Shared Folders" option.

  4. Click the "Add" button and select the host folder to share.

  5. Specify a name for the shared folder and select the "Always available" option to ensure that the shared folder is automatically mounted when the virtual machine starts.

  6. In the CentOS 7 virtual machine, run the following command to mount the shared folder:

    sudo mkdir /mnt/hgfs
    sudo mount -t fuse.vmhgfs-fuse .host:/ /mnt/hgfs -o allow_other
    ```
    
    这将在 CentOS 7 虚拟机中创建一个名为 `/mnt/hgfs` 的目录,并将宿主机的共享文件夹挂载到该目录。
    
    
  7. /mnt/hgfsYou can now access the host's shared folders by navigating to the directory within the CentOS 7 virtual machine .

Please note that in order for the CentOS 7 virtual machine to access the host's disk, you need to install VMware Tools on the Windows 10 host. If you do not have VMware Tools installed, select the VM menu, then select the Install VMware Tools option to install VMware Tools. After the installation is complete, you can follow the steps above to allow the virtual machine to access the host's disk.

Guess you like

Origin blog.csdn.net/a772304419/article/details/131854835
Recommended