Configure static IP addresses for virtual machines and static IP addresses for virtual machines

Source: Internet
Author: User

Configure static IP addresses for virtual machines and static IP addresses for virtual machines

 

 

Use VMware to configure Virtual Machine static IP addresses

1. After the virtual network is installed, select Edit> Virtual Network editor on the menu bar to open the virtual network editor dialog box and selectVmnet8 NetSet the subnet IP address as needed. Click the NAT settings page to viewSubnet Mask and gateway, Which will be used later to modify the static IP address.

2. Check the VM 8 Nic settings, open Network and sharing center → change Adapter settings → right-click VMware Network Adapter VMnet8, and select Properties to open the Properties dialog box.

 

3. In the lower-right corner of the VM, right-click the network adapter and choose disconnect from the shortcut menu. Then, reconnect to the VM to make sure the settings take effect. Enable the VM and enter ifcfg to view the allocated IP address.

4. Modify the network configuration file and disable the host firewall (/etc/init. d/iptables stop), check the fire protection status (chkconfig iptables status), ping the Host ip address (192.168.223.11), and host VM8

IP address (192.168.219.1), host machine and gateway IP address (192.168.219.2) before the virtual machine can all indicate that the VM's fixed IP address is successfully set.

Vi/etc/sysconfig/network-scripts/ifcfg-eth0 is:

(Note: Press a to enter insert mode. Press esc and press ": wq" to save and exit)

DEVICE = eth0
HWADDR = 00: 0C: 29: FA: C8: C2 (physical addresses cannot be copied)
TYPE = Ethernet
UUID = b1aff802-155b-445e-b9cc-485d30aa6e4e (unique ID cannot be copied)
ONBOOT = yes
NM_CONTROLLED = yes
BOOTPROTO = static
IPADDR = 192.168.219.11
GATEWAY = 192.168.219.2

Check whether the firewall is disabled

 

5. Restart the Virtual Machine (reboot) to verify that the IP address remains unchanged.

 

 

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.