Ask Your Question
3

Import VMDK Data volume into Cinder volume

asked 2014-09-03 15:11:48 -0500

jay-janardhan gravatar image

updated 2014-09-03 15:28:59 -0500

I need to import about 100 different VMDK data volumes into new Cinder volumes. These are not bootable volumes. Is there a way to this without having to first upload each one of them into Glance then creating cinder volumes with glance image as the source?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
3

answered 2014-10-02 21:31:51 -0500

jtaguinerd gravatar image

If you are using Ceph you can directly import the vmdk image. rbd import --image-format 2 image.vmdk volumes/volume-63472da4-a11d-4dd0-90a8-c741c0a87d85

edit flag offensive delete link more

Comments

I was unaware of that. I dont often have to work with vmdk's. Thank you for the tip!

SamYaple gravatar imageSamYaple ( 2014-10-04 17:38:19 -0500 )edit

No problem. Glad I could help..

jtaguinerd gravatar imagejtaguinerd ( 2014-10-04 22:29:38 -0500 )edit
0

answered 2014-09-03 16:11:45 -0500

SamYaple gravatar image

updated 2014-09-03 22:31:10 -0500

I can think of a few ways this can be done, they are a little bit dirty though. It will also depend on your backend.

What are you using for cinder as a backend? Answered: Ceph

You could use a script to create a cinder volume of the appropriate size and name.

Then simply dd the logical volume inside the vmdk to the newly create ceph rbd. This isn't ideal since it will write out every bit, so you would need to do some sort of sparse copy to only get the used data. There are a few ways to do that with some cloning tools but there may be a VMDK method as well. That would work best.

edit flag offensive delete link more

Comments

Thanks for the response. Ceph (firefly) cluster is configured for Cinder backend.

jay-janardhan gravatar imagejay-janardhan ( 2014-09-03 21:02:11 -0500 )edit

Edited my answer

SamYaple gravatar imageSamYaple ( 2014-09-03 22:31:36 -0500 )edit

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: 2014-09-03 15:11:48 -0500

Seen: 666 times

Last updated: Oct 02 '14