Centos7下通过virt-v2v将libvirt管理下的vm迁移至ovirt中

3 篇文章 0 订阅

操作环境

ovirt 4.0

virt-v2v 1.28

Centos 7

操作说明

     
        现有一台kvm宿主机10.10.200.227,上面有通过libvirt管理的多台vm,需要将上面的一台Centos 7 guest主机迁移至ovirt虚拟化平台中。
    

        ovirt环境说明:
  
        ovirt-engine:10.10.200.229

        ovirt-host:10.10.200.228

        ovirt-storage:10.10.200.43,这里使用的nfs存储,export存储路径为10.10.200.43:/home/nfs


操作步骤

1.配置ovirt的export存储域

在ovirt-engine中新建export的存储域


2.查看kvm宿主主机中的vm,并选择一台vm进行迁移

[root@ovirt-host-227 ~]# virsh list --all
 Id    Name                           State
----------------------------------------------------
 2     windows2008                    running
 -     Centos7                        shut off
 -     Centos7-2                      shut off
 -     windows2003                    shut off
 -     windows2008-1                  shut off
 -     windows2008-vmware             shut off

在这里我们选择Centos7这台vm进行迁移,在迁移需要在宿主服务器上安装virt-v2v

#yum -y install virt-v2v

下面我们通过virt-v2v进行迁移Centos7这台vm,-os参数后面的存储路径为前面配置的export存储域的存储路径,--network的参数为vnet,ovirt中的vnet名称一般都为ovirtmgmt

[root@ovirt-host-227 ~]# virt-v2v -i libvirt -o rhev -os 10.10.200.43:/home/nfs --network ovirtmgmt Centos7
[   0.0] Opening the source -i libvirt Centos7
[   0.0] Creating an overlay to protect the source from being modified
[   0.0] Opening the overlay
[   5.0] Initializing the target -o rhev -os 10.10.200.43:/home/nfs
[   5.0] Inspecting the overlay
[  18.0] Checking for sufficient free disk space in the guest
[  18.0] Estimating space required on target for each disk
[  18.0] Converting CentOS Linux release 7.2.1511 (Core)  to run on KVM
virt-v2v: This guest has virtio drivers installed.
[  56.0] Mapping filesystem data to avoid copying unused and blank areas
[  58.0] Closing the overlay
[  58.0] Checking if the guest needs BIOS or UEFI to boot
[  58.0] Copying disk 1/1 to /tmp/v2v.jXKwCN/3dfea236-3b8a-4da8-b8bf-fae9768045e4/images/c271532e-d60e-41f1-b577-bf7f0cdf9533/819dbc8a-37c7-432e-a36f-539d39bf879e (qcow2)
    (100.00/100%)
[ 104.0] Creating output metadata
[ 104.0] Finishing off

3,数据迁移完成后,我们在ovirt-engine中将vm添加至ovirt中




在添加完成后,可以在ovirt-engine的虚拟机这一栏,看见Centos7名称的vm,



在刚刚添加的时候,vm处于import状态,需要等一段时间,待日志提示已经imported success后,我们可以启动该vm,第一次启动相对耗时较长,待vm启动后,可以查看的为

up状态








  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值