Ask Your Question
0

How to attach volume to scsi controller

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

yafeng gravatar image

Hi,

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
0

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

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:

compute/api.py:

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:

api/openstack/compute/volumes.py:

    try:
        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

Comments

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 -0500 )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 -0500 )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 -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: 2018-03-08 02:27:16 -0500

Seen: 51 times

Last updated: Mar 08