virt-install: Add ability to specify queues for controller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I've use case where I need to specify <driver queues='$vCPU' /> option
to virtio-scsi controller[1].Currently it is not possible to tell
virt-install about the number of queues.
I've created a patch looking at --network code. I'm attaching my patch
with this mail.
I would be happy to get feed back on the same.

[1] https://libvirt.org/formatdomain.html#elementsControllers

Thanks and regards.
--

Vasudev Kamath
From 6f61ee61d222f561f59eedac5cd7676ae7ea6a73 Mon Sep 17 00:00:00 2001
From: Vasudeva Kamath <kamathvasudev@xxxxxxxxx>
Date: Tue, 12 Mar 2019 14:26:57 +0530
Subject: [PATCH] virt-install: Add driver argument to --controller

<controller> can have additional <driver> sub element with queues as property,
which is currently not exposed via virt-install. This commit exposes this option
similar to queues in network configuration.
---
 virtinst/cli.py                | 1 +
 virtinst/devices/controller.py | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/virtinst/cli.py b/virtinst/cli.py
index 439661e9..dce0a72c 100644
--- a/virtinst/cli.py
+++ b/virtinst/cli.py
@@ -2646,6 +2646,7 @@ class ParserController(VirtCLIParser):
         cls.add_arg("model", "model")
         cls.add_arg("index", "index")
         cls.add_arg("master_startport", "master")
+        cls.add_arg("driver_queues", "driver_queues")
 
         cls.add_arg(None, "address", cb=cls.set_server_cb)
 
diff --git a/virtinst/devices/controller.py b/virtinst/devices/controller.py
index e3d3db23..c9d8b3e1 100644
--- a/virtinst/devices/controller.py
+++ b/virtinst/devices/controller.py
@@ -86,13 +86,14 @@ class DeviceController(Device):
         return ctrl
 
 
-    _XML_PROP_ORDER = ["type", "index", "model", "master_startport"]
+    _XML_PROP_ORDER = ["type", "index", "model", "master_startport", "driver_queues"]
 
     type = XMLProperty("./@type")
     model = XMLProperty("./@model")
     vectors = XMLProperty("./@vectors", is_int=True)
     ports = XMLProperty("./@ports", is_int=True)
     master_startport = XMLProperty("./master/@startport", is_int=True)
+    driver_queues = XMLProperty("./driver/@queues", is_int=True)
 
     index = XMLProperty("./@index", is_int=True)
 
-- 
2.20.1

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list

[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux