All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] Patch: Adding ability for qemu-img to create SCSI VMware disk images
@ 2009-05-22 10:29 Aaron Mason
  2009-05-22 16:41 ` Anthony Liguori
  0 siblings, 1 reply; 11+ messages in thread
From: Aaron Mason @ 2009-05-22 10:29 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 10990 bytes --]

Hi,

I needed to create a heap of virtual hard drives to practice creating RAID
arrays.  Since qemu-img only creates IDE images, creating a large number of
images for this was a very cumbersome excercise.  I compared a SCSI image to
an IDE image, and the only difference is the adapter type.  This patch adds
command line parameters to qemu-img to specify either a BusLogic or LSI
Logic image for 'create' and 'convert', and extends the 'info' command to
show the adapter type.  I have also updated the file qemu-img.text and the
help output to display the new parameters, and put in a parameter that was
missing.

The patch is as follows, and can be applied to 0.10.5 stable (and latest
snapshot if qemu-img hasn't changed) with patch -Np1:

diff -Naur qemu-0.10.5.orig/block-vmdk.c qemu-0.10.5/block-vmdk.c
--- qemu-0.10.5.orig/block-vmdk.c    Thu May 21 06:46:58 2009
+++ qemu-0.10.5/block-vmdk.c    Fri May 22 20:09:44 2009
@@ -692,6 +692,7 @@
     int fd, i;
     VMDK4Header header;
     uint32_t tmp, magic, grains, gd_size, gt_size, gt_count;
+
     static const char desc_template[] =
         "# Disk DescriptorFile\n"
         "version=1\n"
@@ -709,10 +710,19 @@
         "ddb.geometry.cylinders = \"%" PRId64 "\"\n"
         "ddb.geometry.heads = \"16\"\n"
         "ddb.geometry.sectors = \"63\"\n"
-        "ddb.adapterType = \"ide\"\n";
+        "ddb.adapterType = \"%s\"\n";
     char desc[1024];
+    char adaptType[10];
     const char *real_filename, *temp_str;

+    /* If neither BusLogic or LSI logic is requested, default to IDE -
thirdwheel, 17/04/2009 */
+    if (flags & BLOCK_FLAG_BUSLOGIC)
+    strcpy(adaptType, "buslogic");
+    else if (flags & BLOCK_FLAG_LSILOGIC)
+    strcpy(adaptType, "lsilogic");
+    else
+    strcpy(adaptType, "ide");
+
     /* XXX: add support for backing file */
     if (backing_file) {
         return vmdk_snapshot_create(filename, backing_file);
@@ -784,7 +794,8 @@
     snprintf(desc, sizeof(desc), desc_template, (unsigned int)time(NULL),
              total_size, real_filename,
              (flags & BLOCK_FLAG_COMPAT6 ? 6 : 4),
-             total_size / (int64_t)(63 * 16));
+             total_size / (int64_t)(63 * 16),
+         adaptType);

     /* write the descriptor */
     lseek(fd, le64_to_cpu(header.desc_offset) << 9, SEEK_SET);
diff -Naur qemu-0.10.5.orig/block_int.h qemu-0.10.5/block_int.h
--- qemu-0.10.5.orig/block_int.h    Thu May 21 06:46:58 2009
+++ qemu-0.10.5/block_int.h    Fri May 22 20:09:44 2009
@@ -36,6 +36,10 @@
     BlockDriverAIOCB *free_aiocb;
 } AIOPool;

+/* Added by thirdwheel to support BusLogic and LSI logic based VMDKs -
17/04/09 */
+#define BLOCK_FLAG_BUSLOGIC    8
+#define BLOCK_FLAG_LSILOGIC    16
+
 struct BlockDriver {
     const char *format_name;
     int instance_size;
diff -Naur qemu-0.10.5.orig/qemu-img.c qemu-0.10.5/qemu-img.c
--- qemu-0.10.5.orig/qemu-img.c    Thu May 21 06:47:00 2009
+++ qemu-0.10.5/qemu-img.c    Fri May 22 20:09:44 2009
@@ -58,9 +58,9 @@
            "QEMU disk image utility\n"
            "\n"
            "Command syntax:\n"
-           "  create [-e] [-6] [-b base_image] [-f fmt] filename [size]\n"
+           "  create [-e] [-6] [-S] [-L] [-b base_image] [-f fmt] filename
[size]\n"
            "  commit [-f fmt] filename\n"
-           "  convert [-c] [-e] [-6] [-f fmt] [-O output_fmt] [-B
output_base_image] filename [filename2 [...]] output_filename\n"
+           "  convert [-c] [-e] [-6] [-S] [-L] [-f fmt] [-O output_fmt] [-B
output_base_image] filename [filename2 [...]] output_filename\n"
            "  info [-f fmt] filename\n"
            "  snapshot [-l | -a snapshot | -c snapshot | -d snapshot]
filename\n"
            "\n"
@@ -81,6 +81,8 @@
            "  '-c' indicates that target image must be compressed (qcow
format only)\n"
            "  '-e' indicates that the target image must be encrypted (qcow
format only)\n"
            "  '-6' indicates that the target image must use compatibility
level 6 (vmdk format only)\n"
+       "  '-S' indicates that the target image must be a BusLogic SCSI
virtual disk (vmdk format only)\n"
+       "  '-L' indicates that the target image must be a LSI Logic SCSI
virtual disk (vmdk format only)\n"
            "  '-h' with or without a command shows this help and lists the
supported formats\n"
            "\n"
            "Parameters to snapshot subcommand:\n"
@@ -226,7 +228,7 @@

     flags = 0;
     for(;;) {
-        c = getopt(argc, argv, "b:f:he6");
+        c = getopt(argc, argv, "b:f:he6SL");
         if (c == -1)
             break;
         switch(c) {
@@ -245,6 +247,12 @@
         case '6':
             flags |= BLOCK_FLAG_COMPAT6;
             break;
+    case 'S':
+        flags |= BLOCK_FLAG_BUSLOGIC;
+        break;
+    case 'L':
+        flags |= BLOCK_FLAG_LSILOGIC;
+        break;
         }
     }
     if (optind >= argc)
@@ -275,12 +283,23 @@
     drv = bdrv_find_format(fmt);
     if (!drv)
         error("Unknown file format '%s'", fmt);
+    if (flags & BLOCK_FLAG_BUSLOGIC && drv != &bdrv_vmdk)
+        error("BusLogic images not supported for this file format");
+    if (flags & BLOCK_FLAG_LSILOGIC && drv != &bdrv_vmdk)
+        error("LSI Logic images not supported for this file format");
+    if (flags & BLOCK_FLAG_LSILOGIC && flags & BLOCK_FLAG_BUSLOGIC)
+        error("Please select either LSI Logic or BusLogic, not both");
+
     printf("Formatting '%s', fmt=%s",
            filename, fmt);
     if (flags & BLOCK_FLAG_ENCRYPT)
         printf(", encrypted");
     if (flags & BLOCK_FLAG_COMPAT6)
         printf(", compatibility level=6");
+    if (flags & BLOCK_FLAG_BUSLOGIC)
+        printf(", in BusLogic mode");
+    if (flags & BLOCK_FLAG_LSILOGIC)
+        printf(", in LSI Logic mode");
     if (base_filename) {
         printf(", backing_file=%s",
                base_filename);
@@ -415,7 +434,7 @@
     out_baseimg = NULL;
     flags = 0;
     for(;;) {
-        c = getopt(argc, argv, "f:O:B:hce6");
+        c = getopt(argc, argv, "f:O:B:hce6SL");
         if (c == -1)
             break;
         switch(c) {
@@ -440,6 +459,12 @@
         case '6':
             flags |= BLOCK_FLAG_COMPAT6;
             break;
+    case 'S':
+        flags |= BLOCK_FLAG_BUSLOGIC;
+        break;
+    case 'L':
+        flags |= BLOCK_FLAG_LSILOGIC;
+        break;
         }
     }

@@ -473,6 +498,15 @@
         error("Encryption not supported for this file format");
     if (flags & BLOCK_FLAG_COMPAT6 && drv != &bdrv_vmdk)
         error("Alternative compatibility level not supported for this file
format");
+    if (flags & BLOCK_FLAG_BUSLOGIC && drv != &bdrv_vmdk)
+        error("BusLogic images not supported for this file format");
+    if (flags & BLOCK_FLAG_LSILOGIC && drv != &bdrv_vmdk)
+        error("LSI Logic images not supported for this file format");
+    if (flags & BLOCK_FLAG_LSILOGIC && flags & BLOCK_FLAG_BUSLOGIC)
+        error("Please select either LSI Logic or BusLogic, not both");
+    /* I'm not sure if buslogic and/or lsi logic images are supported at
compatibility level 6 - if not, uncomment this until it can be tested */
+    /*if ((flags & BLOCK_FLAG_LSILOGIC || flags & BLOCK_FLAG_BUSLOGIC) &&
BLOCK_FLAG_COMPAT6) */
+        /*error("SCSI VMDK images are not currently supported in
compatibilty level 6");*/
     if (flags & BLOCK_FLAG_ENCRYPT && flags & BLOCK_FLAG_COMPRESS)
         error("Compression and encryption not supported at the same time");

@@ -681,6 +715,10 @@
     char backing_filename[1024];
     char backing_filename2[1024];
     BlockDriverInfo bdi;
+
+    /* Added this to show what kind of adapter a vmdk image is - thirdwheel
17/04/2009 */
+    char line[1024];
+    FILE *vmdk;

     fmt = NULL;
     for(;;) {
@@ -729,6 +767,22 @@
            filename, fmt_name, size_buf,
            (total_sectors * 512),
            dsize_buf);
+
+    if (strcmp(fmt_name, "vmdk") == 0) {
+        /* Now we find out what adapter type it is! - thirdwheel,
17/04/2009 */
+    vmdk = fopen(filename, "r");
+    fseek(vmdk, 512, SEEK_SET);
+
+    while (fgets(line, 1024, vmdk) != NULL) {
+
+        if (strcmp(strtok(line, "\""), "ddb.adapterType = ") == 0) {
+
+            printf("Adapter type: %s\n", strtok(NULL, "\""));
+            break;
+        }
+    }
+    fclose(vmdk);
+    }
     if (bdrv_is_encrypted(bs))
         printf("encrypted: yes\n");
     if (bdrv_get_info(bs, &bdi) >= 0) {
diff -Naur qemu-0.10.5.orig/qemu-img.texi qemu-0.10.5/qemu-img.texi
--- qemu-0.10.5.orig/qemu-img.texi    Thu May 21 06:47:00 2009
+++ qemu-0.10.5/qemu-img.texi    Fri May 22 20:16:30 2009
@@ -52,7 +52,7 @@
 image format in QEMU. It is supported only for compatibility with
 previous versions. It does not work on win32.
 @item vmdk
-VMware 3 and 4 compatible image format.
+VMware 3 and 4 compatible image format.  Supports IDE and SCSI (BusLogic
and LSI Logic) adapters
 @item cloop
 Linux Compressed Loop image, useful only to reuse directly compressed
 CD-ROM images present for example in the Knoppix CD-ROMs.
@@ -98,7 +98,7 @@
 Command description:

 @table @option
-@item create [-6] [-e] [-b @var{base_image}] [-f @var{fmt}] @var{filename}
[@var{size}]
+@item create [-S] [-L] [-6] [-e] [-b @var{base_image}] [-f @var{fmt}]
@var{filename} [@var{size}]

 Create the new disk image @var{filename} of size @var{size} and format
 @var{fmt}.
@@ -108,11 +108,15 @@
 this case. @var{base_image} will never be modified unless you use the
 @code{commit} monitor command.

+If the format is @code{vmdk}, the @code{-S} option will create a BusLogic
image,
+whereas the @code{-L} will create an LSI Logic image.  Specifying neither
option
+creates an IDE image.
+
 @item commit [-f @var{fmt}] @var{filename}

 Commit the changes recorded in @var{filename} in its base image.

-@item convert [-c] [-e] [-f @var{fmt}] @var{filename} [-O @var{output_fmt}]
@var{output_filename}
+@item convert [-c] [-e] [-6] [-S] [-L] [-f @var{fmt}] @var{filename} [-O
@var{output_fmt}] @var{output_filename}

 Convert the disk image @var{filename} to disk image @var{output_filename}
 using format @var{output_fmt}. It can be optionally encrypted
@@ -129,12 +133,17 @@
 growable format such as @code{qcow} or @code{cow}: the empty sectors
 are detected and suppressed from the destination image.

+As with the create command, if the format is @code{vmdk}, the @code{-S}
+option will create a BusLogic image, whereas the @code{-L} will create
+an LSI Logic image.  Specifying neither option creates an IDE image.
+
 @item info [-f @var{fmt}] @var{filename}

 Give information about the disk image @var{filename}. Use it in
 particular to know the size reserved on disk which can be different
 from the displayed size. If VM snapshots are stored in the disk image,
-they are displayed too.
+they are displayed too.  For the @code{vmdk} format, the adapter type of
+the image is displayed as well.

 @item snapshot [-l | -a @var{snapshot} | -c @var{snapshot} | -d
@var{snapshot} ] @var{filename}

[-- Attachment #2: Type: text/html, Size: 12899 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] Patch: Adding ability for qemu-img to create SCSI VMware disk images
  2009-05-22 10:29 [Qemu-devel] Patch: Adding ability for qemu-img to create SCSI VMware disk images Aaron Mason
@ 2009-05-22 16:41 ` Anthony Liguori
       [not found]   ` <e869674d0905240116n3245c5bdxf66552984a4037f5@mail.gmail.com>
  0 siblings, 1 reply; 11+ messages in thread
From: Anthony Liguori @ 2009-05-22 16:41 UTC (permalink / raw)
  To: Aaron Mason; +Cc: qemu-devel

Aaron Mason wrote:
> Hi,
>
> I needed to create a heap of virtual hard drives to practice creating 
> RAID arrays.  Since qemu-img only creates IDE images, creating a large 
> number of images for this was a very cumbersome excercise.  I compared 
> a SCSI image to an IDE image, and the only difference is the adapter 
> type.  This patch adds command line parameters to qemu-img to specify 
> either a BusLogic or LSI Logic image for 'create' and 'convert', and 
> extends the 'info' command to show the adapter type.  I have also 
> updated the file qemu-img.text and the help output to display the new 
> parameters, and put in a parameter that was missing.
>
> The patch is as follows, and can be applied to 0.10.5 stable (and 
> latest snapshot if qemu-img hasn't changed) with patch -Np1:
>

I don't think this functionality is very useful for QEMU because we 
don't emulate the same SCSI controller that VMware does.

Regards,

Anthony Liguori

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] Patch: Adding ability for qemu-img to create SCSI VMware disk images
       [not found]   ` <e869674d0905240116n3245c5bdxf66552984a4037f5@mail.gmail.com>
