The solution to the problem that the VMware virtual machine and the host cannot transfer files to each other

The solution to the problem that the VMware virtual machine and the host cannot transfer files to each other

foreword

Although when I installed the VMware virtual machine, I found that the virtual machine and the host could not transfer files, but I didn't care because I didn't need to transfer files at the time. (Even I followed the online tutorial to install VMware Tools, but it still doesn't work.)

Problem Description

My virtual machines and hosts have the following characteristics:

  1. The virtual machine software is installed on the D disk, and my D disk software requires administrator privileges to operate; (If yours does not need it, I think it is easier to transfer files between each other.)
  2. I have installed VM Tools, but I cannot drag and drop files from the host and the virtual machine to each other;

Solution

Operating environment: win10, Vmware Workstation Pro, ubuntu20.4.5LTS

Follow the steps below:

  1. Edit the virtual machine settings when the virtual machine is turned off, and change the connection of the virtual machine to automatic detection. I read other articles before and some people commented that it is not automatic connection, and the installation will fail;

auto connect

2. When the virtual machine is turned on, choose to reinstall VM Tools, and the installation prompt will pop up in the virtual machine. (The "Reinstall VM Tools" button is grayed out in suspend and shutdown states.)

Reinstall VMTools
installation tips

  1. Since I am not familiar with the operation of linux system, I am not very good at using tar decompression operation, and the installation failed after Baidu tried, so I used another method here, first save the installation package to the desktop and then decompress it.

    • Right-click the tar.gz compressed package and select Open with Archive Manager;

    Archive Manager opens

    • Select Save as Desktop;

save as desktop

  • Open a terminal in the desktop;

desktop open terminal

  • Use the tar command to decompress and enter the following command, where the file name is subject to your own, and the version number may be different;

    tar xzvf VMwareTools-10.3.22-15902021.tar.gz

unzip

  1. Open the VM Tools folder

    cd vmware-tools-distrib/

open folder

  • Install VM Tools using the following command

    sudo ./vmware-install.pl

Install

  • As shown in the picture above, I have completed the installation here. The first installation should not be such a response, but it also keeps replying "yes" until the word enjoy appears.
    enjoy
  1. Restart the virtual machine, and then you will find that the host and the virtual machine can drag and drop files to each other. If not, check to see if the place where you store the VM files has administrator privileges.

    • Right click on the hard drive, click Properties

hard drive properties

  • Find security, click user, edit user permissions, change to full control, and apply.

change permissions

  • Close the virtual machine software, reopen and start the virtual machine, and you will find that you can drag and drop files to each other at this time.
  1. Tip: After dragging and dropping files to each other, you will find that you don’t know where the files transferred from the host to the virtual machine are. After all, we have been yes during installation, and we didn’t pay attention to the storage path at all.

    A simple way to find files: find that there is a search box in the file management of the virtual machine , and you can find where it exists by directly searching the file name.

find files

other alternatives

The transfer of files between the host and the virtual machine is not only possible through VM Tools, but also through the following two methods to achieve file sharing.

  1. create shared folder

The specific operation method can be found in the method of this blog: I have not carried out the actual operation of file transfer including shared folders .

  1. Network IP sharing

    This method is less involved on the Internet, and you can do it yourself on Baidu.

If you think my writing is good, please give me a free like, and if there are any mistakes, please give me feedback.

Guess you like

Origin blog.csdn.net/qq_45830323/article/details/129776186