[PATCH 22/23] Don't force existance of a USB controller for containers

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

 



From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>

The virDomainDefCompatibleDevice method checks if the domain
has a USB controller for any USB devices. This is not required
when using containers, so skip that check

Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
---
 src/conf/domain_conf.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index d97bbc8..43336d7 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -14530,12 +14530,14 @@ int
 virDomainDefCompatibleDevice(virDomainDefPtr def,
                              virDomainDeviceDefPtr dev)
 {
-    if (!virDomainDefHasUSB(def) &&
-        virDomainDeviceIsUSB(dev)) {
-        virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
-                       _("Device configuration is not compatible: "
-                         "Domain has no USB bus support"));
-        return -1;
+    if (virDomainDeviceIsUSB(dev)) {
+        if (STRNEQ(def->os.type, "exe") &&
+            !virDomainDefHasUSB(def)) {
+            virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+                           _("Device configuration is not compatible: "
+                             "Domain has no USB bus support"));
+            return -1;
+        }
     }
 
     return 0;
-- 
1.8.0.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]