1.1.1 ESXI将虚拟机导出

导出ova模板

将导出的ova模板导入到KVM环境中。

1.1.2 配置KVM环境

详情参考:http://www.cnblogs.com/clsn/p/8366251.html

安装所需要的组件

[root@clsn7 ~]# yum install libvirt* virt-* qemu-kvm* -y

配置桥接网卡

[root@clsn7 ~]# virsh iface-bridge eth1 br1
使用附加设备 br1 生成桥接 eth1 失败
已启动桥接接口 br1

1.1.3 导入虚拟机

启动kvm管理程序,并设置开机自启动

[root@clsn7 ~]# systemctl start libvirtd.service
[root@clsn7 ~]# systemctl enable libvirtd.service

创建虚拟机存放目录

[root@clsn7 ~]# virt-v2v -i ova centos-dev-test01-v2v.ova -o local -os /vmhost/dev/dev-test01  -of qcow2
[   0.0] Opening the source -i ova centos-dev-test01-v2v.ova
virt-v2v: warning: making OVA directory public readable to work around
libvirt bug https://bugzilla.redhat.com/1045069
[  23.1] Creating an overlay to protect the source from being modified
[  23.4] Initializing the target -o local -os /vmhost/dev/dev-test01
[  23.4] Opening the overlay
[  41.4] Inspecting the overlay
[  57.5] Checking for sufficient free disk space in the guest
[  57.5] Estimating space required on target for each disk
[  57.5] Converting CentOS release 6.9 (Final) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[ 178.6] Mapping filesystem data to avoid copying unused and blank areas
[ 178.9] Closing the overlay
[ 179.4] Checking if the guest needs BIOS or UEFI to boot
[ 179.4] Assigning disks to buses
[ 179.4] Copying disk 1/1 to /vmhost/dev/dev-test01/centos-dev-test01-v2v-sda (qcow2)(100.00/100%)
[ 216.1] Creating output metadata
[ 216.1] Finishing off

导入完成后在 /vmhost/dev/dev-test01 目录下会生成文件

[root@clsn7 dev-test01]# pwd
/vmhost/dev/dev-test01
[root@clsn7 dev-test01]# ls
centos-dev-test01-v2v-sda  centos-dev-test01-v2v.xml

修改网卡配置

  修改网卡source network 为桥接

  修改网卡使用virtio

[root@clsn7 dev-test01]# cat centos-dev-test01-v2v.xml
<?xml version='1.0' encoding='utf-8'?>
<domain type='kvm'><!-- generated by virt-v2v 1.36.3rhel=7,release=6.el7_4.3,libvirt --><name>centos-dev-test01-v2v</name><memory unit='KiB'>524288</memory><currentMemory unit='KiB'>524288</currentMemory><vcpu>1</vcpu><features><acpi/><apic/></features><os><type arch='x86_64'>hvm</type></os><on_poweroff>destroy</on_poweroff><on_reboot>restart</on_reboot><on_crash>restart</on_crash><devices><disk type='file' device='disk'><driver name='qemu' type='qcow2' cache='none'/><source file='/vmhost/dev/dev-test01/centos-dev-test01-v2v-sda'/><target dev='vda' bus='virtio'/></disk><disk device='cdrom' type='file'><driver name='qemu' type='raw'/><target dev='hda' bus='ide'/></disk><disk device='floppy' type='file'><driver name='qemu' type='raw'/><target dev='fda'/></disk>
    <interface type='bridge'><source bridge='br1'/><model type='virtio'/><address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/></interface><video><model type='qxl' ram='65536' heads='1'/></video><graphics type='vnc' autoport='yes' port='-1'/><input type='tablet' bus='usb'/><input type='mouse' bus='ps2'/><console type='pty'/></devices>
</domain>

1.1.4 启动虚拟机

导入主机

[root@clsn7 dev-test01]# virsh  define centos-dev-test01-v2v.xml
定义域 centos-dev-test01-v2v(从 centos-dev-test01-v2v.xml)

查看主机列表

[root@clsn7 dev-test01]#  virsh list --all
 Id    名称                         状态
-----------------------------------------------------     centos-dev-test01-v2v          关闭

启动主机

[root@clsn7 dev-test01]#  virsh start centos-dev-test01-v2v
域 centos-dev-test01-v2v 已开始

1.1.5 测试可用性

登陆迁移后的虚拟机测试

[root@clsn7 ~]# ssh root@192.168.19.123
The authenticity of host '192.168.19.123 (192.168.19.123)' can't be established.
RSA key fingerprint is SHA256:iRmghFzgRIJy5+v8p4lqi8DyUG8F0hXR/qNdDZ2J6RY.
RSA key fingerprint is MD5:37:b8:56:3b:b7:85:fa:cb:d9:55:a7:44:d5:de:f8:d9.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.19.123' (RSA) to the list of known hosts.
root@192.168.19.123's password:
Last login: Mon Mar  5 10:30:02 2018 from 192.168.19.9
[root@dev-test01 ~]# hostname  -I
192.168.19.123

  设置虚拟机开机自启动。