@ 2009-05-26  8:02     ` Anthony Liguori
  2009-05-26  9:09       ` Kevin Wolf
  2009-05-26 18:17       ` Robert Riebisch
  0 siblings, 2 replies; 11+ messages in thread
From: Anthony Liguori @ 2009-05-26  8:02 UTC (permalink / raw)
  To: Aaron Mason, qemu-devel

Aaron Mason wrote:
>
> Who said the images had to be used for QEMU?  As I said, I use the 
> utility primarily for creating VMware images. 

If it's not useful for QEMU, then I don't see that it's worth 
maintaining within QEMU.

Regards,

Anthony Liguori

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] Patch: Adding ability for qemu-img to create SCSI VMware disk images
  2009-05-26  8:02     ` Anthony Liguori
@ 2009-05-26  9:09       ` Kevin Wolf
  2009-05-26 19:52         ` Anthony Liguori
  2009-05-26 18:17       ` Robert Riebisch
  1 sibling, 1 reply; 11+ messages in thread
From: Kevin Wolf @ 2009-05-26  9:09 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: Aaron Mason, qemu-devel

Anthony Liguori schrieb:
> Aaron Mason wrote:
>> Who said the images had to be used for QEMU?  As I said, I use the 
>> utility primarily for creating VMware images. 
> 
> If it's not useful for QEMU, then I don't see that it's worth 
> maintaining within QEMU.

Then I wonder why we have the compat6 option for VMDK. I would be rather
surprised if it was useful for qemu itself.

FWIW, I know that SUSE had a use for these SCSI VMDKs and they carry a
local patch for it. I would prefer to have such things upstream, even if
it's just for exporting. After all, qemu-img is the Swiss army knife for
images.

Kevin

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] Patch: Adding ability for qemu-img to create SCSI VMware disk images
  2009-05-26  8:02     ` Anthony Liguori
  2009-05-26  9:09       ` Kevin Wolf
@ 2009-05-26 18:17       ` Robert Riebisch
  1 sibling, 0 replies; 11+ messages in thread
