]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Add 'nbd' as a valid filesystem driver type
authorDaniel P. Berrange <berrange@redhat.com>
Mon, 22 Apr 2013 14:06:17 +0000 (15:06 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Mon, 13 May 2013 12:15:19 +0000 (13:15 +0100)
The <filesystem> element can now accept a <driver type='nbd'/>
as an alternative to 'loop'. The benefit of NBD is support
for non-raw disk image formats.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
docs/formatdomain.html.in
docs/schemas/domaincommon.rng
src/conf/domain_conf.c
src/conf/domain_conf.h
src/qemu/qemu_command.c
tests/lxcxml2xmldata/lxc-disk-formats.xml

index 31c132b94eced3236d62396684b7d969490dad49..9ade5072bdb3725337f546376dcba5961f97b1c8 100644 (file)
             the <code>type</code> attribute selects the primary
             backend driver name, while the <code>format</code>
             attribute provides the format type. For example, LXC
-            supports a type of "loop", with a format of "raw". QEMU
-            supports a type of "path" or "handle", but no formats.
+            supports a type of "loop", with a format of "raw" or
+            "nbd" with any format. QEMU supports a type of "path"
+            or "handle", but no formats.
           </li>
         </ul>
       </dd>
index 6078b7a7588673e0ec6a87532581b9facd18e93b..800442896e7cb56e1308abb18bf99358e7b1c1c3 100644 (file)
             <value>path</value>
             <value>handle</value>
             <value>loop</value>
+            <value>nbd</value>
           </choice>
         </attribute>
       </optional>
index ddf9ace16e7654e6d562cbef91d710ff42cd150d..862b9970cbf008023e74b8b410d9d84e09ae4685 100644 (file)
@@ -343,7 +343,8 @@ VIR_ENUM_IMPL(virDomainFSDriverType, VIR_DOMAIN_FS_DRIVER_TYPE_LAST,
               "default",
               "path",
               "handle",
-              "loop")
+              "loop",
+              "nbd")
 
 VIR_ENUM_IMPL(virDomainFSAccessMode, VIR_DOMAIN_FS_ACCESSMODE_LAST,
               "passthrough",
index b5a0db83d23a9b6827bfeecdd51efda098ede74f..a9d34105d9470699237f7f5865ac089459b4899a 100644 (file)
@@ -801,6 +801,7 @@ enum virDomainFSDriverType {
     VIR_DOMAIN_FS_DRIVER_TYPE_PATH,
     VIR_DOMAIN_FS_DRIVER_TYPE_HANDLE,
     VIR_DOMAIN_FS_DRIVER_TYPE_LOOP,
+    VIR_DOMAIN_FS_DRIVER_TYPE_NBD,
 
     VIR_DOMAIN_FS_DRIVER_TYPE_LAST
 };
index 372e1a3215301e2ee82dfda139e76bdb31060db0..eddc2636800dd07e4b8a5d2df7bced475f26f7ca 100644 (file)
@@ -140,6 +140,7 @@ VIR_ENUM_IMPL(qemuDomainFSDriver, VIR_DOMAIN_FS_DRIVER_TYPE_LAST,
               "local",
               "local",
               "handle",
+              NULL,
               NULL);
 
 
index da53cf22b0e1ee35b4dadd3d7c9a7e5e76c59dc2..e9530650b414d66b022f8bfa98a2509813cb4ccd 100644 (file)
       <source file='/root/container.img'/>
       <target dir='/'/>
     </filesystem>
+    <filesystem type='file' accessmode='passthrough'>
+      <driver type='nbd' format='qcow2'/>
+      <source file='/root/container.qcow2'/>
+      <target dir='/home'/>
+    </filesystem>
     <console type='pty'>
       <target type='lxc' port='0'/>
     </console>