You can upload the Unified Access Gateway image with PowerShell. The image can be imported and registered to other regions as well if required.
Procedure
-
Download the Unified Access Gateway
.ovaimage file from the Customer Connect page. The version of this file must be 3.5 or later. -
Extract the
.vmdkimage from the.ovafile.Windows Ubuntu
For example,expand-7zip ova-filename target-locationeuc-unified-access-gateway-x.y.0.0-12345678_OVF10.ovais the downloaded file, wherex-yis the version number and12345678is the build number. To extract the.vmdkfile toC:\temp, run the following command:expand-7zip C:\uag\euc-unified-access-gateway-x.y.0.0-12345678_OVF10.ova C:\uag\
For example,tar -xvf ova-filenametar -xvf euc-unified-access-gateway-x.y.0.0-12345678_OVF10.ova -
Upload the .
vmdkimage into the S3 bucket.$vmdkImage="euc-unified-access-gateway-x.y.0.0-12345678-system.vmdk" $bucket="uag-images" $region="us-east-2" $params = @{ "BucketName"=$bucket "File"="C:\uag\"+$vmdkImage "key"="/"+$vmdkImage "Region"=$region } Write-S3Object @params -
Import the EC2 snapshot.
$params = @{ "DiskContainer_Format"="VMDK" "DiskContainer_S3Bucket"=$bucket "DiskContainer_S3Key"=$vmdkImage "Region"=$region } $impId=Import-EC2Snapshot @params -
To track the import, periodically run the following command to obtain progress status.
Note: The import will take several minutes.
(Get-EC2ImportSnapshotTask -ImportTaskId ` $impId.ImportTaskId).SnapshotTaskDetail -
When complete, the following command must show the SnapshotId.
(Get-EC2ImportSnapshotTask -ImportTaskId ` $impId.ImportTaskId).SnapshotTaskDetail.SnapshotId -
Register the Image as an Amazon Machine Image (AMI).
$bdm=New-Object Amazon.EC2.Model.BlockDeviceMapping $bd=New-Object Amazon.EC2.Model.EbsBlockDevice $bd.SnapshotId=(Get-EC2ImportSnapshotTask ` -ImportTaskId $impId.ImportTaskId).SnapshotTaskDetail.SnapshotId $bd.DeleteOnTermination=$true $bdm.DeviceName="/dev/sda1" $bdm.Ebs=$bd $params = @{ "BlockDeviceMapping"=$bdm "RootDeviceName"="/dev/sda1" "Name"=$vmdkImage "Architecture"="x86_64" "VirtualizationType"="hvm" "EnaSupport"=$true } Register-EC2Image @params
Results
In AWS Console you should see your imported image in EC2 AMI Images.
Was this page helpful?