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

[libvirt] [PATCH v3 07/14] parallels: don't fill net adapter model for containers



Network adapter model has no sense for container,
so we shouldn't set it to e1000 in
parallelsDomainDeviceDefPostParse.

Signed-off-by: Dmitry Guryanov <dguryanov parallels com>
---
 src/parallels/parallels_driver.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/parallels/parallels_driver.c b/src/parallels/parallels_driver.c
index 3102007..c3285db 100644
--- a/src/parallels/parallels_driver.c
+++ b/src/parallels/parallels_driver.c
@@ -174,7 +174,7 @@ parallelsDomainDefPostParse(virDomainDefPtr def,
 
 static int
 parallelsDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
-                                  const virDomainDef *def ATTRIBUTE_UNUSED,
+                                  const virDomainDef *def,
                                   virCapsPtr caps ATTRIBUTE_UNUSED,
                                   void *opaque ATTRIBUTE_UNUSED)
 {
@@ -184,6 +184,7 @@ parallelsDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
         (dev->data.net->type == VIR_DOMAIN_NET_TYPE_NETWORK ||
          dev->data.net->type == VIR_DOMAIN_NET_TYPE_BRIDGE) &&
         !dev->data.net->model &&
+        STREQ(def->os.type, "hvm") &&
         VIR_STRDUP(dev->data.net->model, "e1000") < 0)
         goto cleanup;
 
-- 
2.1.0


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