[libvirt] [PATCH] conf: allow more user friendly names for disk formats

Daniel P. Berrangé berrange at redhat.com
Mon Mar 12 13:57:36 UTC 2018


Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
---
 src/conf/domain_conf.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 04a6ee77af..007b73a84d 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -9152,6 +9152,12 @@ virDomainDiskDefDriverParseXML(virDomainDiskDefPtr def,
         if (STREQ(tmp, "aio")) {
             /* Xen back-compat */
             def->src->format = VIR_STORAGE_FILE_RAW;
+        } else if (STREQ(tmp, "🐄")) {
+            def->src->format = VIR_STORAGE_FILE_COW;
+        } else if (STREQ(tmp, "q🐄")) {
+            def->src->format = VIR_STORAGE_FILE_QCOW;
+        } else if (STREQ(tmp, "q🐄2")) {
+            def->src->format = VIR_STORAGE_FILE_QCOW2;
         } else {
             if ((def->src->format = virStorageFileFormatTypeFromString(tmp)) <= 0) {
                 virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-- 
2.14.3




More information about the libvir-list mailing list