From: Robert Riebisch @ 2009-05-26 18:17 UTC (permalink / raw)
  To: qemu-devel

Anthony Liguori wrote:

>> Who said the images had to be used for QEMU?  As I said, I use the 
>> utility primarily for creating VMware images. 
> 
> If it's not useful for QEMU, then I don't see that it's worth 
> maintaining within QEMU.

I vote for including this small patch. Besides using QEMU I have to
convert images among different emulators / virtualizers very often.

Robert Riebisch
-- 
BTTR Software
http://www.bttr-software.de/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] Patch: Adding ability for qemu-img to create SCSI VMware disk images
  2009-05-26  9:09       ` Kevin Wolf
@ 2009-05-26 19:52         ` Anthony Liguori
  2009-05-26 19:58           ` Daniel P. Berrange
  2009-05-27  7:29           ` Kevin Wolf
  0 siblings, 2 replies; 11+ messages in thread
From: Anthony Liguori @ 2009-05-26 19:52 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: Aaron Mason, qemu-devel

Kevin Wolf wrote:
> Anthony Liguori schrieb:
>   
>> Aaron Mason wrote:
>>     
>>> Who said the images had to be used for QEMU?  As I said, I use the 
>>> utility primarily for creating VMware images. 
>>>       
>> If it's not useful for QEMU, then I don't see that it's worth 
>> maintaining within QEMU.
>>     
>
> Then I wonder why we have the compat6 option for VMDK. I would be rather
> surprised if it was useful for qemu itself.
>   