[root@clsn7 ~]# virsh autostart centos-dev-test01-v2v
域 centos-dev-test01-v2v标记为自动开始

至此一台机器的迁移完成,后续按照相同的方式将其他的虚拟机进行迁移即可。

ESXI 迁移至KVM (V2V迁移)相关推荐

  1. KVM 虚拟机在物理主机之间迁移的实现 -- 静态迁移/动态迁移/存储迁移

    原文转自:http://www.ibm.com/developerworks/cn/linux/l-cn-mgrtvm2/ 静态迁移 静态迁移:也叫做常规迁移.离线迁移(Offline Migrati ...

  2. 服务器虚拟化中的系统迁移一——V2V迁移

    笔者通过部署基于KVM技术的虚拟化平台(EASTEDvServer),充分利用现有设备实现对现有服务器的虚拟化改造,并将原有运行在VMware上的虚拟化机和物理机成功迁移的新的平台. 什么是虚拟机系统 ...

  3. V2V迁移测试--VMware/VSphere环境迁移至KVM

    前言 v2v(virtual machine to virtual machine)是通过各种手段将不同平台的虚拟机进行迁移的一种方式.现在常见的迁移有 VMware –> KVM KVM –& ...

  4. kvm虚拟化学习笔记(十七)之KVM到KVM之v2v迁移

    1.源KVM虚拟主机node1 (1).查看源KVM虚拟主机上的虚拟机列表,本文计划将CentOS6.5-01虚拟机迁移到其它KVM虚拟主机中. [root@node1 ~]# virsh list ...

  5. kvm虚拟机安装esxi服务器,VMware vSphere虚拟机迁移至KVM virt-v2v方案

    VMware虚拟机迁移至KVM涉及到磁盘格式转换,因为VMware虚拟机使用的是VMFS文件系统,对应到虚拟机磁盘是VMDK.而KVM使用RAW或者qcow2的格式较多.格式转换那必须离线进行.之前试 ...

  6. 通过virt-v2v将VMware ESXi 5中的vm迁移至kvm中

    环境说明 Vmware Esxi 5.5 virt-v2v 1.28 kvm host:Centos 7.2 vm:Windows Server 2003 在很多文章中看见过通过virt-v2v连接e ...

  7. 如何使用一台PC搭建可以在线迁移的KVM学习环境

    本文解答以下问题: 如何用一台PC搭建KVM虚拟机的在线迁移实验环境? 如果对虚拟化是零知识,应该学习VMWare.XEN.HyperV还是KVM,或者是容器技术? 如何用一台PC搭建KVM虚拟机的在 ...

  8. P2V、V2V迁移总结

    最近在做P2V.V2V迁移,现在将迁移问题进行总结一下 物理机迁移到kvm中 本次迁移所选用的系统是centos7.5,安装P2V.V2V以及virtio-win等rpm包.刻录virt-p2v 镜像 ...

  9. 【KVM系列08】使用 libvirt 迁移 QEMU/KVM 虚机和 Nova 虚机

    第八章 使用 libvirt 迁移 QEMU/KVM 虚机和 Nova 虚机 1. QEMU/KVM 迁移的概念 1.1 迁移效率的衡量 1.2 KVM 迁移的原理 1.3 使用命令行的方式做动态迁移 ...

最新文章

  1. linux改组ID号会对数据库有影响么,truncate操作导致DATA_OBJECT_ID改变
  2. MongoDB —— 概念简述
  3. 用于软件包管理的21个Linux YUM命令
  4. Vue提供操作DOM的方法
  5. 【需求工程】需求依赖矩阵
  6. WF4.0 Beta1 CancellationScope 取消容器
  7. linux下部署tomcat的备忘
  8. Mac上安装fastboot等工具与烧写images
  9. Microsoft .NET Framework 3.5 SP1 简体中文精简版+.net
  10. DayDayUp:计算机技术与软件专业技术资格证书之《系统集成项目管理工程师》课程讲解之十大知识领域之4辅助—项目采购管理
  11. 云IDE:CodeSandbox: 快速进行前端开发的云IDE
  12. swfupload 无法加载_文件上传插件SWFUpload的使用指南
  13. cadence/allegro文件不能双击直接打开解决办法
  14. 2.(leaflet篇)leaflet加载接入百度地图
  15. Ubuntu实时监控网速、CPU、内存
  16. dw怎么在框架中加入网页_Dreamweaver如何用框架建立网站
  17. python学习笔记6--双色球需求实现
  18. 排队叫号python编程_排队叫号系统源程序
  19. ReactNative连接android模拟器
  20. 独立站运营 | 聊天聚合部件,助你提升100%私域转化率

热门文章

  1. [像素大厨PxCood下载安装]
  2. 这样回答离职原因,一定没问题!
  3. screentogif 录屏
  4. 信息收集之——旁站、C段
  5. 高校邦java_高校邦Java核心开发技术【实境编程】答案
  6. 超市库存管理系统 代码
  7. Python----Python之禅
  8. oracle字段名命名规范,oracle 表字段命名规范
  9. 《人人都是产品经理》——摘录之产品经理的角色认知
  10. VC2005断点进阶