게스트 VM에서 장치 이름 순서를 수정하는 방법(virsh가 VM을 다시 시작한 후 장치 이름 순서가 변경됨)

게스트 VM에서 장치 이름 순서를 수정하는 방법(virsh가 VM을 다시 시작한 후 장치 이름 순서가 변경됨)

내 장치 XML 정의:

첫 번째 가상 머신에는 루트 볼륨이 하나만 있습니다.

<disk type='file' device='disk' snapshot='external'>
  <driver name='qemu' type='qcow2' cache='none'/>
  <source file='/dev/967b07c5ca8f429b9647785e942cbb4b/70395cacf62e49ec95246a919d449f64'/>
  <backingStore type='block' index='1'>
    <format type='qcow2'/>
    <source dev='/dev/967b07c5ca8f429b9647785e942cbb4b/ce7774f0634a4d098a8d4e37838f4b6f'/>
    <backingStore/>
  </backingStore>
  <target dev='vda' bus='virtio'/>
  <boot order='1'/>
  <alias name='virtio-disk0'/>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
</disk>

그런 다음 scsi에서 두 디스크를 모두 핫스왑했습니다.

<disk type='file' device='disk' snapshot='external'>
  <driver name='qemu' type='qcow2' cache='none'/>
  <source file='/dev/967b07c5ca8f429b9647785e942cbb4b/6d38ee3091f64ca2bcb47b9dbd3c5901'/>
  <backingStore/>
  <target dev='sdb' bus='scsi'/>
  <wwn>0x000fefc4071262fb</wwn>
  <alias name='scsi0-0-0-1'/>
  <address type='drive' controller='0' bus='0' target='0' unit='1'/>
</disk>
<disk type='file' device='disk' snapshot='external'>
  <driver name='qemu' type='qcow2' cache='none'/>
  <source file='/dev/967b07c5ca8f429b9647785e942cbb4b/b1dcd7497e544284aba954b52ffc4754'/>
  <backingStore/>
  <target dev='sdd' bus='scsi'/>
  <wwn>0x000f0683ab0ad875</wwn>
  <alias name='scsi0-0-0-2'/>
  <address type='drive' controller='0' bus='0' target='0' unit='2'/>
</disk>

게스트 가상 머신의 장치 이름 순서는 플러그 순서와 일치하며 디스크 크기로 구분됩니다.

Disk /dev/sda: 6 MB, 6291456 bytes
1 heads, 12 sectors/track, 1024 cylinders
Units = cylinders of 12 * 512 = 6144 bytes
.
Disk /dev/sdb: 7 MB, 7340032 bytes
1 heads, 14 sectors/track, 1024 cylinders
Units = cylinders of 14 * 512 = 7168 bytes

그러나 virsh를 통해 가상 머신을 다시 시작하면 디스크 이름 순서가 반대가 됩니다. xml 정의는 변경되지 않았습니다. 장치 이름 정렬을 수정하는 방법은 무엇입니까?

관련 정보