VMware (i): Windows system share files to virtual machine system, Virtual machine Linux system mount shared file image do Yum source

Source: Internet
Author: User
Tags yum repolist

One, the Windows system shares files to the virtual machine system

Goal:

Environment: PC for Windows system, install Virtual machine VMware12 version, install Linux system Redhat7.2 in virtual machine.

Objective: To realize the target of Linux operating system in the virtual machine which can be shared with the files inside the Windows system.

Scheme:

1> Select a disk location on the Windows system that will be shared

2> Create a directory on the disk that provides shared files

3> set this directory share and share permissions

4> virtual machine settings are shared directories are always visible

Steps:

I. Settings for shared operations above the physical machine

1, create a shared directory in the Windows system, for example, create a directory named share folder as a shared directory under the D drive directory

2. Set share folder properties, set as shared directory

3. Set shared properties in a common tab

4, sharing needs to add an available user, this must be specified, otherwise the share is not available

5, for example, here to share the virtual machine inside the user, select Everyone, click Add

6, add the shared user can set permissions, to the virtual machine with the image file, generally set read-only mode, to prevent accidentally deleted the image file

7. After setting permissions, click Share

8, interface jump to the completion of the interface, you can see folder sharing directory

9. Click to complete the shared directory and create OK.

10. Go back and look at the Share tab to see the shared folder share path is listed, indicating that the settings are successful, and if you have special needs, you can click Advanced Sharing

11, in the Advanced Sharing tab can be seen, you can set the share name, while sharing the number of users, you can choose the parameters according to the actual situation

12, generally do not need to set other advanced sharing options, the default is good, click Close to complete the Windows-side shared directory settings.

Second, the virtual machine above the sharing operation settings

1. Open the virtual machine interface and select one of the virtual machines

2. Click the "Settings" option under "Virtual Machine" in the menu bar

3, the interface to jump to the virtual machine settings interface, click "Options", you can see the following "Shared folder" option

4. Select always enable, add the host path under the folder option, the shared folder path of the physical machine

5. Note that during the Add host path, the virtual machine needs to be powered off, otherwise the next option will not darken

6. Click Next to go to the Select Path tab, click Browse to jump to the selection path, the name below is the name you see in the virtual machine, you can not be the same as the source directory folder name, the directory name that exists as a mapping

7. Click to select the shared directory folder that the Windows host is already doing

8. Select the shared directory share folder and click OK

9. Click Next to jump to the virtual machine settings shared Files directory Permissions tab, general check read-only permissions

10. Click OK to complete the file directory sharing between the Windows system and the virtual machine Linux system

11, open the virtual machine can see the shared directory with the command line, the shared directory folder in the virtual is in the/mnt/hgfs/directory, because the shared directory mapping name is share, so the share folder in that directory is a shared folder. Storing things in this directory in Windows is visible in the virtual machine.

12, the Windows system physical machine to create a shared directory to the virtual machine has been completed.

Second, the virtual machine Linux system mounted shared file image do Yum source

Goal:

The shared folder in Windows as a Yum image file directory can be mounted at any time to build a Yum source configuration.

Steps:

1. View the contents of the Shared directory folder

[[Email protected] Desktop]# ls/mnt/hgfs/share/
Centos-7-x86_64-everything-1511.iso Win10_pro_x64_zh_cn.iso
Desktop.ini wps-office-10.1.0.5672-1.a21.x86_64.rpm
Ghost_win7_x64.iso Super First aid. Iso
Rhel-server-7.2-x86_64-dvd.iso

2. Write the Yum source configuration file

[[Email protected] Desktop]# Vim/etc/yum.repos.d/rhel7.repo
[RHEL7]
Name=rhel7
Baseurl=file:///dvd
Enable=1
Gpgcheck=0
[[Email protected] Desktop]# Mkdir/dvd
[[Email protected] Desktop]# Mount/mnt/hgfs/share/rhel-server-7.2-x86_64-dvd.iso/dvd
[Email protected] Desktop]# yum repolist
Loaded plugins: LangPacks, Product-id, Search-disabled-repos, Subscription-manager
This system isn't registered to Red Hat Subscription Management. You can use the Subscription-manager to register.
Source Identity Source Name status
Rhel7 Rhel7 4,620
repolist:4,620

3. Write mount option to boot automatically mount

[[Email protected] Desktop]# Vim/etc/fstab
/mnt/hgfs/share/rhel-server-7.2-x86_64-dvd.iso/dvd iso9660 Defaults 0 0

VMware (i): Windows system share files to virtual machine system, Virtual machine Linux system mount shared file image do Yum source

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.