|Image Management Guide / Image Tasks|
HVM (Hardware-assisted Virtual Machine) images are sequences of raw sectors of a complete bootable disk, including a boot loader and one or more partitions with an operating system. Such images are self-contained and can be booted on hardware that supports virtualization or on a full software emulation of hardware (QEMU).
At run time, HVM images can be deployed to disks local to the hypervisor (so-called Instance Store images) or they can run off of dynamic volumes on EBS (so-called EBS-backed instances or boot-from-EBS instances). This topic covers methods for installing an HVM image into either type of EMI.
For Linux images, the required options are:euca-install-image -i /path/to/hvm-image -n name-of-the-image -r x86_64 --virtualization-type hvm -b bucket-name-for-image
When installing a Windows image, an additional flag is necessary:euca-install-image -i /path/to/hvm-image -n name-of-the-image -r x86_64 --virtualization-type hvm -b bucket-name-for-image --platform=windows
An EBS-backed image (sometimes referred to as a "bfEBS" image) is an image with a root device that is an EBS volume created from an EBS snapshot. An EBS-backed image has a number of advantages (over an Instance Store image), including:
With this method, a single command uploads image data into Object Store and triggers a conversion task, which copies the data into an EBS volume. The volume will be the source of the snapshot behind the EBS-backed EMI.
If the volume import process was interrupted, import can be resumed (within a one-week deadline) with the following command:euca-resume-import -t import-vol-fae1e94d /path/to/hvm-image
With this method, a single command uploads image data into the Object Store and triggers a conversion task; this conversion task copies the data into an EBS volumetakes a snapshot of the volume, registers the snapshot as an EMI, and deploys the EMI as an instance.
If volume import process was interrupted (by an interruption of the command or due to a network mishap, import can be resumed (within a one-week deadline).
euca-resume-import -t import-i-b393f3f6 /path/to/hvm-image
This is a more manual method for installing an HVM image into an EBS-backed EMI. Instead of importing the image data into an EBS volume directly, a helper instance is used to copy data from the image file into the volume. The helper instance can be either an instance store or an EBS-backed instance, and can be deleted when ﬁnished. The volume will be the source of the snapshot behind the EBS-backed EMI.
curl <path_to_bootable_image> > <device>
dd if=<path_to_bootable_image> of=<device> bs=1M