How to attach volume to scsi controller

asked 2018-03-08 02:27:16 -0600

yafeng gravatar image


It seems when volume is attached to a running VM, it' s always considered as a virtio blk. Is it possible to attach volume to scsi controller?

Thanks yafeng

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2018-03-08 17:08:29 -0600

It looks like this has already been thought of on the inside, but the Nova API doesn't expose this option yet. The nova.compute.api controller defines the attach_volume method containing disk_bus and device_type arguments:


def attach_volume(self, context, instance, volume_id, device=None,
                  disk_bus=None, device_type=None, tag=None):

However, the HTTP API doesn't give you a choice and calls that method without disk_bus or device_type:


        device = self.compute_api.attach_volume(context, instance,
                                                volume_id, device, tag=tag)

So, to sum up, I'm 99% sure that right now you can't request other than default type of disk connection to the instance.

edit flag offensive delete link more


Interestingly, Nova gives the user a lot of control for attaching a volume when launching a new instance, but very little control when attaching to a running instance.

Bernd Bausch gravatar imageBernd Bausch ( 2018-03-11 19:18:35 -0600 )edit

Is it possible to give more control when attaching to a running instance in future?

yafeng gravatar imageyafeng ( 2018-03-13 03:13:07 -0600 )edit

If you have a need for this feature, I suggest you state it on the operator and/or developer mailing list.

Bernd Bausch gravatar imageBernd Bausch ( 2018-03-14 01:04:29 -0600 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2018-03-08 02:27:16 -0600

Seen: 325 times

Last updated: Mar 08 '18