当前位置:   article > 正文

Centos7系统下KVM虚拟化Migration(06)--企业迁移案例

centos7 qemu-kvm: -device vfio-pci,host=01:00.0,id=hostdev0,bus=pci.0,addr=0

0x0 应用场景

  • VMware ESXi–> KVM
  • KVM –> VMware ESXi
  • Xen –> VMware ESXi
  • XEN–>KVM
  • KVM –>KVM

0x1 v2v(虚拟机到虚拟机的迁移virtual machine to virtual machine)

  • 01 冷迁移(也叫静态迁移)
静态迁移(offline migration)也叫做常规迁移,离线迁移。在迁移之前将虚拟机暂停,同时拷贝虚拟机镜像和状态到目的主机。相比较于在线迁移(online migration),其缺点就是静态迁移方式的过程需要显式的停止虚拟机的运行,而在线迁移的过程仅有非常短暂的停机时间,保证迁移过程中虚拟机服务的持续可用;静态迁移的优点是兼容性强,不需要VMM的同意API接口,可以借助第三方工具辅助迁移。由于目前VMM的开发没有统一的标准,不同的虚拟化厂商,尤其是闭源的厂商开发的VMM各成一套,静态迁移是解决不同类型虚拟机之间迁移的有效办法。
优点:虚拟机不需要位于共享存储器上,丢失数据的概率小。
缺点:需要关闭电源,业务中断。
名称主机规划内存热迁移技术实现方式网络虚拟化
KVM0110.0.0.114GKVM静态迁移NATKVM
KVM0210.0.0.124GKVM静态迁移NATKVM
  • 02 热迁移(也叫动态迁移)
热迁移(Live Migration),又叫动态迁移、实时迁移,即虚拟机保存/恢复,通常是将整个虚拟机的运行状态完整保存下来,同时可以快速的恢复到原有硬件平台甚至是不同硬件平台上。恢复以后,虚拟机仍旧平滑运行,用户不会察觉到任何差异。

如果源宿主机和目的宿主机共享存储系统,则只需要通过网络发送客户机的 vCPU 执行状
态、内存中的内容、虚机设备的状态到目的主机上。否则,还需要将客户机的磁盘存储发到目的主
机上。共享存储系统指的是源和目的虚机的镜像文件目录是在一个共享的存储上的。

在基于 共享存储系统 时,KVM 动态迁移的具体过程为:
1、迁移开始时,客户机依然在宿主机上运行,与此同时,客户机的内存页被传输到目的主机上。
2、QEMU/KVM 会监控并记录下迁移过程中所有已被传输的内页的任何修改,并在所有内存页都传输完成后即开始传输在前面过程中内存页的更改内容。
3、QEMU/KVM 会估计迁移过程中的传输速度,当剩余的内存数据量能够在一个可以设定的时间周期(默认 30 毫秒)内传输完成时,QEMU/KVM 会关闭源宿主机上的客户机,再将剩余的数据量传输到目的主机上,最后传输过来的内存内容在目的宿主机上恢复客户机的运行状态。
4、至此,KVM 的动态迁移操作就完成了。迁移后的客户机尽可能与迁移前一致,除非目的主机上缺少一些配置,比如网桥等。注意,当客户机中内存使用率非常大而且修改频繁时,内存中数据不断被修改的速度大于KVM能够传输的内存速度时,动态迁移的过程是完成不了的,这时候只能静态迁移

优点:软件和硬件系统的维护升级,不会影响用户的关键服务,提高了服务的高可用性和 用户的满意度。
缺点:过程不可中断,操作复杂(良好的网络环境,要不有可能丢包)。
名称主机规划内存热迁移技术实现方式网络虚拟化
KVM0110.0.0.114Gvirt-manager 进行动态迁移NATKVM
KVM0210.0.0.122Gquem+tcp 进行动态迁移NATKVM
KVM0310.0.0.132GNFS 进行动态迁移NATKVM
KVM0410.0.0.142Gwebvirtmgr 进行动态迁移NATKVM
KVM0510.0.0.152Gvirt-v2v 进行动态迁移NATKVM

0x2 P2V迁移

0x3 企业迁移案例

