0.确保要拷贝的虚拟机为关机状态
1.在虚拟机名上右键导出,选择导出的文件夹,然后等待虚拟机的任务状态为导出进度100%完成,完成后对导出的虚拟机文件夹重命名(随自己,也可以不重命名,自己认的清就行)
image.png
image.png
2.为所需导入的虚拟机创建文件夹,按导出的文件夹建立
image.png
image.png
3.在hyper-v管理器的计算机名上右键导入,按提示一步步来,选择导入类型的时候要选择复制虚拟机(创建新的唯一ID)
image.png
image.png
image.png
image.png
image.png
image.png
image.png
image.png
image.png
4.修改虚拟机的网卡物理地址/IP/主机名信息
修改网卡:
[root@linux201 ~]# vim /etc/udev/rules.d/70-persistent-net.rules
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.
# net device ()
#SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:15:5d:62:2d:0a", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
#将老的网卡注掉或者删除,因为老的网卡和原来的虚拟机一样,要用新生成的网卡,然后把下面新的网卡name改为eth0,然后复制新的网卡物理地址00:15:5d:62:2d:0b,待会要用
# net device ()
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:15:5d:62:2d:0b", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
修改IP:
[root@linux201 ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth0
image.png
修改主机名:
[root@linux201 ~]# vim /etc/sysconfig/network
image.png
至此,centos6虚拟机克隆完成
网友评论