Yup.  I don't like the compat6 patch either as it's pretty invasive.

> FWIW, I know that SUSE had a use for these SCSI VMDKs and they carry a
> local patch for it. I would prefer to have such things upstream, even if
> it's just for exporting. After all, qemu-img is the Swiss army knife for
> images.
>   

If there's support for it, we can take it.  I worry about adding 
features that aren't widely useful as they add complexity and make it 
hard to refactor things.

Introducing BLOCK_FLAG_BUSLOGIC and BLOCK_FLAG_LSILOGIC seems very wrong 
to me.  You're happy with it?

Regards,

Anthony Liguori
> Kevin
>   

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] Patch: Adding ability for qemu-img to create SCSI VMware disk images
  2009-05-26 19:52         ` Anthony Liguori
@ 2009-05-26 19:58           ` Daniel P. Berrange
  2009-05-26 20:01             ` Anthony Liguori
  2009-05-27  7:29           ` Kevin Wolf
  1 sibling, 1 reply; 11+ messages in thread
From: Daniel P. Berrange @ 2009-05-26 19:58 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: Kevin Wolf, Aaron Mason, qemu-devel

On Tue, May 26, 2009 at 02:52:27PM -0500, Anthony Liguori wrote:
> Kevin Wolf wrote:
> 
> >FWIW, I know that SUSE had a use for these SCSI VMDKs and they carry a
> >local patch for it. I would prefer to have such things upstream, even if
> >it's just for exporting. After all, qemu-img is the Swiss army knife for
> >images.
> >  
> 
> If there's support for it, we can take it.  I worry about adding 
> features that aren't widely useful as they add complexity and make it 
> hard to refactor things.
> 
> Introducing BLOCK_FLAG_BUSLOGIC and BLOCK_FLAG_LSILOGIC seems very wrong 
> to me.  You're happy with it?

