1 | initial version |
Technically you can only download images, not instances (running Virtual machines). However, you can create a new Snapshot from the Cloud Portal, so you'll have an image made from your instance. Then, you can download your snapshot.
You could use Openstack APIs (As FIWARE uses Openstack): https://catalogue.fiware.org/enablers/iaas-ge-fiware-reference-implementation.
The difficult way, is just using the API (you can know the Image ID from the Cloud Portal), here is the explanation: http://developer.openstack.org/api-ref/image/v2/?expanded=download-binary-image-data-detail
However, you could easily install a glance client and use it. This can be done using packages (for example in Debian/Ubuntu):
apt-get install python-openstackclient
or a python virtualenv:
$ virtualenv glance
$ source bin/activate
(glance)$ pip install python-openstackclient
....
Once you have your glanceclient installed, you export your vars configuration variables:
export OS_USERNAME=<your_email_address>
export OS_PASSWORD=<your_password>
export OS_TENANT_NAME=<your-tenant-name>
export OS_REGION_NAME=<your_region_name>
export OS_AUTH_URL=http://cloud.lab.fiware.org:4730/v2.0
And download your image:
openstack image save <image_id_or_name> > mylocalimage
As an example:
openstack image save base_ubuntu_14.04 > base_ubuntu_14.04_local.qcow2
2 | No.2 Revision |
Technically you can only download images, not instances (running Virtual machines). However, you can create a new Snapshot from the Cloud Portal, so you'll have an image made from your instance. Then, you can download your snapshot.
You could use Openstack APIs (As FIWARE uses Openstack): https://catalogue.fiware.org/enablers/iaas-ge-fiware-reference-implementation.
The difficult way, is just using the API (you can know the Image ID from the Cloud Portal), here is the explanation: http://developer.openstack.org/api-ref/image/v2/?expanded=download-binary-image-data-detail
However, you could easily install a glance client and use it. This can be done using packages (for example in Debian/Ubuntu):
apt-get install python-openstackclient
or a python virtualenv:
$ virtualenv glance
$ source bin/activate
(glance)$ pip install python-openstackclient
....
Once you have your glanceclient installed, you export your vars configuration variables:
export OS_USERNAME=<your_email_address>
export OS_PASSWORD=<your_password>
export OS_TENANT_NAME=<your-tenant-name>
export OS_REGION_NAME=<your_region_name>
export OS_AUTH_URL=http://cloud.lab.fiware.org:4730/v2.0
And download your image:
openstack image save <image_id_or_name> > mylocalimage
As an example:
openstack image save base_ubuntu_14.04 > base_ubuntu_14.04_local.qcow2
Finally, you can convert your newly downloaded image to VirtualBox disk format to use it in your new VirtualBox Virtual host:
qemu-img convert -O vdi base_ubuntu_14.04_local.qcow2 base_ubuntu_14.04_local.vdi