当前位置:网站首页>VirtualBox中克隆了一个虚拟系统出现IP问题
VirtualBox中克隆了一个虚拟系统出现IP问题
2022-06-28 16:42:00 【星哥玩云】
由于要做日志服务器,所以至少需要两台虚拟系统做测试,为了避免在装一个虚拟机浪费时间,我就使用VirtualBox软件自带的功能导出了一个虚拟介质(相当于复制了一个虚拟系统),最后我启动这两台虚拟系统,只能有一台电脑能够分配IP地址,我ifconfig了一下,发现他们怎么被分配相同了IP地址,于是在网上寻求解决方法,按照大牛们的提示,我做了如下操作: 1、通过VirtualBox重新生成了一下克隆的那台虚拟系统的Mac地址,记得要先关闭系统,如图:
2、编辑网卡的配置文件,vim /etc/sysconfig/network-scripts/ifcfg-eth0,修改mac地址为新的mac地址: HWADDR="08:00:27:27:5E:BF"
3、检查/etc/udev/rules.d/70-persistent-net.rules文件,会发现里面会有两行这样的配置项: # PCI device 0x8086:0x100e (e1000) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:23:86:95", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0" # PCI device 0x8086:0x100e (e1000) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:27:5e:bf", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
其中上面的一项是之前的网卡的mac地址,也就是被克隆的网卡的地址,我将它删除掉,下面的一项是我们新添加的网卡的地址,但是NAME是eth1,这里我们需要改成eth0: # PCI device 0x8086:0x100e (e1000) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:27:5e:bf", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
4、由于修改了硬件的配置文件,我们需要更新一下,让系统重新加载新的硬件设备,执行如下命令: start_udev
5、现在我们可以重新启动网卡,: ifup eth0
6、使用ifconfig查看网卡信息,发现eth0已经重新分配了ip地址
边栏推荐
- 3. caller service call - dapr
- 如何清除 WordPress 中的缓存
- Potplayer play Baidu Cloud disk video
- You have a chance to collect wool. Click "earn" and you will have a chance to earn a high commission
- Please ask me, the queries written in my database account for 99%. Is it better to use pay as you go mode or reservation mode?
- 如何备份 WordPress 数据库
- Flex布局
- offsetwidth\clientwidth\scrollwidth
- [208] API design based on accesstoken
- 【TcaplusDB知识库】WebClient用户如何读取和修改数据
猜你喜欢

免费、强大、高颜值的笔记软件评测: OneNote、Heptabase、氢图、FlowUs

使用 Open Connector 进行 HubSpot 和 SAP 系统的集成工作

After the first failure, AMEC rushed to the Hong Kong stock exchange for the second time, and the financial principal changed frequently

Use open connector to integrate hubspot and SAP systems

基数排序——【常见排序法(2/8)】

这个简单的小功能,半年为我们产研团队省下213个小时

This simple little function saves 213 hours for our production research team in half a year

【Hot100】4. Find the median of two positive arrays

Introduction to LTSpice circuit simulation

【TcaplusDB】祝大家端午安康!
随机推荐
Solve the problem that subcomponents will not be destroyed through setTimeout
批量修改指定字符文件名 bat脚本
How to clear the cache in WordPress
This simple little function saves 213 hours for our production research team in half a year
Inspur network wins step by step
关于接口测试自动化的总结与思考
FS2K人脸素描属性识别
天翼云Web应用防火墙(边缘云版)通过首批可信认证
Research on master's thesis writing
The first WordPress plug-in you are taught to make step by step
Lucky draw animation - Carp jumps over the dragon's gate
基于Krack的网络攻击「建议收藏」
2022年暑期及9月份CSP-J1 CSP-S1初赛 培训计划及学习要点
opencv 读取图片详解
[laravel] about the composer installation of laravel8
【TcaplusDB知识库】WebClient用户如何读取和修改数据
Please ask me, the queries written in my database account for 99%. Is it better to use pay as you go mode or reservation mode?
高并发、高可用、弹性扩展,天翼云护航企业云上业务
小新黑苹果声卡ID注入
From five capabilities to "1+5+n", Huawei makes the transformation of government and enterprises more stable