Hi,

There has been discussion about the OpenStack output and Richard asked for a public thread on this list, so here it is.

For v2v from VMware to RHV, there is a Python script that does some extra steps to create the virtual machine after the disks have been converted. We want to have the same behavior for OpenStack, i.e. have virt-v2v create the instance once the volumes have been created.

For that, I've written a Python script [1] that takes a JSON file (sample here [2]) as input. I expect this JSON input to be generated by virt-v2v openstack output module, from the command line options and the volumes ids generated during conversion.

Here are the options I think we should have for the OpenStack output:

-o openstack
-oo os-user-domain-name='Default'
-oo os-project-name='v2v-project'
-oo os-username='admin'
-oo os-password='secret'
-oo server-id='01234567-89ab-cdef-0123-456789abcdef'
-oo destination_project_id='01234567-89ab-cdef-0123-456789abcdef'
-oo volume_type_id='01234567-89ab-cdef-0123-456789abcdef'
-oo flavor_id='01234567-89ab-cdef-0123-456789abcdef'
-oo security_groups_ids='01234567-89ab-cdef-0123-456789abcdef,01234567-89ab-cdef-0123-456789abcdef'
--mac 01:23:45:67:89:ab:network:01234567-89ab-cdef-0123-456789abcdef

You'll see that the --mac option is not specific to OpenStack, but it shows how it would look like with a network id. And it should be passed to the post-conversion script.

The translation to JSON is pretty straight forward and should not be difficult. We simply have to agree on the JSON keys we expect and the where the new -oo keys go. Also, the script is quite simple and relies on OpenStack Python SDK, which is also used by the OpenStack CLI, so no additional dependencies are required and it should be easy to maintain.

[2] https://gist.github.com/fdupont-redhat/934b3efb6d66a991a80149235066d7d7#file-test-migration-json

--

Fabien Dupont

PRINCIPAL SOFTWARE ENGINEER

Red Hat - Solutions Engineering

fabien@redhat.com     M: +33 (0) 662 784 971

  TRIED. TESTED. TRUSTED.

Twitter: @redhatway | Instagram: @redhatinc | Snapchat: @redhatsnaps