* [Qemu-devel] [PATCH] SCSI support for vmdk images
@ 2008-01-06 22:13 Soren Hansen
2008-02-09 7:40 ` Rob Landley
0 siblings, 1 reply; 3+ messages in thread
From: Soren Hansen @ 2008-01-06 22:13 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1.1: Type: text/plain, Size: 154 bytes --]
I just noticed this patch, I've had lying around for a while, but forgot
to send here.
--
Soren Hansen
Ubuntu Server Team
http://www.ubuntu.com/
[-- Attachment #1.2: vmdk-scsi.diff --]
[-- Type: text/x-diff, Size: 3565 bytes --]
=== modified file 'block-vmdk.c'
--- block-vmdk.c 2007-11-11 02:51:15 +0000
+++ block-vmdk.c 2008-01-06 21:18:57 +0000
@@ -717,7 +717,7 @@
"ddb.geometry.cylinders = \"%lu\"\n"
"ddb.geometry.heads = \"16\"\n"
"ddb.geometry.sectors = \"63\"\n"
- "ddb.adapterType = \"ide\"\n";
+ "ddb.adapterType = \"%s\"\n";
char desc[1024];
const char *real_filename, *temp_str;
@@ -790,7 +790,7 @@
if ((temp_str = strrchr(real_filename, ':')) != NULL)
real_filename = temp_str + 1;
sprintf(desc, desc_template, time(NULL), (unsigned long)total_size,
- real_filename, (flags & BLOCK_FLAG_COMPAT6 ? 6 : 4), total_size / (63 * 16));
+ real_filename, (flags & BLOCK_FLAG_COMPAT6 ? 6 : 4), total_size / (63 * 16), (flags & BLOCK_FLAG_SCSI ? "lsilogic" : "ide"));
/* write the descriptor */
lseek(fd, le64_to_cpu(header.desc_offset) << 9, SEEK_SET);
=== modified file 'block_int.h'
--- block_int.h 2007-12-24 16:10:43 +0000
+++ block_int.h 2008-01-06 21:18:57 +0000
@@ -29,6 +29,7 @@
#define BLOCK_FLAG_ENCRYPT 1
#define BLOCK_FLAG_COMPRESS 2
#define BLOCK_FLAG_COMPAT6 4
+#define BLOCK_FLAG_SCSI 8
struct BlockDriver {
const char *format_name;
=== modified file 'qemu-img.c'
--- qemu-img.c 2008-01-06 17:21:48 +0000
+++ qemu-img.c 2008-01-06 22:04:55 +0000
@@ -88,9 +88,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] [-b base_image] [-f fmt] filename [size]\n"
" commit [-f fmt] filename\n"
- " convert [-c] [-e] [-6] [-f fmt] filename [filename2 [...]] [-O output_fmt] output_filename\n"
+ " convert [-c] [-e] [-6] [-s] [-f fmt] filename [-O output_fmt] output_filename\n"
" info [-f fmt] filename\n"
"\n"
"Command parameters:\n"
@@ -105,6 +105,7 @@
" '-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 use of type SCSI (vmdk format only)\n"
);
printf("\nSupported format:");
bdrv_iterate_format(format_print, NULL);
@@ -261,6 +262,9 @@
case '6':
flags |= BLOCK_FLAG_COMPAT6;
break;
+ case 's':
+ flags |= BLOCK_FLAG_SCSI;
+ break;
}
}
if (optind >= argc)
@@ -297,6 +301,8 @@
printf(", encrypted");
if (flags & BLOCK_FLAG_COMPAT6)
printf(", compatibility level=6");
+ if (flags & BLOCK_FLAG_SCSI)
+ printf(", type=scsi");
if (base_filename) {
printf(", backing_file=%s",
base_filename);
@@ -473,6 +479,8 @@
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_SCSI && drv != &bdrv_vmdk)
+ error("SCSI disks are not supported for this file format");
if (flags & BLOCK_FLAG_ENCRYPT && flags & BLOCK_FLAG_COMPRESS)
error("Compression and encryption not supported at the same time");
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] SCSI support for vmdk images
@ 2008-02-12 0:52 Soren Hansen
0 siblings, 0 replies; 3+ messages in thread
From: Soren Hansen @ 2008-02-12 0:52 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 525 bytes --]
On Sat, Feb 09, 2008 at 01:40:33AM -0600, Rob Landley wrote:
>> I just noticed this patch, I've had lying around for a while, but
>> forgot to send here.
> What does this do that the patch back in september didn't?
Sorry, I forgot to include that bit.
The patch from September made qemu-img able to create version 6 vmware
images (in addition to version 4). This new one make qemu-img able to
create scsi vmware images.
--
Soren Hansen
Virtualisation specialist
Ubuntu Server Team
http://www.ubuntu.com/
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-02-12 0:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-06 22:13 [Qemu-devel] [PATCH] SCSI support for vmdk images Soren Hansen
2008-02-09 7:40 ` Rob Landley
-- strict thread matches above, loose matches on Subject: below --
2008-02-12 0:52 Soren Hansen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).