In this session, Nicolas presents a new feature, targeted for CloudStack 4.19, which allows administrators to migrate Instances from a VMware environment (external or connected to CloudStack) and import them into a KVM CloudStack-managed environment.
-----------------------------------------
The CloudStack Collaboration Conference 2023 took place on 23-24th November. The conference, arranged by a group of volunteers from the Apache CloudStack Community, took place in the voco hotel, in Porte de Clichy, Paris. It hosted over 350 attendees, with 47 speakers holding technical talks, user stories, new features and integrations presentations and more.
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue
1. Migrating VMware
Infra to KVM Using
CloudStack
Nicolas Vazquez
Senior Software Engineer - ShapeBlue
nicolas.vazquez@shapeblue.com
nvazquez@apache.org
2. About me – Nicolas Vazquez
• Senior Software Engineer @ ShapeBlue
• Committer & PMC Member
• Husband, father
• Sports & Gym fan
3. Agenda
• Import/Export Instances – 4.19 overview
• VMware to KVM migration process
• Process overview
• KVM hosts requirements
• Use cases
• Documentation
• Conclusions
• Q & A
4. Import/Export Instances – 4.19 Overview
• New Features added on 4.19:
• KVM ingestion:
• Importing libvirt domain from KVM host
• Importing QCOW2 from Shared or Local storage
• Import/Export Unmanaged Instanceson KVM
• From GSOC 2023 project – Ayush Pandey
• Migrate VMware Instances to KVM (this talk)
7. Migrate VMware Instances to KVM
Import VM
Source VM on vSphere Converted from Source Vmware VM to run on
KVM hosts and imported into CloudStack
8. Migrate VMware Instances to KVM
Destination KVM Hosts Linux Distribution Supported Versions
Alma Linux 8, 9
Red Hat Enterprise Linux 8, 9
Rocky Linux 8, 9
Ubuntu 22.04 LTS
• Installingvirt-v2v on Ubuntu KVM hosts does not install nbdkit which is required in the conversion of VMWare
VCenter guests:
• apt installnbdkit
• Importing Windows guest VMs from VMware requires installing the virtio drivers on the hypervisor
hosts for the virt-v2v conversion:
• yum install virtio-win (RHEL)
• apt install virtio-win(Debian)
9. Migration Process overview (1/2)
• Select Source VMware datacenter
• Existing: Already linked to a CloudStack zone in the cloud environment
• External: Not managed by any CloudStack zone in the cloud environment
• CloudStack lists VMware datacenter VMs
• New API listVmwareDcVms
• Administrator selects a VMware Instance to import
• Additionally, can also select a KVM host to perform the conversion and/or
select the temporary storage for the conversion
• CloudStack clones the source VM in “crash consistent” state on the
source Vmware datacenter
10. Migration Process overview (2/2)
• New API importVM
• A KVM host converts the VMware instance to KVM through virt-v2v
• Administratorcan choose the conversion host and/or the temporary location
for the virt-v2v output
• The tool virt-v2v must be installed on KVM hosts
• Virt-v2v documentation: https://www.libguestfs.org/virt-v2v.1.html
• The KVM host invokes virt-v2v to convert a guest VM from VMware to
run on libvirt.
14. Migration Process overview
CloudStack
Management
Server
Connectivitybetween
VMware vCenter and KVM
hosts is required
Temporary
Storage Location
virt-v2v output to temporary
storage location:
- Secondary storage
- Primary storage
- Local storage (if enabled)
Destination
Storage Pools
Copy VM migrated disks to
destinationstorage pools
Converted Instance
Information
Request to convert
Vmware cloned Instance
CloudStack
Database
Import Instance
into Database
importVM API
Source VMware
Clone the source VMware VM
15. Important Considerations
• Configuration ‘convert.vmware.instance.to.kvm.timeout’ - virt-v2v
processes timeoutLong-lasting conversion processes – default to 8 hs
• Recommended state: gracefully shutdown VMs (clean filesystem
state)
• Supported VMware guest VMs:
• Running or Stopped Linux VMs
• Stopped Windows VMs
• Resulting state of imported VM: Stopped VM in CloudStack
16. Important Considerations
• Additional requirements on conversion hosts:
• Ubuntu KVM hosts require installing ndbkit for conversions
• Importing Windows VMs require installing virtio-win
• Increase virt-v2v verbosity – set on agent.properties:
• virtv2v.verbose.enabled=true
18. Conclusions
• Importing Tool for CloudStack from VMware to KVM
• Preserve disks and networking
• Long lasting conversion processes
• Requires installing virt-v2v on some conversion hosts
• Results may vary depending on the Guest VM OS and KVM hosts
distributions and virt-v2v versions