Reviewed-by: Rodrigo Trujillo <rodrigo.trujillo(a)linux.vnet.ibm.com>
On 12/08/2015 11:52 AM, Jose Ricardo Ziviani wrote:
- Libvirt does not support multi-function devices currently. This
commit disables + and - button while the VM is running if the PCI
device is multi-function.
Signed-off-by: Jose Ricardo Ziviani <joserz(a)linux.vnet.ibm.com>
---
ui/js/src/kimchi.guest_edit_main.js | 3 +++
1 file changed, 3 insertions(+)
diff --git a/ui/js/src/kimchi.guest_edit_main.js b/ui/js/src/kimchi.guest_edit_main.js
index c9a4c94..b358f59 100644
--- a/ui/js/src/kimchi.guest_edit_main.js
+++ b/ui/js/src/kimchi.guest_edit_main.js
@@ -486,6 +486,9 @@ kimchi.guest_edit_main = function() {
$('.body', '#form-guest-edit-pci').append(itemNode);
pciEnabled || $('button', itemNode).remove();
$('button i', itemNode).addClass(iconClass);
+ if (kimchi.thisVMState === "running" &&
arrPCIDevices[i].multifunction) {
+ $('button', itemNode).prop("disabled", true);
+ }
$('button', itemNode).on('click', function(event) {
event.preventDefault();
var obj = $(this);