From 500f23767a697a16dd57239daab4af3ef1d44137 Mon Sep 17 00:00:00 2001
From: Mikhail Feoktistov <mfeoktistov@virtuozzo.com>
Date: Tue, 12 Apr 2016 09:57:56 -0400
Subject: [PATCH] vz: correct iomode check

Virtuozzo hypervisor supports native iomode.
So we should allow to add disk with iomode "native" or "default".
---
 src/vz/vz_utils.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/vz/vz_utils.c b/src/vz/vz_utils.c
index 64e469c6b2..99c0f84e81 100644
--- a/src/vz/vz_utils.c
+++ b/src/vz/vz_utils.c
@@ -329,9 +329,10 @@ vzCheckDiskUnsupportedParams(virDomainDiskDefPtr disk)
         return -1;
     }
 
-    if (disk->iomode) {
+    if (disk->iomode != VIR_DOMAIN_DISK_IO_DEFAULT &&
+        disk->iomode != VIR_DOMAIN_DISK_IO_NATIVE) {
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
-                       _("Setting disk io mode is not "
+                       _("Only native iomode is "
                          "supported by vz driver."));
         return -1;
     }
-- 
GitLab