Solution to the problem of IP loss caused by copying centos8 virtual machine under VMWARE

Solution to the problem of IP loss caused by copying centos8 virtual machine under VMWARE

After installing a centos8 service under vmware and then copying it, the following problems occur

The source centos before copying and the centos service after copying have no IP, so they need to be reset

After repeated testing, we need to add an eth0 configuration under /etc/sysconfig/network-scripts in centos8 to solve this problem.

The solution order is as follows

1. Go to the corresponding directory of /etc/sysconfig/network-scripts and execute the su command to switch yourself to the root level.

2. After su succeeds, execute cp ens33 eth0 to copy the original ens33 configuration file in this directory and name it eth0

3. Execute the ip addr command to obtain the mac address of the corresponding network card. The execution result is as follows

Copy the ether data corresponding to ens33 here 00:0c:29:52:22:d1. This value will be used when editing the eth0 file later.

4. Edit the vi eth0 file and add the items that need to be selected repeatedly. Comment out the parameters such as ONBOOT, NAME, and DEVICE in the original configuration file. (Another processed virtual machine is used for screenshots, so the displayed mac is different. If you don't know how to edit vi, just enter the file and press the insert key to enter the editing state. Press the ESC key to exit the editing state. Press :wq to save and exit and :q to exit. These commands are enough.)

5. After saving and exiting, execute a network restart. Here is centos8, and the relevant command to execute is nmcil c reload. After execution, you can see that the IP has been displayed by executing ipconfig again.

But my local modification did not show that the IP had been created, so I executed a reboot again. After restarting the virtual machine, I could see that the IP was assigned

This is the end of this article about how to solve the problem of IP loss caused by copying centos8 virtual machine under VMWARE. For more relevant content about IP loss caused by copying centos8 under VMWARE, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Centos8 bridge static IP configuration method in VMware virtual machine

<<:  React Native startup process detailed analysis

>>:  MySQL date processing function example analysis

Recommend

Implementation code for infinite scrolling with n container elements

Scenario How to correctly render lists up to 1000...

How to use default values ​​for variables in SASS

Variables defined in SASS, the value set later wi...

How to add file prefixes in batches in Linux

You need to add "gt_" in front of the f...

Detailed explanation of viewing and setting SQL Mode in MySQL

Viewing and Setting SQL Mode in MySQL MySQL can r...

A solution to a bug in IE6 with jquery-multiselect

When using jquery-multiselect (a control that tra...

Simple summary of tomcat performance optimization methods

Tomcat itself optimization Tomcat Memory Optimiza...

Recommend a cool interactive website made by a front-end engineer

Website link: http://strml.net/ By Samuel Reed Ti...

CentOS7 uses rpm to install MySQL 5.7 tutorial diagram

1. Download 4 rpm packages mysql-community-client...

How to use border-image to implement text bubble border sample code

During the development activity, I encountered a ...

Detailed explanation of how Zabbix monitors the master-slave status of MySQL

After setting up the MySQL master-slave, you ofte...

Steps to change mysql character set to UTF8 under Linux system

Table of contents 1. Check the MySQL status in th...

In-depth explanation of MySQL user account management and permission management

Preface The MySQL permission table is loaded into...

Centos7 installation of FFmpeg audio/video tool simple document

ffmpeg is a very powerful audio and video process...