This guide aims at helping you if you find yourself in the situation that you need to bring an existing image
from the old HPC Cloud to the new one. Among other changes, the most notable one is that you are likely to have to contextualise your VM so that it will have its network configured.
The steps we will follow are the following:
image
on the old HPC Cloudimage
into the new HPC Cloudtemplate
using that image
image
you are going to bring over. Make sure that there are no VM(s) running at the moment that may be using that image
. Shut VM(s) down that may be using your intended image
before you proceed any further. Once the VM(s) have disappeared from the list of VMs, proceed to the next step.image
on the table of image
s.image
, so that a panel with extended information shows at the bottom of the screen.The image
will now be copied to VirDir. Depending on its size, it may take quite some time. A pop-up dialogue will tell you this and which name your image
will have.
image
into the new HPC CloudNOTE:
In these steps you will be exposing your VirDir to the outside world. Make sure you understand the risks, and destroy the new VM you will be making as soon as you are finished importing the
image
.
su -
.cd
wget https://doc.hpccloud.surfsara.nl/assets/setup_bridge_vm.sh
chmod +x ./setup_bridge_vm.sh
On the Bridge VM: Run this file giving your Group name as a parameter: ./setup_bridge_vm.sh <group_name>
image
. A from will pop up.image
to be Persistentimage
file, pointing to the web server running in your Bridge VM, which will be something like: http://145.100.X.X/vd/2015MMDD:hh:mm_sometext
(you need to use the right IP instead of the X.X and the actual name of the file, including the colons)vd
qcow2
image
with the name you wrote on the form will appear on the images table, in status LOCKED. It will remain in that status until the UI has finished copying the file from your Bridge VM to the new HPC Cloud. Then it will change to READY.NOTE:
Once your
image
on the new HPC Cloud shows as READY, if you do not need to bring any more images over, then now is a good time to destroy your Bridge VM. You can delete it along with its associatedimage
andtemplate
.
template
using that image
You need to put that image
that you imported into a template
. We will do that now.
template
.image
for the Disk 0 disk.nic
Interface 0, and add a new nic
, which will get name Interface 1 to assign it to your internal network.Files
whose name begins with one-context. You should see 2 of them: one ending in .deb and another one ending in .rpm. If your image
is a CentOS one (or another Red-Hat-based one), you will want to check the box next to the .rpm file
. If your image
is a Ubuntu one (or another Debian-based one), you will want to check the box next to the .deb file
.template
. Click on the green Create button on the top-left of the screen.template
. This creates what we will further call new VM. On the VNC console, make sure the new VM boots.mount -t iso9660 -L CONTEXT -o ro /mnt
yum install /mnt/one-context*.rpm
dpkg -i /mnt/one-context*.deb
reboot now
). Your VM should now be in a useable state (among other things, the network should be working).Note:
When you see that the contextualization is working (e.g.: the network works on the new VM), and if you made the
image
persistent, then you can delete the one-context* .deb or .rpmfile
from thetemplate
. Thatfile
will still be visible in your VM until you re-create the VM.