mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/yunionio/cloudpods.git
synced 2026-09-20 16:13:56 +08:00
fix(host): fix get disk pci addr (#14173)
Fix hot-plug virtio disk failed. after add usb and rng deivce, available pci address should update. Signed-off-by: wanyaoqi <wanyaoqi1995@163.com> Co-authored-by: wanyaoqi <wanyaoqi1995@163.com>
This commit is contained in:
@@ -205,7 +205,8 @@ func (s *SKVMGuestInstance) getDriveDesc(disk api.GuestdiskJsonDesc, isArm bool)
|
||||
}
|
||||
|
||||
func (s *SKVMGuestInstance) GetDiskAddr(idx int) int {
|
||||
var base = 5
|
||||
// host-bridge / isa-bridge / vga / serial / network / block / usb / rng
|
||||
var base = 7
|
||||
if s.IsVdiSpice() {
|
||||
base += 10
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user