1 VM在KVM集群服务器之间的迁移(冷迁移技术)
  • 步骤
  • 第一步 virsh list --all查看当前虚拟机状态
  • 第二步 virsh shutdowm 你要迁移的虚拟机
  • 第三步 virsh domblklist 虚拟机名称 获得虚拟机虚拟硬盘算在位置
  • 第四步 virsh dumpxml 导出需要迁移的虚拟机配置文件
  • 第五步 rsync -avz -P /vm_data/disk/xxx root@10.0.0.12:/vm_data/disk
  • 第六步 virsh define xxx.xml virsh start xxx
2 VM在KVM集群服务器之间的迁移(webvirtmgr)
名称主机规划内存软件需求网络虚拟化
KVM0110.0.0.1432Core 2GKVM+WebVirtMgrNATKVM
KVM0210.0.0.1444Core 8GKVMNATKVM
KVM0310.0.0.1454Core 8GKVMNATKVM
  1. 步骤一:
  2. 需要在kvm01 kvm02 kvm03上配置host文件本地解析
  3. vim /etc/hosts
  4. 10.0.0.143 kvm01
  5. 10.0.0.144 kvm02
  6. 10.0.0.145 kvm03

步骤二:
在kvm01机器上免密登陆kvm02,kvm03。

  1. [root@localhost conf.d]# su -s /bin/bash nginx
  2. bash-4.2$ ssh-copy-id root@10.0.0.144 #kvm02机的免密
  3. /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/var/lib/nginx/.ssh/id_rsa.pub"
  4. The authenticity of host '10.0.0.143 (10.0.0.143)' can't be established.
  5. ECDSA key fingerprint is SHA256:N99fAx5OoDgmMhJEIaDDT4aPn4cusNFjs5xCmD9cDwc.
  6. ECDSA key fingerprint is MD5:e3:d3:fc:9b:51:56:0d:20:5b:16:1e:1c:b4:38:a1:38.
  7. Are you sure you want to continue connecting (yes/no)? yes
  8. /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
  9. /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
  10. root@10.0.0.143's password:
  11. Number of key(s) added: 1
  12. Now try logging into the machine, with: "ssh 'root@10.0.0.144'"
  13. and check to make sure that only the key(s) you wanted were added.
  14. bash-4.2$ ssh-copy-id root@10.0.0.145 #kvm03机器免密
  15. /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/var/lib/nginx/.ssh/id_rsa.pub"
  16. The authenticity of host '10.0.0.143 (10.0.0.143)' can't be established.
  17. ECDSA key fingerprint is SHA256:N99fAx5OoDgmMhJEIaDDT4aPn4cusNFjs5xCmD9cDwc.
  18. ECDSA key fingerprint is MD5:e3:d3:fc:9b:51:56:0d:20:5b:16:1e:1c:b4:38:a1:38.
  19. Are you sure you want to continue connecting (yes/no)? yes
  20. /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
  21. /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
  22. root@10.0.0.143's password:
  23. Number of key(s) added: 1
  24. Now try logging into the machine, with: "ssh 'root@10.0.0.145'"
  25. and check to make sure that only the key(s) you wanted were added.

webvirtmgr管理三台服务器 kvm01-当管理机器,纳管kvm02 kvm03机,形成KVM集群

001.png

方法就是浏览器输入10.0.0.143这是kvm01管理机器的IP地址
点击右上角绿色 Add Connection按钮 添加连接
002.png

注意:这里选择SSH连接,我们已经做过免密登陆了。
Label:10.0.0.144
FQDN/IP:10.0.0.144
用户名:root
添加完毕以后重复该步骤
Label:10.0.0.145
FQDN/IP:10.0.0.145
用户名:root
添加完毕以后效果如图
001.png

步骤三:点击10.0.0.144红色区域
003.png

出现以后点击要迁移的虚拟机名称
004.png

进入以后点击启动按钮开启虚拟机
005.png

启动虚拟机


006.png

开始迁移
007.png

迁移过程中会关闭源服务器的虚拟机,在目标服务器上打开
008.png

