At the current stage it is not possible to download
images directly from the user interface. However, the instructions here allow you to fetch a copy of an
imageof yours off the HPC Cloud at your own pace.
If you find yourself struggling to succeed in following these instructions, you may ask the HPC Cloud operators to try to make an
imageavailable for you by sending an e-mail to our email@example.com.
You can download a copy of an
image by attaching that image as if it were just another storage drive to a running VM. The following overview outlines the steps we will be following throughout this guide. We will be:
imageyou want to download is not in use by any VM
imageyou want to download (for example, create a new one from the AppMarket) Let’s call this Utility VM
imageyou want to download to the Utility VM
imageyou want to download
Each section now goes into more detail for each of the previous steps.
You must make sure that the
image you are willing to download is currently not in use by any running VM.
imageyou want to download to display the extended information about that
image, click on that VM’s line to see extended information about that VM, and shut that VM down.
image’s extended information. Change now the Type to DATABLOCk.
We will be using a VM as the central place of operations for the rest of the tasks. We will call it Utility VM.
We will be creating a file in the Utility VM containing all the contents of the
image you want to download. That file is what you will download in the end. Therefore, the Utility VM needs to have enough space to host that file.
imageyou want to download is likely larger than the average space available in an Apps appliance sole
image, we will attach an extra Ceph Datablock to the Utility VM so that we can create the large file with the contents of the
imagein there. This means, in turn, that you must have enough quota available in the Ceph
datastore. You can view your current quotas on the UI itself. From the User view, click on the Storage tab from the main menu on the left, and then Datastores under it. You should see there a list with all the
datastoresyou have access to. If the quota you see there is not enough to fit a whole copy of the
imageyou want to download, then please get in contact with us: firstname.lastname@example.org.
datablock imagein the Ceph
datastorethat is big enough to fit a copy of your
image(detailed instructions in our Datablocks article). Let’s give this
datablock imagethe name wagon.
templateyou have just imported from the appliance so that you:
diskwith the newly created empty
datablock image(the wagon).
nicconnected to the Internet
templateyou just edited
template. Make sure you can log in to the Utility VM via SSH.
We will now hot-attach the
image you want to download to the Utility VM. But first we need to know which drives you currently see in the Utility VM, so that we can more easily identify each of them.
fdisk -l. You can probably see plenty of output, and somewhere around there, two lines (not necessarily following one another) will read something like:
Disk /dev/vda: ...and
Disk /dev/vdb: .... These indicate that you have two drives; namely: the Operating System disk is one, and the empty wagon
datablockis the other one. Probably, looking at their sizes, you can easily identify which is which. For the rest of this guide, let’s assume the following (your case may just as well be the opposite):
/dev/vdais the Operating System image (the Utility VM’s Operating System, remember; it is not the one you may be willing to download)
/dev/vdbis the wagon
datablock. Like this (for more details see our Datablocks article):
sudo su -
mkfs -t xfs /dev/vdb
mount /dev/vdb /wagon
echo "echo 4096 > /sys/block/vdb/queue/read_ahead_kb" > /etc/rc.d/rc.local
chmod 755 /etc/rc.d/rc.local
diskscurrently attached to the VM.
imageyou want to download. Click on the
imageto select it. Then finally click on the Attach green button at the bottom of the dialogue. The dialogue will disappear and y our Utility VM will come into the HOTPLUG status and it will remain so until the newly attached
diskis ready for use. Then the Utility VM will come back to status RUNNING.
imageyou want to download in the Utility VM. Therefore:
sudo su -
fdisk -l. You should see a new drive in the listing from that command, likely:
Disk /dev/vdc: .... For the rest of the guide we will assume that the
imageyou want to download is located in
We will be making a bit-by-bit copy of the
image you want to download, and storing that copy into a plain file that you can then download. We will be using the command
dd which does all of that for you (you can read more in Wikipedia.
imageinto a file:
dd if=/dev/vdc of=/wagon/image_file.img
diff /dev/vdc /wagon/image_file.img
sftp. Like this:
If you are acquainted with different virtualisation technologies and know about things such us the qcow2 format and tools like qemu, then you may want to convert the raw image you have just created into any other format you may like. It may be worth looking into this because using a format with compression may save some bandwith and download time.
Once you have downloaded the
image_file.img file, you can destroy all the scaffolding you rigged up to be able to download it. That means that you can:
templatefor the Utility VM
imagefor the Utility VM
Further, if you do not need the
image you wanted to download in the UI, then you can delete it now as well. If you still want to use it, however, you may want to change its type back to OS.