nova does not correctly support HW_DISK_BUS=sata or usb for kvm/qemu
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
sean mooney |
Bug Description
Description
===========
The hw_disk_bus image metadata key
https:/
allows users to specify the bus to which guest hard disk images are attched for libvirt instances.
The valid values of hw_disk_bus are ["scsi"
The libvirt driver also defieds the list of valid buses per virt_type
here https:/
valid_bus = {
'qemu': ['virtio', 'scsi', 'ide', 'usb', 'fdc', 'sata'],
'kvm': ['virtio', 'scsi', 'ide', 'usb', 'fdc', 'sata'],
'xen': ['xen', 'ide'],
'uml': ['uml'],
'lxc': ['lxc'],
}
when setting this key to sata or usb instead of having the disk attached to the requested bus
the disk is attached to the scsi bus instead.
this is because in nova/virt/
in get_dev_
https:/
then later we guess what the correct bus is from the prefix in get_disk_
https:/
this mapping form disk bus to prefix is lossy as as sata/scsi and usb are all mapped to the sd prefix. so when we guess in get_disk_
Steps to reproduce
==================
run devstack with default setting
source openrc
set hw_disk_bus=sata on image
e.g. openstack image set --property hw_disk_bus=sata my-image
boot a vm with that image
run virsh dumpxml on instance and check the disk bus.
Expected result
===============
instance boots and disk bus used matches hw_disk_bus image metadata value.
e.g. sata
Actual result
=============
instnace boots and disk bus used is scsi
Environment
===========
1. Exact version of OpenStack you are running. See the following
stable/pike but this is present in master and has been an issue for 5 years
since https:/
incorrectly called get_disk_
2. Which hypervisor did you use?
Libvirt + KVM
2. Which storage type did you use?
default local image backend for nova.
3. Which networking type did you use?
Neutron with OpenVSwitch.
not related to this issue.
tags: | added: libvirt |
Changed in nova: | |
importance: | Undecided → Medium |
status: | New → Confirmed |
it will be a few days before i get a change to work on this but ill try to submit a patch next week.