0
We have an OpenStack instance configured with multiple images, including CentOS, Redhat, and Ubuntu. When creating a new instance, the root partition attaches as SCSI without any issues. All images are correctly set to use the appropriate drivers.
However, a problem arises when generating a snapshot from a running instance and then creating a new server using this volume snapshot. In this scenario, the root partition appears as "/dev/vda". The more troublesome situation occurs when a new volume is attached, which then appears as "/dev/sda". This new volume becomes the main disk, leading to complications during server reboot as it can't locate a valid boot partition.
We are in need of a solution for this issue. Currently, the workaround involves adding metadata to the flavors: specifically, setting "boot_menu=true". This addition causes a "Press ESC for boot menu" message to appear in the console. While this provides a manual option to select the correct boot disk (VDA), it's not an ideal fix.
I've attempted to apply the metadata value to the flavor, but I'm unsure how to set it as the default for snapshots. Here's what I've tried so far:
$ openstack flavor set --property hw:scsi_model=virtio-scsi zzzz-zzz-zzz-zzz
$ openstack flavor set --property hw:disk_bus=scsi zzzz-zzz-zzz-zzz
Do you have any suggestions or recommendations for resolving this issue?
Edit: posible solution but looking for one using a different approach.
Identified a possible parameter can be added to nova compute nodes :
[libvirt]
disk_prefix=sd
This will force to libvirt attach new disk devices using /dev/sdX
It is documented here:
https://docs.openstack.org/ocata/config-reference/compute/config-options.html
I prefer to use some kind of metadata to avoid global side effects changing this setting globally.
Edit 2:
This solution only solve the different letter for VDA and SDA, but the second volume attached still acting as boot device.