We use proprietary and third party´s cookies to improve your experience and our services, identifying your Internet Browsing preferences on our website; develop analytic activities and display advertising based on your preferences. If you keep browsing, you accept its use. You can get more information on our Cookie Policy
Cookies Policy
Ask Your Question
0

Is it possible to download an instance on my host?

asked 2016-10-25 17:42:04 +0100

jcarmaker gravatar image

I have a virtual machine and I want to download it so I can use it. Could I use it on Virtual Box?

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
1

answered 2016-10-25 18:44:40 +0100

jicg gravatar image

updated 2016-10-27 17:07:20 +0100

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....

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-re...

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
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-10-25 17:42:04 +0100

Seen: 7,875 times

Last updated: Oct 27 '16