I think the addition of new VMDK specific flags to qemu-img is pretty
wrong too

-           "  create [-e] [-6] [-b base_image] [-f fmt] filename [size]\n"
+           "  create [-e] [-6] [-S] [-L] [-b base_image] [-f fmt] filename
....
+       "  '-S' indicates that the target image must be a BusLogic SCSI
virtual disk (vmdk format only)\n"
+       "  '-L' indicates that the target image must be a LSI Logic SCSI
virtual disk (vmdk format only)\n"


If we want to expose this capability, then I think we should have some
kind of generic 'feature' string that can be passed through to the specific
block driver, without needing an unbounded number of qemu-img args to be 
added. eg.

     qemu-img create -o target=buslogic  foo.vmdk
     qemu-img create -o target=lsilogic  foo.vmdk

And just pass the whole value from '-o' through to the block layer's
create method.


Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] Patch: Adding ability for qemu-img to create SCSI VMware disk images
  2009-05-26 19:58           ` Daniel P. Berrange
@ 2009-05-26 20:01             ` Anthony Liguori
  0 siblings, 0 replies; 11+ messages in thread
From: Anthony Liguori @ 2009-05-26 20:01 UTC (permalink / raw)
  To: Daniel P. Berrange; +Cc: Kevin Wolf, Aaron Mason, qemu-devel

