Saturday, 17 February 2018

AWS EC2 (VM Import/Export)


Overview
  • Allows importing on-premise VM images
  • Not integrated into AWS Console
    • Must use API
  • Recommended to use Server Migration Service (GA: 2016)

Virtualization Platforms
  • VMWare
  • Citrix Xen
  • Microsoft Hyper-V

VM Image Formats
  • OVA - Open Virtual Appliance
    • Supports multiple disks
  • VMDK - Stream-optimized ESX Virtual Machine Disk 
    • Compatible with VMWare ESK/vSphere
  • VHD/VHDX - fixed dynamic image formats
    • Compatible with Microsoft Hyper-V, Citrix Xen
  • Raw

Importing VMs
  • Stop source VM
  • Prepare source VM (disable firewall, enable remote access, etc.)
  • Export VM from the virtualization environment
    • If using VMWare vCenter you can use AWS Connector for vCenter
    • Result: image (see VM Image Formats)
  • Import into S3 VM catalog 
    • ec2-import-instance
      • starts a new task 
        • check status: ec2-describe-conversions-tasks
      • once completed instance is launched in stopped state
  • Create AMI
    • Optionally copy AMI to other regions
  • Limitations
    • HVM only with 64-bit
    • BYOL for RHEL
    • Expanded image cannot exceed 1TiB
    • Single ENI
    • No SR-IOV (Enhanced Networking)
      • Except for Windows 2012

Importing Instance
  • Imports as EC2 Instance

Importing Volume
  • Similar to importing VM image
  • Imports single disk (creates EBS snapshot)

Exporting VM
  • Export only if you previously imported it
  • Create bucket with upload/delete & view permissions for AWS account

vCenter


  • AWS has special management plugin (AWS VM Connector)
    • Standalone VM (OVA file)
    • Supports monitoring, tagging
    • Verifies various permissions along the way
  • Process
    • vSphere client authorizes the import
      • AWS Management Portal for vCenter
        • Verifies permissions and returns a token
    • vSphere client sends the request (+token) to the AWS Connector
    • AWS Connector starts the migration
      • Returns taskId to the vSphere client

No comments:

Post a Comment