VMware Linux virtual machine configuration record--sharing windows connection to the Internet

Source: Internet
Author: User
Author: fbysss
Msn:jameslastchina@hotmail.com
Blog:blog.csdn.net/fbysss
Statement: This article by fbysss Original, reprint please indicate the source
Keywords: virtual machine sharing Internet
Objective:Linux virtual machines share the Internet through Windows systems. Also, you want to keep the IP address of the local network card.

1. Install VMware
The process of installing VMware is simple and is not explained here. After you install VMware, create a virtual machine, and then start, and the problem is that the system does not read the disc and cannot boot from it. It was later discovered that the system had one more virtual optical drive, and that the default CD-ROM for the virtual machine was set to the virtual CD drive. Select the virtual machine node in the virtual machine settings on the left side of the VMware main interface, right-click the->settings, select the correct letter in the Cd-rom,use physical driver Drop-down box in hardware, and click the OK button.
2. Install Linux
Install the process slightly, remind, do not forget in the virtual machine press F2 into the BIOS settings to the CD drive as the first boot drive.
At the end of the installation, there was a hint that the partition table on the device HDA could not be read, and that the new partition must be initialized when it was created, causing all data loss for that drive to be heavy. This action will override all previous installation selections for the drive you want to ignore. Do you want to initialize this drive and delete all data? "It looks scary, but don't be nervous. The operation on the virtual machine is limited to the disk space specified by the virtual machine. Sure it is, or else you'll have to do it again.
3.Windows Settings
Open network connection, found that there are two more connections, one is VMnet1, one is Vmnet8, the address is 192.168.239.1 and 192.168.150.1, please select Local connection, double-click, at the property page point "Advanced", select " Allow other network users to connect through this computer's Internet connection, and then OK. If everything is OK, VMnet1 's address will be changed to 192.168.0.1, of course, this address is actually not a matter of how to change.
4. Virtual machine Setup
In the Virtual machine node settings, select the NIC to select Network connection as Nat.
5.Linux Network settings
Under the Linux graphical interface, use DHCP to automatically obtain IP address settings. The address assigned to IS 192.168.150.128,
In/etc/sysconfig/network-scripts/ifcfg-eth0, Gateway is 192.168.0.1,dns should be manually configured correctly.
But through the route command, the gateway is 192.168.150.1. I think that the real use of the gateway, should be the latter.
After testing, There is a strange phenomenon: manually set the address to 192.168.150.128, the gateway set to 192.168.150.1 and 192.168.150.2, all can be normal Internet, and 192.168.150.3 above is not, but Route command can see 192.168.150.3 and set to an address that is not a 150 network segment, then route is not accessed at all. At least, it's all about Vmnet8.
Also, notice a problem, regardless of how you set up in the Windows network connection, the subnet of the VMnet1 and VMnet8 in virtual network settings in the VM Edit menu are not changed.
Summary:Goal achieved, but the real mystery of the VM Network has not been fully understood. Pending further study.

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.