Amazon has added an interesting new feature to EC2 that allows you to boot from Elastic Block Storage (EBS) volumes. If you are not familiar with EC2, please read my review of the Amazon AWS Management console first.
Latest posts by Michael Pietroforte (see all)
- Evernote backup data to Dropbox - Tue, Jan 9 2018
- Install PowerShell Core and the Azure module (AzureRM) on a Mac - Tue, Dec 26 2017
- New wiki doc about changing the PowerShell console colors - Thu, Dec 21 2017
I have criticized EC2's complicated OS image creation process (AMI bundling) before. Thus far, it was only possible to store images on Amazon's storage service S3. S3 and EC2 don't really harmonize well, and that is probably the reason why Amazon needed to introduce EBS in the first place. Until now, you could only attach EBS volumes to instances (virtual machines), but could not use an EBS volume as boot device. I suppose, many EC2 customers were asking for this feature, and now it is here. It simplifies many things, but it also has some downsides compared to using S3 as AMI (Amazon Machine Image) storage. Note that the original method is still available. Amazon calls the corresponding images instance-store, or S3 AMIs, as opposed to the new EBS AMIs.
Booting from an EBS volume ^
To boot from an EBS volume, you have to use one of the AMIs that Amazon has prepared for this purpose. Amazon offers Windows and Fedora EBS AMIs. By the way, Amazon finally supports Windows Server 2008. Since they needed almost two years after its release for this step, it is not very likely that they will officially support Windows Sever 2008 R2 any time soon. However, there are probably ways to get R2 running on EC2.
Once the boot process is completed, a new EBS volume will appear in the corresponding pane in the AWS Management Console. This also means that you will be charged for the EBS storage, in addition to the instance costs. This is a downside compared to instance-store machines, where you only pay for the running instance. However, storage costs are very low compared to the instance fees. Thus, working with EBS instances won't have a significant effect on your overall costs.
Advantages and disadvantages ^
One of the main advantages of booting from an EBS volume is that these instances can be stopped. As opposed to terminating an instance, stopping the virtual machine won't delete the system drive. However, as it will release the instance's compute resources; you will only be charged for the EBS volume storage once the virtual machine is in the stopped state. Thus, stopping an instance just means shutting down the corresponding virtual machine. It is possible to modify the properties of a stopped instance. For example, you can change instance type (available RAM, CPU power etc.) or detach and attach EBS volumes.
If you want to keep the configuration of an instance-store virtual machine, you have to bundle the instance, save it to your S3 storage, and then register it as an AMI. This is far less convenient than simply shutting down the virtual machine, as you can do with EBS instances.
Another nice feature of EBS instances is that you can easily bundle them. You just have to select the corresponding running instance and select "Create Image (EBS AMI)". Unfortunately, this will take the virtual machine offline until the cloning process is completed. In my test, this always took 10-15 minutes for a Windows Server 2008 machine with a 30GB system drive.
EBS instances running Linux will also go offline when you bundle them. As you might know, it is possible to bundle Linux-based instance-store machines without taking the VM offline. I really wonder why Amazon doesn't support live cloning. This is a major downside, when comparing EC2 to modern on-premise virtualization solutions.
However, since you can create snapshots of EBS volumes, you don't need to bundle an instance if you just want to make a backup. Snapshot creation is much faster than bundling. It only took two minutes for my Windows test server. Creating the second snapshot took only a few seconds because only the changes were copied. It is just a pity that you can't simply boot from a volume that you created with this snapshot. I attached such a volume as root device to an EBS instance, but the Windows server did not boot up, even though the AWS Management Console signaled that the instance was running.
Another disappointment is that the AWS Management Console doesn't allow you to convert an S3 AMI to an EBS image. Thus, if you want to move your AMI from S3 to EBS, you have start with a new image and install everything from scratch. There is no straightforward way using the AWS Management Console to move AMIs from S3 to EBS.
All in all, I think the EBS boot function is an important EC2 enhancement, even though Amazon still has to add quite a few features if they want to compete with modern on-premise virtualization solutions. Many things in EC2 just seem to be incomplete. However, Amazon is adding new features to its cloud infrastructure at a remarkable pace. There is no doubt that Amazon has left Google and Microsoft already far behind when it comes to cloud computing. More detailed information about booting from EBS volumes can be found in this guide (PDF).