RHEL clones the VM and changes the NIC address.

Source: Internet
Author: User

Change the NIC address after cloning the Virtual Machine (RHEL) (1) Change the hostname

# vi /etc/sysconfig/networkNETWORKING=yesHOSTNAME=your-vm-hostname-here
(2) Change the NIC address

After cloning the RHEL6 virtual machine using virt-manager or virtual-box, you must manually change the NIC address.

First, View the Virtual Machine properties in virt-manager: View-> Details

Overview | Basic Details

Name: vm-rhel64-aa

UUID:6529d110-4191-e724-9c4d-aaa5db31fefd


NIC: 22: d6: 4b | Virtual Network Interface

Source device: Virtual network; default ': NAT

Device model: virtio

MAC address:52: 54: 00: 22: d6: 4b

Write down the UUID and MAC above.


1) log on to the VM and edit the file:

# vi /etc/sysconfig/network-scripts/ifcfg-eth0

The content is as follows:

DEVICE=eth0HWADDR=52:54:00:22:D6:4BTYPE=EthernetUUID=6529d110-4191-e724-9c4d-aaa5db31fefdONBOOT=yesNM_CONTROLLED=yesBOOTPROTO=dhcp


2) delete the file: 70-persistent-net.rules

# rm /etc/udev/rules.d/70-persistent-net.rules

3) restart the system

# reboot


Now the VM should have a new hostname and MAC address.


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.