Migrating a “boot from volume” instance

Introduction

While most Nectar instances are created from images in the Image store, it is also possible to create a Nectar instance that boots directly from a Volume. 

Unfortunately, migrating a “boot from volume” instance between AZs can be rather complicated.  There are three issues to contend with:

  1. A “boot from volume” instance cannot be snapshotted in the normal way. (If you try, you get an empty snapshot.)

  2. Volume backups are only viable for volumes up to a certain size, depending on the Node, and they are not possible at all in the QRIScloud AZ.

  3. A “boot from volume” instance is intimately connected to its volume.  The only way to disassociate them is to delete the instance.  Indeed, if the volume was marked as “delete on termination”, then deleting the instance also deletes the volume.

The other thing to note is that a common use-case for “boot from volume” is to run a Windows virtual machine. Since Windows VMs are a Node-specific service, these instructions do not cover their migration. If you need advice, we suggest that you talk to the support team for the Node that you are migrating to.

We support two approaches for migrating a “boot from volume” instance:

  • Migrating using a volume backup.

  • Migrating using a volume to image upload.

Unfortunately, if the “boot from volume” root volume is too large, migration is problematic.  If you run into problems, you will need to raise a support ticket.  Another alternative would be to build a new instance from a fresh Image and install your software on it, and then “rsync” the data across from the old Volume. 

Note that for simplicity’s sake we have left out the steps that you would use to deal with user-facing services, additional volumes and so forth.  We suggest you review the instructions for “Migrating a normal instance”, and add the necessary steps into your overall migration plan.

Quotas

The quotas actually required will depend on how you decide to migrate the instance.  It may include:

  • Permanent quota for the instance’s volume in the new AZ.

  • Object storage quota for a Volume backup.

Migrating using a volume backup

This approach is straight-forward, but it will only work when both the origin and destination AZs support the Volume backup service.  In addition, the instance’s boot volume must not be too large for Volume backup to work.

Steps:

  1. Shut down the old instance.

  2. Create a Volume backup for the instance’s volume.

  3. Create a new Volume in the new AZ from the backup.

  4. Launch a new “boot from volume” instance from the new volume.

  5. Verify that the instance is working properly.

  6. Wait.  It is advisable to keep the old instance for a few days in case you need to roll back the migration.

  7. Delete the old instance, old volume and snapshot, and volume backup.

Migrating using volume to image upload

This approach is also straight-forward, but it only works up to a certain size of volume.  (Temporary disk space is used on the infrastructure server to hold the image before it is uploaded. If a volume is too large, there won’t be enough space and the operation will fail.)

Steps:

  1. Shut down the old instance

  2. Upload an Image from the instance’s volume.

  3. Launch a new instance from the Image in the new AZ.  This could be a boot-from-volume instance, or a regular instance if the Image is 30GB or less.

  4. Verify that the instance is working properly.

  5. Wait.  It is advisable to keep the old instance for a few days in case you need to roll back the migration.

  6. Delete the old instance, old volume and volume snapshot, and temporary volume.