'A methods to set the number of virtio queues,
if it has been requested in extra specs.'

def _get_virtio_mq_settings(self, image_meta, flavor):

    driver = None
    vhost_queues = None
    if (not isinstance(image_meta, objects.ImageMeta)):
        image_meta = objects.ImageMeta.from_dict(image_meta)
    img_props = image_meta.properties
    if img_props.get('hw_vif_multiqueue_enabled'):
        driver = 'vhost'
        max_tap_queues = self._get_max_tap_queues()
        if max_tap_queues:
            vhost_queues = (max_tap_queues if (flavor.vcpus > max_tap_queues) else flavor.vcpus)
        else:
            vhost_queues = flavor.vcpus
    return (driver, vhost_queues)
