$ nova rebuild vm1 cirros-scsi
$ stack@devstack-adam:~/devstack$ nova show vm1 | grep image
| image | cirros-scsi (8ce9540e-a802-4e39-a1b4-20cbff14ec18)
$ virsh dumpxml instance-00000003 | grep '.*target.*bus'
<target dev='vda' bus='virtio'/>
The problem is that despite property hw_disk_bus set on cirros-scsi (8ce9540e-a802-4e39-a1b4-20cbff14ec18), 'virtio' (and vda) is not replaced in the instance's XML file.
The expected result IMO should be like a normal boot from this image:
How to reproduce it:
Two images, one of them with with hw_disk_bus=scsi and hw_scsi_ model=virtio- scsi properties:
$ glance image-show 48888bbf- ddbf-4ede- a30f-b5b4a8e688 76 ------- -----+- ------- ------- ------- ------- ------- --+ ------- -----+- ------- ------- ------- ------- ------- --+ 63c2cba4ac796bc d9 | 24T08:45: 48Z | ddbf-4ede- a30f-b5b4a8e688 76 | 0.3.4-i386- disk | 0842bd66d71a0d5 74 | 24T08:45: 52Z | ------- -----+- ------- ------- ------- ------- ------- --+
+------
| Property | Value |
+------
| checksum | 79b4436412283bb
| container_format | bare |
| created_at | 2017-02-
| disk_format | qcow2 |
| id | 48888bbf-
| min_disk | 0 |
| min_ram | 0 |
| name | cirros-
| owner | 277132bf94b040f
| protected | False |
| size | 12506112 |
| status | active |
| tags | [] |
| updated_at | 2017-02-
| virtual_size | None |
| visibility | public |
+------
$ glance image-show 8ce9540e- a802-4e39- a1b4-20cbff14ec 18 ------- -----+- ------- ------- ------- ------- ------- --+ ------- -----+- ------- ------- ------- ------- ------- --+ 63c2cba4ac796bc d9 | 24T09:07: 44Z | a802-4e39- a1b4-20cbff14ec 18 | 19ddcd7c9fb245e c1 | 24T09:07: 45Z | ------- -----+- ------- ------- ------- ------- ------- --+
+------
| Property | Value |
+------
| checksum | 79b4436412283bb
| container_format | bare |
| created_at | 2017-02-
| disk_format | qcow2 |
| hw_disk_bus | scsi |
| hw_scsi_model | virtio-scsi |
| id | 8ce9540e-
| min_disk | 0 |
| min_ram | 0 |
| name | cirros-scsi |
| owner | bd560276f6bd482
| protected | False |
| size | 12506112 |
| status | active |
| tags | [] |
| updated_at | 2017-02-
| virtual_size | None |
| visibility | shared |
+------
$ nova boot --flavor m1.small --image 48888bbf- ddbf-4ede- a30f-b5b4a8e688 76 vm1
$ virsh dumpxml instance-00000003 | grep '.*target.*bus'
<target dev='vda' bus='virtio'/>
$ nova rebuild vm1 cirros-scsi adam:~/ devstack$ nova show vm1 | grep image a802-4e39- a1b4-20cbff14ec 18)
$ stack@devstack-
| image | cirros-scsi (8ce9540e-
$ virsh dumpxml instance-00000003 | grep '.*target.*bus'
<target dev='vda' bus='virtio'/>
The problem is that despite property hw_disk_bus set on cirros-scsi (8ce9540e- a802-4e39- a1b4-20cbff14ec 18), 'virtio' (and vda) is not replaced in the instance's XML file.
The expected result IMO should be like a normal boot from this image:
$ nova boot --flavor m1.small --image 8ce9540e- a802-4e39- a1b4-20cbff14ec 18 vm2
$ virsh dumpxml instance-00000004 | grep '.*target.*bus'
<target dev='sda' bus='scsi'/>