diff mbox

qemu-img: Fix error "Unknown option 'size'" when using host_device format

Message ID 85f01a8b1003021052l5211388at956f6dd49e739162@mail.gmail.com
State New
Headers show

Commit Message

Bitti March 2, 2010, 6:52 p.m. UTC
qemu-kvm-0.11.0

When I run:
sudo qemu-img convert ubuntu-kvm/disk0.qcow2 -O host_device /dev/vg01/vm_test

I get this:
Unknown option 'size'

Ubuntu Bug:
https://bugs.launchpad.net/ubuntu/+source/qemu-kvm/+bug/460542

Signed-off-by: Bitti <bitaround@gmail.com>
---

Comments

Kevin Wolf March 3, 2010, 9:58 a.m. UTC | #1
Am 02.03.2010 19:52, schrieb Bitti:
> qemu-kvm-0.11.0
> 
> When I run:
> sudo qemu-img convert ubuntu-kvm/disk0.qcow2 -O host_device /dev/vg01/vm_test
> 
> I get this:
> Unknown option 'size'
> 
> Ubuntu Bug:
> https://bugs.launchpad.net/ubuntu/+source/qemu-kvm/+bug/460542
> 
> Signed-off-by: Bitti <bitaround@gmail.com>

This has been fixed in master by commit 0b4ce02e which is contained in
0.12, too.

Kevin
diff mbox

Patch

--- block/raw-posix.c.orig	2009-09-23 10:30:02.000000000 +0300
+++ block/raw-posix.c	2009-10-25 18:22:08.780047000 +0200
@@ -1172,6 +1172,15 @@ 
     return ret;
 }
 
+static QEMUOptionParameter host_device_create_options[] = {
+    {
+        .name = BLOCK_OPT_SIZE,
+        .type = OPT_SIZE,
+        .help = "Virtual disk size"
+    },
+    { NULL }
+};
+
 static BlockDriver bdrv_host_device = {
     .format_name	= "host_device",
     .instance_size	= sizeof(BDRVRawState),
@@ -1197,6 +1206,7 @@ 
     .bdrv_aio_ioctl     = hdev_aio_ioctl,
 #endif
 #endif
+    .create_options = host_device_create_options,
 };
 
 #ifdef __linux__