点击控制台
006.png
3 VMWare ESXi服务器迁移到KVM
virt-v2v是将外部的虚拟化平台上的虚拟机转化到可以运行的KVM平台上。它可以读取在VMware、Xen运行Hyper-V和其他虚拟机管理程序上的Windows和Linux的虚拟机,并将其转换为KVM的libvirt,OpenStack等几种方式
  1. yum install libvirt* virt-* qemu-kvm* -y
  2. [root@kvm02 ~]# yum install libvirt* virt-* qemu-kvm* -y
  3. Loaded plugins: fastestmirror
  4. Loading mirror speeds from cached hostfile
  5. epel/x86_64/metalink | 9.4 kB 00:00:00
  6. * base: mirrors.aliyun.com
  7. * epel: mirrors.yun-idc.com
  8. * extras: mirrors.aliyun.com
  9. * updates: mirrors.aliyun.com
  10. base | 3.6 kB 00:00:00
  11. epel | 5.3 kB 00:00:00
  12. extras | 2.9 kB 00:00:00
  13. updates | 2.9 kB 00:00:00
  14. (1/2): epel/x86_64/updateinfo | 1.0 MB 00:00:00
  15. (2/2): epel/x86_64/primary_db | 6.9 MB 00:00:02
  16. Package libvirt-glib-1.0.0-1.el7.x86_64 already installed and latest version
  17. Package libvirt-daemon-driver-storage-logical-4.5.0-23.el7_7.3.x86_64 already installed and latest version
  18. Package libvirt-daemon-driver-qemu-4.5.0-23.el7_7.3.x86_64 already installed and latest version
  19. Package libvirt-daemon-driver-storage-core-4.5.0-23.el7_7.3.x86_64 already installed and latest version
  20. Package libvirt-daemon-driver-nwfilter-4.5.0-23.el7_7.3.x86_64 already installed and latest version
  21. Package libvirt-daemon-driver-lxc-4.5.0-23.el7_7.3.x86_64 already installed and latest version
  22. Package libvirt-daemon-driver-secret-4.5.0-23.el7_7.3.x86_64 already installed and latest version
  23. Package libvirt-daemon-4.5.0-23.el7_7.3.x86_64 already installed and latest version
  24. Package libvirt-daemon-config-nwfilter-4.5.0-23.el7_7.3.x86_64 already installed and latest version
  25. Package libvirt-daemon-driver-storage-4.5.0-23.el7_7.3.x86_64 already installed and latest version
  26. Package libvirt-daemon-driver-interface-4.5.0-23.el7_7.3.x86_64 already installed and latest version
  27. Package libvirt-bash-completion-4.5.0-23.el7_7.3.x86_64 already installed and latest version
  28. Package libvirt-daemon-driver-storage-mpath-4.5.0-23.el7_7.3.x86_64 already installed and latest version
  29. Package libvirt-python-4.5.0-1.el7.x86_64 already installed and latest version
  30. Package libvirt-daemon-driver-storage-gluster-4.5.0-23.el7_7.3.x86_64 already installed and latest version
  31. Package libvirt-daemon-driver-storage-disk-4.5.0-23.el7_7.3.x86_64 already installed and latest version
  32. Package libvirt-daemon-driver-storage-scsi-4.5.0-23.el7_7.3.x86_64 already installed and latest version
  33. Package libvirt-client-4.5.0-23.el7_7.3.x86_64 already installed and latest version
  34. Package libvirt-4.5.0-23.el7_7.3.x86_64 already installed and latest version
  35. Package libvirt-daemon-config-network-4.5.0-23.el7_7.3.x86_64 already installed and latest version
  36. Package libvirt-daemon-driver-network-4.5.0-23.el7_7.3.x86_64 already installed and latest version
  37. Package libvirt-libs-4.5.0-23.el7_7.3.x86_64 already installed and latest version
  38. Package libvirt-daemon-kvm-4.5.0-23.el7_7.3.x86_64 already installed and latest version
  39. Package libvirt-daemon-driver-storage-rbd-4.5.0-23.el7_7.3.x86_64 already installed and latest version
  40. Package libvirt-daemon-driver-storage-iscsi-4.5.0-23.el7_7.3.x86_64 already installed and latest version
  41. Package libvirt-daemon-driver-nodedev-4.5.0-23.el7_7.3.x86_64 already installed and latest version
  42. Package virt-manager-common-1.5.0-7.el7.noarch already installed and latest version
  43. Package virt-manager-1.5.0-7.el7.noarch already installed and latest version
  44. Package virt-install-1.5.0-7.el7.noarch already installed and latest version
  45. Package virt-what-1.18-4.el7.x86_64 already installed and latest version
  46. Package virt-viewer-5.0-15.el7.x86_64 already installed and latest version
  47. Package 10:qemu-kvm-common-1.5.3-167.el7_7.1.x86_64 already installed and latest version
  48. Package 10:qemu-kvm-1.5.3-167.el7_7.1.x86_64 already installed and latest version
  49. #次数省略N多行
  50. Dependency Installed:
  51. OVMF.noarch 0:20180508-6.gitee3198e672e2.el7
  52. PyYAML.x86_64 0:3.10-11.el7
  53. augeas.x86_64 0:1.4.0-9.el7
  54. copy-jdk-configs.noarch 0:3.3-10.el7_5
  55. giflib.x86_64 0:4.1.6-9.el7
  56. glib2-devel.x86_64 0:2.56.1-5.el7
  57. gtk2.x86_64 0:2.24.31-1.el7
  58. java-1.8.0-openjdk.x86_64 1:1.8.0.232.b09-0.el7_7
  59. java-1.8.0-openjdk-headless.x86_64 1:1.8.0.232.b09-0.el7_7
  60. javapackages-tools.noarch 0:3.4.1-11.el7
  61. jna.x86_64 0:3.5.2-8.el7
  62. libcmpiutil.x86_64 0:0.5.7-3.el7
  63. libfontenc.x86_64 0:1.1.3-3.el7
  64. libguestfs-winsupport.x86_64 0:7.2-3.el7
  65. libxml2-devel.x86_64 0:2.9.1-6.el7_2.3
  66. libyaml.x86_64 0:0.1.4-11.el7_0
  67. lksctp-tools.x86_64 0:1.0.17-2.el7
  68. lm_sensors-libs.x86_64 0:3.4.0-8.20160601gitf9185e5.el7
  69. m2crypto.x86_64 0:0.21.1-17.el7
  70. nbdkit.x86_64 0:1.8.0-1.el7
  71. nbdkit-plugin-python-common.x86_64 0:1.8.0-1.el7
  72. nbdkit-plugin-python2.x86_64 0:1.8.0-1.el7
  73. nbdkit-plugin-vddk.x86_64 0:1.8.0-1.el7
  74. net-snmp-agent-libs.x86_64 1:5.7.2-43.el7
  75. net-snmp-libs.x86_64 1:5.7.2-43.el7
  76. openslp.x86_64 1:2.0.0-8.el7_7
  77. pcre-devel.x86_64 0:8.32-17.el7
  78. pcsc-lite-libs.x86_64 0:1.8.8-8.el7
  79. python-dateutil.noarch 0:1.5-7.el7
  80. python-javapackages.noarch 0:3.4.1-11.el7
  81. python-lxml.x86_64 0:3.2.1-4.el7
  82. python-suds.noarch 0:0.4.1-5.el7
  83. sanlock.x86_64 0:3.7.3-1.el7
  84. sanlock-lib.x86_64 0:3.7.3-1.el7
  85. subscription-manager-rhsm.x86_64 0:1.24.13-3.el7.centos
  86. subscription-manager-rhsm-certificates.x86_64 0:1.24.13-3.el7.centos
  87. systemd-python.x86_64 0:219-67.el7_7.2
  88. tog-pegasus.x86_64 2:2.14.1-7.el7
  89. tog-pegasus-libs.x86_64 2:2.14.1-7.el7
  90. ttmkfdir.x86_64 0:3.0.9-42.el7
  91. tzdata-java.noarch 0:2019c-1.el7
  92. unzip.x86_64 0:6.0-20.el7
  93. xorg-x11-font-utils.x86_64 1:7.5-21.el7
  94. xorg-x11-fonts-Type1.noarch 0:7.5-9.el7
  95. xz-devel.x86_64 0:5.2.2-1.el7
  96. zlib-devel.x86_64 0:1.2.7-18.el7
  97. Dependency Updated:
  98. glib2.x86_64 0:2.56.1-5.el7 systemd.x86_64 0:219-67.el7_7.2 systemd-libs.x86_64 0:219-67.el7_7.2
  99. systemd-sysv.x86_64 0:219-67.el7_7.2
  100. Complete!
  101. #至此KVM+QEMU所有组件安装完毕!
  102. #执行
  103. virt-v2v -help
  104. [root@kvm02 ~]# virt-v2v -help
  105. virt-v2v: convert a guest to use KVM
  106. virt-v2v -ic vpx://vcenter.example.com/Datacenter/esxi -os imported esx_guest
  107. virt-v2v -ic vpx://vcenter.example.com/Datacenter/esxi esx_guest -o rhv -os rhv.nfs:/export_domain --network ovirtmgmt
  108. virt-v2v -i libvirtxml guest-domain.xml -o local -os /var/tmp
  109. virt-v2v -i disk disk.img -o local -os /var/tmp
  110. virt-v2v -i disk disk.img -o glance
  111. There is a companion front-end called "virt-p2v" which comes as an
  112. ISO or CD image that can be booted on physical machines.
  113. A short summary of the options is given below. For detailed help please
  114. read the man page virt-v2v(1).
  115. Options:
  116. -b, --bridge <in:out> Map bridge ‘into ‘out’
  117. --color, --colors, --colour, --colours
  118. Use ANSI colour sequences even if not tty
  119. --compressed Compress output file (-of qcow2 only)
  120. --debug-overlay, --debug-overlays Save overlay files
  121. --echo-keys Don’t turn off echo for passphrases
  122. --help Display brief help
  123. -i <disk|libvirt|libvirtxml|ova|vmx>
  124. Set input mode (default: libvirt)
  125. -ic <uri> Libvirt URI
  126. -if <format> Input format (for -i disk)
  127. -io <option[=value]> Set option for input mode
  128. -ip <filename> Use password from file to connect to input hypervisor
  129. -it <transport> Input transport
  130. --key <SELECTOR> Specify a LUKS key
  131. --keys-from-stdin Read passphrases from stdin
  132. --mac <mac:network|bridge:out> Map NIC to network or bridge
  133. --machine-readable[=format] Make output machine readable
  134. -n, --network <in:out> Map network ‘into ‘out’
  135. --no-copy Just write the metadata
  136. --no-trim <-> Ignored for backwards compatibility
  137. -o <glance|libvirt|local|null|openstack|qemu|rhv|rhv-upload|vdsm>
  138. Set output mode (default: libvirt)
  139. -oa <sparse|preallocated> Set output allocation mode
  140. -oc <uri> Output hypervisor connection
  141. -of <raw|qcow2> Set output format
  142. -on <name> Rename guest when converting
  143. -oo <option[=value]> Set option for output mode
  144. -op <filename> Use password from file to connect to output hypervisor
  145. -os <storage> Set output storage location
  146. --password-file <filename> Same as ‘-ip filename’
  147. --print-estimate Estimate size of source and stop
  148. --print-source Print source and stop
  149. -q, --quiet Don’t print progress messages
  150. --root <ask|... > How to choose root filesystem
  151. -V, --version Display version and exit
  152. -v, --verbose Enable libguestfs debugging messages
  153. --vddk-config <filename> Same as ‘-io vddk-config=filename’
  154. --vddk-cookie <cookie> Same as ‘-io vddk-cookie=filename’
  155. --vddk-libdir <libdir> Same as ‘-io vddk-libdir=libdir’
  156. --vddk-nfchostport <nfchostport> Same as ‘-io vddk-nfchostport=nfchostport’
  157. --vddk-port <port> Same as ‘-io vddk-port=port’
  158. --vddk-snapshot <snapshot-moref> Same as ‘-io vddk-snapshot=snapshot-moref’
  159. --vddk-thumbprint <thumbprint> Same as ‘-io vddk-thumbprint=thumbprint’
  160. --vddk-transports <transports> Same as ‘-io vddk-transports=transports’
  161. --vdsm-compat <0.10|1.1> Same as ‘-oo vdsm-compat=0.10|1.1
  162. --vdsm-image-uuid <uuid> Same as ‘-oo vdsm-image-uuid=uuid’
  163. --vdsm-ovf-flavour <ovirt|rhvexp> Same as ‘-oo vdsm-ovf-flavour=flavour’
  164. --vdsm-ovf-output <dir> Same as ‘-oo vdsm-ovf-output=dir’
  165. --vdsm-vm-uuid <uuid> Same as ‘-oo vdsm-vm-uuid=uuid’
  166. --vdsm-vol-uuid <uuid> Same as ‘-oo vdsm-vol-uuid=uuid’
  167. --vmtype <-> Ignored for backwards compatibility
  168. -x Enable tracing of libguestfs calls
  169. [root@kvm02 ~]#
  170. #证明安装virt-v2v成功!

