image
NOTE:
At the current stage it is not possible to download
image
s directly from the user interface. However, the instructions here allow you to fetch a copy of animage
of 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
image
available for you by sending an e-mail to our helpdesk@surfsara.nl.
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:
image
you want to download is not in use by any VMimage
you want to download (for example, create a new one from the AppMarket) Let’s call this Utility VMimage
you want to download to the Utility VMimage
you want to downloadEach 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.
image
you want to download to display the extended information about that image
.image
.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.
NOTE:
Because the
image
you want to download is likely larger than the average space available in an Apps appliance soleimage
, we will attach an extra Ceph Datablock to the Utility VM so that we can create the large file with the contents of theimage
in there. This means, in turn, that you must have enough quota available in the Cephdatastore
. 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 thedatastores
you have access to. If the quota you see there is not enough to fit a whole copy of theimage
you want to download, then please get in contact with us: helpdesk@surfsara.nl.
datablock image
in the Ceph datastore
that is big enough to fit a copy of your image
(detailed instructions in our Datablocks article). Let’s give this datablock image
the name wagon.template
you have just imported from the appliance so that you:
disk
with the newly created empty datablock image
(the wagon).nic
connected to the Internettemplate
you just editedtemplate
. 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 datablock
is 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/vda
is the Operating System image (the Utility VM’s Operating System, remember; it is not the one you may be willing to download)/dev/vdb
is the wagon datablock
datablock
. Like this (for more details see our Datablocks article):
sudo su -
mkdir /wagon
mkfs -t xfs /dev/vdb
mount /dev/vdb /wagon
mkdir /etc/rc.d
touch /etc/rc.d/rc.local
echo "echo 4096 > /sys/block/vdb/queue/read_ahead_kb" > /etc/rc.d/rc.local
chmod 755 /etc/rc.d/rc.local
disks
currently attached to the VM.image
you want to download. Click on the image
to 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 disk
is ready for use. Then the Utility VM will come back to status RUNNING.image
you 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 image
you want to download is located in /dev/vdc
.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.
image
into a file: dd if=/dev/vdc of=/wagon/image_file.img
diff /dev/vdc /wagon/image_file.img
scp
or sftp
. Like this: scp admincentos@145.100.XXX.YYY:/wagon/image_file.img
.Hint:
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:
template
for the Utility VMimage
for the Utility VMdatablock image
.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.