apache / apache/cloudstack

Unable to add more than 2 volumes or networks to a vm deployed from a UEFI image

オープン
#11,212 コメント 6 件 リアクション 0 件 担当者 0 名 GitHub で見る
status:has-work-around type:bug
主要言語
Java
スター
3.1k
フォーク
1.4k
平均マージ
6日 19時間
マージ済み PR(30日)
32

説明

### problem

Unable to add more than 2 volume or network to a vm deployed from a UEFI image

### versions

ACS 4.20.1

### The steps to reproduce the bug

1. Register a UEFI image Template

https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img

2. Deploy the vm by enabling UEFI secure mode in advanced settings

Image

3. Once the vm is in running state , attach multiple volumes , Exception observed

Logs

```
2025-07-16 04:28:28,947 DEBUG [kvm.storage.KVMStorageProcessor] (AgentRequest-Handler-3:[]) (logid:) Attaching device:

c6ef61d1300f442a86e5

2025-07-16 04:28:28,953 WARN [kvm.storage.KVMStorageProcessor] (AgentRequest-Handler-3:[]) (logid:) Failed to attach device to i-2-653-VM: internal error: No more available PCI slots
2025-07-16 04:28:28,953 DEBUG [kvm.storage.KVMStorageProcessor] (AgentRequest-Handler-3:[]) (logid:) Failed to attach volume [id: 394, uuid: c6ef61d1-300f-442a-86e5-e31f482b64ab, name: test2, path: c6ef61d1-300f-442a-86e5-e31f482b64ab], due to org.libvirt.LibvirtException: internal error: No more available PCI slots

```

4. Try to attach multiple networks, Exception observed

```

2025-07-16 04:36:02,019 DEBUG [kvm.resource.BridgeVifDriver] (AgentRequest-Handler-1:[]) (logid:) Successfully executed process [2045246] for command [/usr/share/cloudstack-common/scripts/vm/network/vnet/modifyvlan.sh -v 2144 -p eth1 -b breth1-2144 -o add ].
2025-07-16 04:36:02,021 WARN [resource.wrapper.LibvirtPlugNicCommandWrapper] (AgentRequest-Handler-1:[]) (logid:) Plug Nic failed due to org.libvirt.LibvirtException: internal error: No more available PCI slots org.libvirt.LibvirtException: internal error: No more available PCI slots
at org.libvirt.ErrorHandler.processError(Unknown Source)
at org.libvirt.ErrorHandler.processError(Unknown Source)

```

Workaround

Change the following settings on the vm after stopping

nicAdapter to e1000 or rtl813

rootDiskController to scsi or sata

https://prnt.sc/9wSS5uX0tVYX

### What to do about it?

If the Template is a UEFI enabled , Cloudstack should check if the template is UEFI enabled or not and populated the necessary settings for root disk and nic adapter

yum install libguestfs-tools

virt-inspector --format=raw -a noble-server-cloudimg-amd64.img 2>/dev/null | grep -i 'true'

virt-inspector -a AlmaLinux-8-GenericCloud-UEFI-latest.x86_64.qcow2 2>/dev/null | grep -i 'true'

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まずログに示されている KVMStorageProcessor と LibvirtPlugNicCommandWrapper のパスから始め、UEFI VM のルートディスクと NIC の設定がどのように選択されるかを調べます。Noble UEFI イメージで再現し、コントローラーやアダプターの設定を変更せずに複数のボリュームとネットワークが接続されることを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java, linux
領域
cloud, infrastructure
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。