通过V2V方式迁移

  1. cd /vm_data/v2v/
  2. virt-v2v-copy-to-local -ic esx://root@10.0.0.130?no_verify=1 Centosx64_ESXi
  3. virt-v2v -i libvirtxml Centosx64_ESXi.xml -o local -os /vm_data/v2v/ -of raw
  4. [root@kvm02 v2v]# virt-v2v-copy-to-local -ic esx://root@10.0.0.130?no_verify=1 Centosx64_ESXi
  5. [ 0.0] Fetching the remote libvirt XML metadata ...
  6. 2020-01-08 15:17:16.837+0000: 13731: info : libvirt version: 4.5.0, package: 23.el7_7.3 (CentOS BuildSystem <http://bugs.centos.org>, 2019-12-02-17:45:06, x86-02.bsys.centos.org)
  7. 2020-01-08 15:17:16.837+0000: 13731: info : hostname: kvm02
  8. 2020-01-08 15:17:16.837+0000: 13731: warning : esxConnectOpen:857 : Ignoring unexpected path '' for non-vpx scheme 'esx'
  9. Enter root's password for 10.0.0.130:
  10. [ 7.9] Parsing the remote libvirt XML metadata ...
  11. Enter host password for user 'root':
  12. Enter host password for user 'root':
  13. [ 18.8] Copying remote disk 1/1 to Centosx64_ESXi-disk1
  14. % Total % Received % Xferd Average Speed Time Time Time Current
  15. Dload Upload Total Spent Left Speed
  16. 100 10.0G 100 10.0G 0 0 55.6M 0 0:03:03 0:03:03 --:--:-- 50.9M
  17. [ 202.8] Writing libvirt XML metadata to Centosx64_ESXi.xml ...
  18. [ 202.8] Finishing off
  19. [root@kvm02 v2v]# ls
  20. Centosx64_ESXi-disk1 Centosx64_ESXi.xml
  21. [root@kvm02 v2v]# virt-v2v -i libvirtxml Centosx64_ESXi.xml -o local -os /vm_data/v2v/ -of raw
  22. [ 0.0] Opening the source -i libvirtxml Centosx64_ESXi.xml
  23. [ 0.0] Creating an overlay to protect the source from being modified
  24. [ 0.1] Opening the overlay
  25. [ 4.2] Inspecting the overlay
  26. [ 11.7] Checking for sufficient free disk space in the guest
  27. [ 11.7] Estimating space required on target for each disk
  28. [ 11.7] Converting CentOS Linux release 7.6.1810 (Core) to run on KVM
  29. virt-v2v: This guest has virtio drivers installed.
  30. [ 41.3] Mapping filesystem data to avoid copying unused and blank areas
  31. [ 41.8] Closing the overlay
  32. [ 42.1] Assigning disks to buses
  33. [ 42.1] Checking if the guest needs BIOS or UEFI to boot
  34. [ 42.1] Initializing the target -o local -os /vm_data/v2v/
  35. [ 42.1] Copying disk 1/1 to /vm_data/v2v/Centosx64_ESXi-sda (raw)
  36. (100.00/100%)
  37. [ 50.6] Creating output metadata
  38. [ 50.6] Finishing off

迁移完毕

  1. virsh define Centosx64_ESXi.xml
  2. [root@kvm02 v2v]# virsh list --all
  3. Id Name State
  4. ----------------------------------------------------
  5. - Centos7x64_1810 shut off
  6. - Centosx64_ESXi shut off

【友情提示】需要注意迁移虚拟机的网络状态,源虚拟机如果是桥接,迁移后需要编辑XML文件确定网络的连接方式。

  1. <interface type='bridge'>
  2. <mac address='00:0c:29:7a:fd:a7'/>
  3. <source bridge='VM Network'/>
  4. <model type='virtio'/>
  5. <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
  6. </interface>

改成默认网络模式即可上网Ping 通百度

  1. <interface type='network'>
  2. <mac address='52:54:00:e8:c3:2b'/>
  3. <source network='default'/>
  4. <model type='virtio'/>
  5. <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
  6. </interface>
4 XEN服务器迁移到KVM

方法同ESXi迁移方式!!!

5 KVM迁移到VMWare ESXi服务器(待续)
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Gausst松鼠会/article/detail/391140
推荐阅读
相关标签
  

闽ICP备14008679号