Ask Your Question
0

How to assign two disks to different targets with virtio-scsi

asked 2017-06-20 04:14:02 -0500

yafeng gravatar image

updated 2017-06-20 07:31:00 -0500

Hi,

I creates a VM with two virtio-scsi disk attached with the help of the yaml script. The content looks like as below:

  OMU:
    type: OS::Nova::Server
    properties:
      name: OMU
      image: { get_param: ipxe_image_name }
      flavor: { get_param: flavor_omu }
      block_device_mapping_v2:
        - { "boot_index": 1, "disk_bus": scsi, "device_name": sda, "volume_id": { get_param: disk0} }
        - { "boot_index": 2, "disk_bus": scsi, "device_name": sdb, "volume_id": { get_param: disk1} }
      networks: { get_attr: [OMU_ports, port-map] }

Then the two disks are always attached to the same target. Is it possible to assign two disks to different targets?

Thanks

Br. Yafeng

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2017-06-20 09:30:15 -0500

Looking at the API and this page, it would seem that you can't ask Nova to set the SCSI address of a disk. If you use libvirt and have access to the compute nodes, you could change the address in the VM's XML file.

edit flag offensive delete link more
0

answered 2017-06-21 03:07:56 -0500

yafeng gravatar image

Hi,

Seabios only can detect the first disk if two disks are attached to the same target. If ipxe is the first disk and we expect ipxe to boot from the second disk, the boot fails since seabios only can detect the first disk. And if one virtio-scsi disk is detached and later attached again to the same VM, it becomes virto-blk by default.

Thanks. Yafeng

edit flag offensive delete link more

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: 2017-06-20 04:14:02 -0500

Seen: 66 times

Last updated: Jun 21 '17