Daniel P. Berrange wrote:
> On Tue, May 26, 2009 at 02:52:27PM -0500, Anthony Liguori wrote:
>   
>> Kevin Wolf wrote:
>>
>>     
>>> FWIW, I know that SUSE had a use for these SCSI VMDKs and they carry a
>>> local patch for it. I would prefer to have such things upstream, even if
>>> it's just for exporting. After all, qemu-img is the Swiss army knife for
>>> images.
>>>  
>>>       
>> If there's support for it, we can take it.  I worry about adding 
>> features that aren't widely useful as they add complexity and make it 
>> hard to refactor things.
>>
>> Introducing BLOCK_FLAG_BUSLOGIC and BLOCK_FLAG_LSILOGIC seems very wrong 
>> to me.  You're happy with it?
>>     
>
> I think the addition of new VMDK specific flags to qemu-img is pretty
> wrong too
>
> -           "  create [-e] [-6] [-b base_image] [-f fmt] filename [size]\n"
> +           "  create [-e] [-6] [-S] [-L] [-b base_image] [-f fmt] filename
> ....
> +       "  '-S' indicates that the target image must be a BusLogic SCSI
> virtual disk (vmdk format only)\n"
> +       "  '-L' indicates that the target image must be a LSI Logic SCSI
> virtual disk (vmdk format only)\n"
>
>
> If we want to expose this capability, then I think we should have some
> kind of generic 'feature' string that can be passed through to the specific
> block driver, without needing an unbounded number of qemu-img args to be 
> added. eg.
>
>      qemu-img create -o target=buslogic  foo.vmdk
>      qemu-img create -o target=lsilogic  foo.vmdk
>
> And just pass the whole value from '-o' through to the block layer's
> create method.
>   

You can have the configs be external to vmdk's too, right?

Could we just make configs external to the sparse images so that people 
could edit them however they wanted?

Regards,

Anthony Liguori
> Daniel
>   

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] Patch: Adding ability for qemu-img to create SCSI VMware disk images
  2009-05-26 19:52         ` Anthony Liguori
  2009-05-26 19:58           ` Daniel P. Berrange
@ 2009-05-27  7:29           ` Kevin Wolf
  2009-05-27  7:40             ` Christoph Hellwig
  2009-05-27  8:23             ` Anthony Liguori
  1 sibling, 2 replies; 11+ messages in thread
From: Kevin Wolf @ 2009-05-27  7:29 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: Aaron Mason, qemu-devel

Anthony Liguori schrieb:
> Kevin Wolf wrote:
>> Anthony Liguori schrieb:
>>   
>>> Aaron Mason wrote:
>>>     
>>>> Who said the images had to be used for QEMU?  As I said, I use the 
>>>> utility primarily for creating VMware images. 
>>>>       
>>> If it's not useful for QEMU, then I don't see that it's worth 
>>> maintaining within QEMU.
>>>     
>> Then I wonder why we have the compat6 option for VMDK. I would be rather
>> surprised if it was useful for qemu itself.
>>   
> 
> Yup.  I don't like the compat6 patch either as it's pretty invasive.

Hm, we're both talking about ec36ba1? Because I can't see how it is
invasing, with the exception of the changes to qemu-img. But we don't
need these any more, we have -o now.

>> FWIW, I know that SUSE had a use for these SCSI VMDKs and they carry a
>> local patch for it. I would prefer to have such things upstream, even if
>> it's just for exporting. After all, qemu-img is the Swiss army knife for
>> images.
>>   
> 
> If there's support for it, we can take it.  I worry about adding 
> features that aren't widely useful as they add complexity and make it 
> hard to refactor things.
> 
> Introducing BLOCK_FLAG_BUSLOGIC and BLOCK_FLAG_LSILOGIC seems very wrong 
> to me.  You're happy with it?

No, I'm not happy with this particular patch, especially given that it
doesn't apply to master any more. ;-)

You said this was "not useful", so I'm just talking of the
functionality, independent of the code. And code-wise, it really should
be only a few lines to vmdk - which makes the create function longer by
maybe five lines, but hardly more complex.

Kevin

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] Patch: Adding ability for qemu-img to create SCSI VMware disk images
  2009-05-27  7:29           ` Kevin Wolf
