Hello Nova!

I'd like to ask community to help me with some unclear things. I'm currently working on adding persistent storage support into a parallels driver.

I'm trying to start VM.

nova boot test-vm --flavor m1.medium --image centos-vm-32 --nic net-id=c3f40e33-d535-4217-916b-1450b8cd3987 --block-device id=26b7b917-2794-452a-95e5-2efb2ca6e32d,bus=sata,source=volume,bootindex=1

Got an error:
ERROR (BadRequest): Block Device Mapping is Invalid: Boot sequence for the instance and image/block device mapping combination is not valid. (HTTP 400) (Request-ID: req-454a512c-c9c0-4f01-a4c8-dd0df0c2e052)


nova/api/openstack/compute/servers.py
def create(self, req, body)
Has such "body" arg:
{u'server':
    {u'name': u'test-vm',
     u'imageRef': u'b9349d54-6fd3-4c09-94f5-8d1d5c5ada5c',
     u'block_device_mapping_v2': [{u'disk_bus': u'sata',
                                   u'source_type': u'volume',
                                   u'boot_index': u'1',
u'uuid': u'26b7b917-2794-452a-95e5-2efb2ca6e32d'}],
     u'flavorRef': u'3',
     u'max_count': 1,
     u'min_count': 1,
     u'networks': [{u'uuid': u'c3f40e33-d535-4217-916b-1450b8cd3987'}],
     'scheduler_hints': {}
    }
}

Such block device mapping leads to bad boot indexes list.
I've tried to watch this argument while executing similiar command with kvm hypervisor on Juno RDO and get something like in "body":

{u'server': {u'name': u'test-vm',
 u'imageRef': u'78ad3d84-a165-42bb-93c0-a4ad1f1ddefc',
 u'block_device_mapping_v2': [{u'source_type': u'image',
                               u'destination_type': u'local',
                               u'boot_index': 0,
                               u'delete_on_termination': True,
u'uuid': u'78ad3d84-a165-42bb-93c0-a4ad1f1ddefc'},

                             {u'disk_bus': u'sata',
                              u'source_type': u'volume',
                              u'boot_index': u'1',
u'uuid': u'57a27723-65a6-472d-a67d-a551d7dc8405'}],
 u'flavorRef': u'3',
 u'max_count': 1,
 u'min_count': 1,
 'scheduler_hints': {}}}

Can you answer next questions please:
1) Does the first version miss an 'source_type': 'image' arg?
2) Where should and image block_device be added to this arg? Does it come from novaclient or is it added by some callback or decorator?

Looking forward for your help!

--
Regards,
Alexander Burluka


__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to