当前位置 : 主页 > 操作系统 > centos >

Migrate VMware to OLVM

来源:互联网 收集:自由互联 发布时间:2022-06-20
Migrate VMware to OLVM vSphere to OLVM(v2v Not Support) 不支持单机ESXi,需受管vCenter进行迁移 迁移前准备 针对ESXi 6.7下的test-win01进行迁移。 目标KVM主机安装所需组件 [root@ol7-kvm01 ~] # yum install

Migrate VMware to OLVM

vSphere to OLVM(v2v Not Support)

不支持单机ESXi,需受管vCenter进行迁移

迁移前准备

针对ESXi 6.7下的test-win01进行迁移。

Migrate VMware to OLVM_linux


目标KVM主机安装所需组件

[root@ol7-kvm01 ~]# yum install oraclelinux-developer-release-el7 yum-utils -y
[root@ol7-kvm01 ~]# yum-config-manager --enable ol7_developer_kvm_utils
[root@ol7-kvm01 ~]# yum install qemu-block-curl -y

拷贝OLVM证书到KVM服务器

[root@ol7-kvm01 ~]# scp 192.168.137.51:/etc/pki/ovirt-engine/ca.pem /root/v2v/ca.pem


生成用于连接OLVM API及ESXi的密码文件

[root@ol7-kvm01 ~]# echo "P@ss0lvm" > /root/v2v/ovirt-admin-password
[root@ol7-kvm01 ~]# echo "<vmware-admin-password>" > /root/v2v/vmware-admin-password

连接测试

KVM主机连接测试(连接到VMware EXS driver)

# virsh -c vpx:// vsphere-domain>%5c<vsphere-user>@<vsphere-host>/Datacenter//<vsphere-datacenter-name>?no_verify=1 list –all

vpx://example-vcenter.com/dc1/srv1 (VPX over HTTPS, select ESX server 'srv1' in datacenter 'dc1')
esx://example-esx.com (ESX over HTTPS)
gsx://example-gsx.com (GSX over HTTPS)
esx://example-esx.com/?transport=http (ESX over HTTP)
esx://example-esx.com/?no_verify=1 (ESX over HTTPS, but doesn't verify the server's SSL certificate)

Example:

Migrate VMware to OLVM_linux_02


关闭需迁移主机

迁移过程需对test-win01关机操作

Migrate VMware to OLVM_linux_03


开始迁移

export LIBGUESTFS_BACKEND=direct

# virt-v2v -ic vpx://<vsphere-domain>%5c<vsphere-user>@<vsphere-host>/Datacenter/<vsphere-datacenter-name>?no_verify=1 <vm-name> --password-file /root/v2v/vmware-admin-password -o rhv-upload -oc https://<olvm-fqdn-host>/ovirt-engine/api -os <olvm-storage-domain> -op /root/v2v/ovirt-admin-password -oo rhv-cafile=/root/v2v/ca.pem -oo rhv-cluster=<olvm-cluster-name> -of raw -oo rhv-direct --bridge <olvm-bridge-name>

Example:

[root@ol7-kvm01 ~]# cat /etc/hosts
192.168.137.51 ol7-olvm
192.168.137.61 ol7-kvm01
[root@ol7-kvm01 ~]# export LIBGUESTFS_BACKEND=direct
[root@ol7-kvm01 ~]# virt-v2v -ic esx://root@172.19.201.1?no_verify=1 test-win01 --password-file /root/v2v/vmware-admin-password -o rhv-upload -oc https://ol7-olvm/ovirt-engine/api -os vmware-data -op /root/v2v/ovirt-admin-password -oo rhv-cafile=/root/v2v/ca.pem -oo rhv-cluster="Default" -of raw -oo rhv-direct --bridge ovirtmgmt -oa preallocated


迁移失败(不支持单机ESXi,需受管vCenter进行迁移)

Migrate VMware to OLVM_olvm_04


​​https://libguestfs.org/virt-v2v-support.1.html​​

Migrate VMware to OLVM_olvm_05


vSphere to OLVM (convert ova to raw)

关闭需迁移主机

针对ESXi 6.7下的test-win01进行迁移。(需关机状态)

Migrate VMware to OLVM_olvm_06


下载安装OVF Tool

由于无法直接从Web Client导出ovf文件,VMware提供了ovf工具来实现ova档的汇出

​​https://my.vmware.com/group/vmware/downloads/details?productId=614&downloadGroup=OVFTOOL420​​


以下将在linux环境导出ESXi VM主机ova文件,也可下载windows版本在cmd下进行导出

Migrate VMware to OLVM_olvm_07


将安装文件上传到Linux主机,并执行安装

[root@ol7-kvm01 vmware]# chmod +x VMware-ovftool-4.2.0-5965791-lin.x86_64.bundle
[root@ol7-kvm01 vmware]# ./VMware-ovftool-4.2.0-5965791-lin.x86_64.bundle

Example:

Migrate VMware to OLVM_linux_08

Migrate VMware to OLVM_migrate_09


导出ova文件

[root@ol7-kvm01 vmware]# ovftool vi://root@172.19.201.1/test-win01 test-win01.ova

Migrate VMware to OLVM_olvm_10


转换ova为raw格式

[root@ol7-kvm01 vmware]# qemu-img convert -O raw test-win01-disk1.vmdk test-win01.img

Migrate VMware to OLVM_linux_11


上传img文件

Migrate VMware to OLVM_linux_12

上传完成

Migrate VMware to OLVM_olvm_13


创建VM

Migrate VMware to OLVM_olvm_14


附加对应img文件,“Interface”调整为“IDE”

Migrate VMware to OLVM_olvm_15


按需调整Cpu Mem等规格

Migrate VMware to OLVM_linux_16



启动验证

打开“Compute”- “Virtual Machines”启动vm主机

Migrate VMware to OLVM_migrate_17


打开Console查看启动过程

Migrate VMware to OLVM_olvm_18


Windows主机需下载virt-viewer-x64-10.0-1.0.exe进行安装方能连接到Console

Migrate VMware to OLVM_linux_19


至此迁移完成

Migrate VMware to OLVM_olvm_20


VMware vSphere下linux主机迁移过程亦同

Migrate VMware to OLVM_migrate_21

上一篇:全链路监控pinpoint安装部署
下一篇:没有了
网友评论