@ 2009-05-27  7:40             ` Christoph Hellwig
  2009-05-27  8:23             ` Anthony Liguori
  1 sibling, 0 replies; 11+ messages in thread
From: Christoph Hellwig @ 2009-05-27  7:40 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: Aaron Mason, qemu-devel

On Wed, May 27, 2009 at 09:29:16AM +0200, Kevin Wolf wrote:
> No, I'm not happy with this particular patch, especially given that it
> doesn't apply to master any more. ;-)
> 
> You said this was "not useful", so I'm just talking of the
> functionality, independent of the code. And code-wise, it really should
> be only a few lines to vmdk - which makes the create function longer by
> maybe five lines, but hardly more complex.

Exactly my though.  Rebased ontop of Kevin's option rework this is
pretty trivial and useful enough to put it in.

Aaron, can you rebase this to the lastest git tree?

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] Patch: Adding ability for qemu-img to create SCSI VMware disk images
  2009-05-27  7:29           ` Kevin Wolf
  2009-05-27  7:40             ` Christoph Hellwig
@ 2009-05-27  8:23             ` Anthony Liguori
  1 sibling, 0 replies; 11+ messages in thread
From: Anthony Liguori @ 2009-05-27  8:23 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: Aaron Mason, qemu-devel

Kevin Wolf wrote:
> Anthony Liguori schrieb:
>   
>> Kevin Wolf wrote:
>>     
>>> Anthony Liguori schrieb:
>>>   
>>>       
>>>> Aaron Mason wrote:
>>>>     
>>>>         
>>>>> Who said the images had to be used for QEMU?  As I said, I use the 
>>>>> utility primarily for creating VMware images. 
>>>>>       
>>>>>           
>>>> If it's not useful for QEMU, then I don't see that it's worth 
>>>> maintaining within QEMU.
>>>>     
>>>>         
>>> Then I wonder why we have the compat6 option for VMDK. I would be rather
>>> surprised if it was useful for qemu itself.
>>>   
>>>       
>> Yup.  I don't like the compat6 patch either as it's pretty invasive.
>>     
>
> Hm, we're both talking about ec36ba1? Because I can't see how it is
> invasing, with the exception of the changes to qemu-img. But we don't
> need these any more, we have -o now.
>   

I find it invasive because it extends the block subsytem API with a 
non-generic interface.

>> Introducing BLOCK_FLAG_BUSLOGIC and BLOCK_FLAG_LSILOGIC seems very wrong 
>> to me.  You're happy with it?
>>     
>
> No, I'm not happy with this particular patch, especially given that it
> doesn't apply to master any more. ;-)
>
> You said this was "not useful", so I'm just talking of the
> functionality, independent of the code. And code-wise, it really should
> be only a few lines to vmdk - which makes the create function longer by
> maybe five lines, but hardly more complex.
>   

I wouldn't mind a few line patch to vmdk's create function.

Regards,

Anthony Liguori

> Kevin
>   

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-05-27  8:23 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-22 10:29 [Qemu-devel] Patch: Adding ability for qemu-img to create SCSI VMware disk images Aaron Mason
2009-05-22 16:41 ` Anthony Liguori
     [not found]   ` <e869674d0905240116n3245c5bdxf66552984a4037f5@mail.gmail.com>
2009-05-26  8:02     ` Anthony Liguori
2009-05-26  9:09       ` Kevin Wolf
2009-05-26 19:52         ` Anthony Liguori
2009-05-26 19:58           ` Daniel P. Berrange
2009-05-26 20:01             ` Anthony Liguori
2009-05-27  7:29           ` Kevin Wolf
2009-05-27  7:40             ` Christoph Hellwig
2009-05-27  8:23             ` Anthony Liguori
2009-05-26 18:17       ` Robert Riebisch

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.