Ask Your Question
2

How to import Virtualbox/VMWare VMs to OpenStack

asked 2018-09-24 07:23:44 -0500

soheil08 gravatar image

updated 2018-09-25 03:10:51 -0500

Hi, I had some VMs in both VirtualBox and VMWare then I decided to use OpenStack and run the VMs there. VirtualBox export VMs to OVA file and VMWare exports to the OVF file in addition to a vmdk file. I tried to create image with all OVF, OVA and vmdk files and it's OK, but when I want to lunch an instance with them, I got the error:

Error: Failed to perform requested operation on instance "dfb", the instance has an error status: Please try again later [Error: Build of instance 311caab2-fdb1-44f1-9918-36000d64196c aborted: Volume 6c376113-bc29-4328-b3c6-68103842d148 did not finish being created even after we waited 9 seconds or 4 attempts. And its status is error.].

I just could import the ISO file and create an instance using it. So I want to know is it possible to import VirtualBox/VMWare exported VMs to OpenStack and if the answer is yes, then how?

UPDATE Here is the cinder-volume logs:

2018-09-25 11:28:56.503 3223 WARNING cinder.volume.manager [req-929f7fdf-c080-455e-89c9-270f2298c352 d8dcf63bf5b149129584be9813179627 33d195b5c1b54c6bb5d749ccb0409874 - default default] Task 'cinder.volume.flows.manager.create_volume.CreateVolumeFromSpecTask;volume:create' (8b03974c-a0a6-42b2-a234-23f4740129a6) transitioned into state 'FAILURE' from state 'RUNNING'
5 predecessors (most recent first):
  Atom 'cinder.volume.flows.manager.create_volume.NotifyVolumeActionTask;volume:create, create.start' {'intention': 'EXECUTE', 'state': 'SUCCESS'
|__Atom 'cinder.volume.flows.manager.create_volume.ExtractVolumeSpecTask;volume:create' {'intention': 'EXECUTE', 'state': 'SUCCESS',
|__Atom 'cinder.volume.flows.manager.create_volume.OnFailureRescheduleTask;volume:create' {'intention': 'EXECUTE', 'state': 'SUCCESS'
|__Atom 'cinder.volume.flows.manager.create_volume.ExtractVolumeRefTask;volume:create' {'intention': 'EXECUTE', 'state': 'SUCCESS'
|__Flow 'volume_create_manager': ImageCopyFailure: Failed to copy image to volume: qemu-img: error while writing sector 38287488: Input/output error
edit retag flag offensive close merge delete

Comments

The error message indicates that Cinder could not create a volume. Is this volume provisioned from one of those images?

I would expect to find more details in the Cinder logs; search for the volume and image IDs. Perhaps also in the Glance logs.

Bernd Bausch gravatar imageBernd Bausch ( 2018-09-24 09:48:55 -0500 )edit

I convert the VMDK to QCOW2, but I still got an error. I added the cinder error logs in the post.

soheil08 gravatar imagesoheil08 ( 2018-09-25 03:11:07 -0500 )edit

Could it be that your volume service doesn't have enough capacity?

error while writing sector 38287488: Input/output error

I don't know what a "sector" is, but it should be 512 bytes as a minimum. That would mean 19GB.

Bernd Bausch gravatar imageBernd Bausch ( 2018-09-25 03:47:59 -0500 )edit

You could try openstack volume create --image VIRTUALBOX_IMAGE to see what happens.

Bernd Bausch gravatar imageBernd Bausch ( 2018-09-25 03:50:08 -0500 )edit

3 answers

Sort by ยป oldest newest most voted
1

answered 2018-09-24 21:20:47 -0500

fsalaman gravatar image

Hi! First verify you have the hypervisor required for the type of image, if you only have KVM maybe you should try to convert the virtual disk to QCOW2 or RAW formats. You can use qemu-img:

qemu-img convert -p -O qcow2 <source-image-file.vmdk> <converted-image-file>.qcow2

where source-image-file.vmdk is the original vmdk file. You also need to watch out for extra disks. The name <converted-image-file.qcow2> is whatever name you want to assign to the converted image.

Then, as already said, you have an issue creating volumes, so maybe you can try using server's local disk first.

edit flag offensive delete link more

Comments

I convert the VMDK to QCOW2, but I still got an error. I added the cinder error logs in the post.

soheil08 gravatar imagesoheil08 ( 2018-09-25 03:11:11 -0500 )edit

Follow this link to create images manually for OpenStack?

https://docs.openstack.org/image-guide/create-images-manually.html (https://docs.openstack.org/image-guid...)

Eranachandran gravatar imageEranachandran ( 2018-09-27 01:24:22 -0500 )edit
1

answered 2018-09-27 01:22:20 -0500

Follow this link to create images manually for OpenStack?

https://docs.openstack.org/image-guide/create-images-manually.html (https://docs.openstack.org/image-guid...)

edit flag offensive delete link more
0

answered 2019-05-03 16:32:59 -0500

To migrate a VMWare ESXi VM, with one single disk, to OpenStack, you can do the following:

  1. Download and install VMWare OVFTool: https://code.vmware.com/web/tool/4.3....
  2. Export your VM: ovftool 'vi://user:pass@esxi-host/vm_name' vm_name
  3. Upload the VMDK to OpenStack and assign an IDE bus to it: openstack image create --container-format bare --disk-format vmdk --property hw_disk_bus=ide --file vm_name-disk1.vmdk vm_name
  4. Create an instance using that image.
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2018-09-24 07:23:44 -0500

Seen: 1,079 times

Last updated: May 03