Skip to contentSkip to conversation

device-types/blk/description.tex: Allow longer device IDs to be returned

PATCH In review Richard W.M. Jones 5 participants 15 messages Sep 8 – Sep 21 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

v3 cover device-types/blk/description.tex: Allow longer device IDs to be returned

v3 considerably simplifies everything. We now use the feature bit (VIRTIO_BLK_F_LONG_ID) to decide if the driver will provide a 20 or 248 byte buffer to VIRTIO_BLK_T_GET_ID.

VIRTIO_BLK_T_GET_LONG_ID has been dropped.

There is a working implementation of this here:

https://github.com/rwmjones/virtio-spec/commits/2026-virtio-blk-long-id/
https://gitlab.com/rwmjones/qemu/-/commits/2026-virtio-blk-long-id?ref_type=heads
https://github.com/rwmjones/linux/commits/2026-virtio-blk-long-id/

Rich.

Richard W.M. Jones (1):
device-types/blk/description.tex: Allow longer device IDs to be
returned

 device-types/blk/description.tex | 27 ++++++++++++++++++++++++---
 1 file changed, 24 insertions(+), 3 deletions(-)
Signature · 1 line
2.55.0
#1 lore raw

PATCH v3 1/1 device-types/blk/description.tex: Allow longer device IDs to be returned

SCSI-based paravirtualized block devices including virtio-scsi and VMware's pvscsi allow longer device IDs. This presents an issue when we change the backing of a disk from one type to another, eg from pvscsi to virtio-blk, or virtio-scsi to virtio-blk. The longer device ID has to be truncated to 20 bytes. This results in guest visible changes, notably /dev/disk/by-id/ paths are different, so any mountpoints or configuration files that use these paths will break.

Therefore extend virtio-blk to allow longer device IDs. I chose 247 bytes (ASCII chars) as the new limit since SCSI serials can in theory be this long. Real serials will be much shorter than this; the aim is to allow UUIDs to be preserved which would use 32 or 36 ASCII chars.

A new feature bit is introduced to indicate that long device IDs are supported.

---
 device-types/blk/description.tex | 27 ++++++++++++++++++++++++---
 1 file changed, 24 insertions(+), 3 deletions(-)
device-types/blk/description.tex +24 -3
index 3b3a4e7..aa3ec66 100644
@@ -73,6 +73,9 @@ \subsection{Feature bits}\label{sec:Device Types / Block Device / Feature bits}
     VIRTIO_BLK_REQ_FLAG_OUT_FUA flag in the \field{flags} bitfield of the
     \field{virtio_blk_req} structure for VIRTIO_BLK_T_OUT requests.
 
+\item[VIRTIO_BLK_F_LONG_ID (20)] Device supports long device ID
+    strings.
+
 \end{description}
 
 \subsubsection{Legacy Interface: Feature bits}\label{sec:Device Types / Block Device / Feature bits / Legacy Interface: Feature bits}
@@ -516,8 +519,23 @@ \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope
 zeroes.
 
 VIRTIO_BLK_T_GET_ID requests fetch the device ID string from the device into
-\field{data}.  The device ID string is a NUL-padded ASCII string up to 20 bytes
-long.  If the string is 20 bytes long then there is no NUL terminator.
+\field{data}.  The device ID string is an ASCII string which can be
+up to 247 bytes long.
+
+If VIRTIO_BLK_F_LONG_ID was not negotiated, VIRTIO_BLK_T_GET_ID
+fetches the first 20 bytes of the device ID string.  If the ID is
+shorter than 20 bytes, then the response is padded with NUL bytes so
+its length is 20 bytes.  (Note that if the ID is 20 bytes or longer,
+this means the response will not be NUL terminated.)
+
+If VIRTIO_BLK_F_LONG_ID was negotiated, VIRTIO_BLK_T_GET_ID fetches
+the complete device ID string.  The response is always 248 bytes long,
+padded to this length with NUL bytes.  Since the longest permitted
+device ID string is 247 bytes, the response is NUL terminated.
+
+Although 247 byte device ID strings are allowed, there may be
+interoperability problems if strings longer than 128 bytes are used.
+It is also advisable to use only 7 bit ASCII characters.
 
 The \field{data} used for VIRTIO_BLK_T_GET_LIFETIME requests is populated
 by the device, and is of the form
@@ -911,7 +929,10 @@ \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope
 virtio_blk_discard_write_zeroes for VIRTIO_BLK_T_DISCARD,
 VIRTIO_BLK_T_SECURE_ERASE and VIRTIO_BLK_T_WRITE_ZEROES requests.
 
-The length of \field{data} MUST be 20 bytes for VIRTIO_BLK_T_GET_ID requests.
+For VIRTIO_BLK_T_GET_ID requests the length of \field{data} depends
+on the feature VIRTIO_BLK_F_LONG_ID.  If VIRTIO_BLK_F_LONG_ID was
+negotiated the length of \field{data} MUST be 248 bytes, else
+it MUST be 20 bytes.
 
 VIRTIO_BLK_T_DISCARD requests MUST NOT contain more than
 \field{max_discard_seg} struct virtio_blk_discard_write_zeroes segments in
Signature · 1 line
2.55.0
#2 lore raw

Thanks for the patch! Yes something to improve:

Quoted 36 lines · Richard W.M. Jones

SCSI-based paravirtualized block devices including virtio-scsi and VMware's pvscsi allow longer device IDs. This presents an issue when we change the backing of a disk from one type to another, eg from pvscsi to virtio-blk, or virtio-scsi to virtio-blk. The longer device ID has to be truncated to 20 bytes. This results in guest visible changes, notably /dev/disk/by-id/ paths are different, so any mountpoints or configuration files that use these paths will break.

Therefore extend virtio-blk to allow longer device IDs. I chose 247 bytes (ASCII chars) as the new limit since SCSI serials can in theory be this long. Real serials will be much shorter than this; the aim is to allow UUIDs to be preserved which would use 32 or 36 ASCII chars.

A new feature bit is introduced to indicate that long device IDs are supported.

---
 device-types/blk/description.tex | 27 ++++++++++++++++++++++++---
 1 file changed, 24 insertions(+), 3 deletions(-)
device-types/blk/description.tex +3 -0
index 3b3a4e7..aa3ec66 100644
@@ -73,6 +73,9 @@ \subsection{Feature bits}\label{sec:Device Types / Block Device / Feature bits}
     VIRTIO_BLK_REQ_FLAG_OUT_FUA flag in the \field{flags} bitfield of the
     \field{virtio_blk_req} structure for VIRTIO_BLK_T_OUT requests.
 
+\item[VIRTIO_BLK_F_LONG_ID (20)] Device supports long device ID
+    strings.
+
 \end{description}
 
 \subsubsection{Legacy Interface: Feature bits}\label{sec:Device Types / Block Device / Feature bits / Legacy Interface: Feature bits}

device-types/blk/description.tex \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope · line 523

Quoted 7 lines
device-types/blk/description.tex +2 -2
@@ -516,8 +519,23 @@ \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope
 zeroes.
 
 VIRTIO_BLK_T_GET_ID requests fetch the device ID string from the device into
-\field{data}.  The device ID string is a NUL-padded ASCII string up to 20 bytes
-long.  If the string is 20 bytes long then there is no NUL terminator.
+\field{data}.  The device ID string is an ASCII string which can be
+up to 247 bytes long.

Judging by the below, it does not have to be ASCII? just a nul terminated string?

247 is just a very weird limit.
So we get another
arbitrary number drivers need to worry about. Ugh. I just don't get all the references
to scsi vpd or whatever. It's your motivation I get that but we should not set policy.

Let's just simply limit the string to 255 bytes and
make data 255 bytes too?
Then with the status byte the write buffer fits in a 256 pcie packet.

Maybe others feel differently.

device-types/blk/description.tex \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope · line 529

Quoted 6 lines
device-types/blk/description.tex +6 -0
+
+If VIRTIO_BLK_F_LONG_ID was not negotiated, VIRTIO_BLK_T_GET_ID
+fetches the first 20 bytes of the device ID string.  If the ID is
+shorter than 20 bytes, then the response is padded with NUL bytes so
+its length is 20 bytes.  (Note that if the ID is 20 bytes or longer,
+this means the response will not be NUL terminated.)

But the driver can not both negotiate and not negotiate VIRTIO_BLK_F_LONG_ID.

So what does this requirement that the two configs share a prefix buy us, practically?

Why don't we just say that the ID is up to either 20 bytes or 255 bytes depending on the feature negotiation?

device-types/blk/description.tex \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope · line 534

Quoted 5 lines
device-types/blk/description.tex +5 -0
+
+If VIRTIO_BLK_F_LONG_ID was negotiated, VIRTIO_BLK_T_GET_ID fetches
+the complete device ID string.  The response is always 248 bytes long,
+padded to this length with NUL bytes.  Since the longest permitted
+device ID string is 247 bytes, the response is NUL terminated.

Let's just handle short and long forms consistently please. If the string fills all of data then it is not terminated. end of story.

All the subtle differences are just a source for confusion. Can we not define something like "maximum ID length" and then use it everywhere, instead of all the duplication?

device-types/blk/description.tex \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope · line 537

Quoted 3 lines
device-types/blk/description.tex +3 -0
+
+Although 247 byte device ID strings are allowed, there may be
+interoperability problems if strings longer than 128 bytes are used.

I think you mean 127? so it's 128 with the NUL.

device-types/blk/description.tex \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope · line 538

Quoted 1 line
device-types/blk/description.tex +1 -0
+It is also advisable to use only 7 bit ASCII characters.

ASCII == 7 bit. Maybe you mean printable characters?

Pls add both these recommendations in the conformance section.

Quoted 17 lines
device-types/blk/description.tex +4 -1
 The \field{data} used for VIRTIO_BLK_T_GET_LIFETIME requests is populated
 by the device, and is of the form
@@ -911,7 +929,10 @@ \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope
 virtio_blk_discard_write_zeroes for VIRTIO_BLK_T_DISCARD,
 VIRTIO_BLK_T_SECURE_ERASE and VIRTIO_BLK_T_WRITE_ZEROES requests.
 
-The length of \field{data} MUST be 20 bytes for VIRTIO_BLK_T_GET_ID requests.
+For VIRTIO_BLK_T_GET_ID requests the length of \field{data} depends
+on the feature VIRTIO_BLK_F_LONG_ID.  If VIRTIO_BLK_F_LONG_ID was
+negotiated the length of \field{data} MUST be 248 bytes, else
+it MUST be 20 bytes.
 
 VIRTIO_BLK_T_DISCARD requests MUST NOT contain more than
 \field{max_discard_seg} struct virtio_blk_discard_write_zeroes segments in
Signature · 1 line
2.55.0
#3 lore raw
Quoted 20 lines · Michael S. Tsirkin

Thanks for the patch! Yes something to improve:

device-types/blk/description.tex \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope · line 523

Quoted 5 lines · Richard W.M. Jones

VIRTIO_BLK_T_GET_ID requests fetch the device ID string from the device into
-\field{data}. The device ID string is a NUL-padded ASCII string up to 20 bytes

device-types/blk/description.tex +2 -1
-long.  If the string is 20 bytes long then there is no NUL terminator.
+\field{data}.  The device ID string is an ASCII string which can be
+up to 247 bytes long.

Judging by the below, it does not have to be ASCII? just a nul terminated string?

247 is just a very weird limit.
So we get another
arbitrary number drivers need to worry about. Ugh. I just don't get all the references
to scsi vpd or whatever. It's your motivation I get that but we should not set policy.

Quoted 2 lines

Let's just simply limit the string to 255 bytes and make data 255 bytes too?

I wonder actually if 128 is better. It fits within the Windows limit and it doesn't hurt for Linux either because of NAME_MAX limitations that you would encounter with udev.

Quoted 4 lines

Then with the status byte the write buffer fits in a 256 pcie packet.

Maybe others feel differently.

Quoted 9 lines

device-types/blk/description.tex \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope · line 529

Quoted 6 lines
device-types/blk/description.tex +6 -0
+
+If VIRTIO_BLK_F_LONG_ID was not negotiated, VIRTIO_BLK_T_GET_ID
+fetches the first 20 bytes of the device ID string.  If the ID is
+shorter than 20 bytes, then the response is padded with NUL bytes so
+its length is 20 bytes.  (Note that if the ID is 20 bytes or longer,
+this means the response will not be NUL terminated.)

But the driver can not both negotiate and not negotiate VIRTIO_BLK_F_LONG_ID.

Interesting .. so I think I misunderstood how feature negotiation works. I _thought_ that the driver sends back features it understands, via the features array:

https://github.com/torvalds/linux/blob/28924df2a08f440c73991b83028032c901de2ae4/drivers/block/virtio_blk.c#L1669

and therefore the host side can see if the driver supports VIRTIO_BLK_F_LONG_ID. Is that not how it works?

Quoted 5 lines

So what does this requirement that the two configs share a prefix buy us, practically?

Why don't we just say that the ID is up to either 20 bytes or 255 bytes depending on the feature negotiation?

We can just drop the "first" language.

Quoted 9 lines

device-types/blk/description.tex \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope · line 534

Quoted 5 lines
device-types/blk/description.tex +5 -0
+
+If VIRTIO_BLK_F_LONG_ID was negotiated, VIRTIO_BLK_T_GET_ID fetches
+the complete device ID string.  The response is always 248 bytes long,
+padded to this length with NUL bytes.  Since the longest permitted
+device ID string is 247 bytes, the response is NUL terminated.

Let's just handle short and long forms consistently please. If the string fills all of data then it is not terminated. end of story.

Quoted 3 lines

All the subtle differences are just a source for confusion. Can we not define something like "maximum ID length" and then use it everywhere, instead of all the duplication?

Sure.

Quoted 6 lines

device-types/blk/description.tex \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope · line 537

Quoted 3 lines
device-types/blk/description.tex +3 -0
+
+Although 247 byte device ID strings are allowed, there may be
+interoperability problems if strings longer than 128 bytes are used.

I think you mean 127? so it's 128 with the NUL.

Quoted 6 lines
Quoted 1 line

+It is also advisable to use only 7 bit ASCII characters.

ASCII == 7 bit. Maybe you mean printable characters?

Pls add both these recommendations in the conformance section.

OK.

Rich.

Signature · 4 lines
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
nbdkit - Flexible, fast NBD server with plugins
https://gitlab.com/nbdkit/nbdkit
#4 lore raw
Quoted 21 lines · Richard W.M. Jones
Quoted 20 lines · Michael S. Tsirkin

Thanks for the patch! Yes something to improve:

device-types/blk/description.tex \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope · line 523

Quoted 5 lines · Richard W.M. Jones

VIRTIO_BLK_T_GET_ID requests fetch the device ID string from the device into
-\field{data}. The device ID string is a NUL-padded ASCII string up to 20 bytes

device-types/blk/description.tex +2 -1
-long.  If the string is 20 bytes long then there is no NUL terminator.
+\field{data}.  The device ID string is an ASCII string which can be
+up to 247 bytes long.

Judging by the below, it does not have to be ASCII? just a nul terminated string?

247 is just a very weird limit.
So we get another
arbitrary number drivers need to worry about. Ugh. I just don't get all the references
to scsi vpd or whatever. It's your motivation I get that but we should not set policy.

Quoted 6 lines
Quoted 2 lines

Let's just simply limit the string to 255 bytes and make data 255 bytes too?

I wonder actually if 128 is better. It fits within the Windows limit and it doesn't hurt for Linux either because of NAME_MAX limitations that you would encounter with udev.

Up to you. I actually take it back about trying to cut out the last byte - no driver seems to combine status and data, let's just make data a power of 2 in size.

Quoted 14 lines
Quoted 4 lines

Then with the status byte the write buffer fits in a 256 pcie packet.

Maybe others feel differently.

Quoted 9 lines

device-types/blk/description.tex \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope · line 529

Quoted 6 lines
device-types/blk/description.tex +6 -0
+
+If VIRTIO_BLK_F_LONG_ID was not negotiated, VIRTIO_BLK_T_GET_ID
+fetches the first 20 bytes of the device ID string.  If the ID is
+shorter than 20 bytes, then the response is padded with NUL bytes so
+its length is 20 bytes.  (Note that if the ID is 20 bytes or longer,
+this means the response will not be NUL terminated.)

But the driver can not both negotiate and not negotiate VIRTIO_BLK_F_LONG_ID.

Quoted 8 lines

Interesting .. so I think I misunderstood how feature negotiation works. I _thought_ that the driver sends back features it understands, via the features array:

https://github.com/torvalds/linux/blob/28924df2a08f440c73991b83028032c901de2ae4/drivers/block/virtio_blk.c#L1669

and therefore the host side can see if the driver supports VIRTIO_BLK_F_LONG_ID. Is that not how it works?

Yes. I am just saying there are drivers with VIRTIO_BLK_F_LONG_ID that see the long id or without that see short one.
No one checks both so there is no need to constrain how they are related.

Quoted 8 lines
Quoted 6 lines

So what does this requirement that the two configs share a prefix buy us, practically?

Why don't we just say that the ID is up to either 20 bytes or 255 bytes depending on the feature negotiation?

We can just drop the "first" language.

I like that.

Quoted 37 lines
Quoted 9 lines

device-types/blk/description.tex \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope · line 534

Quoted 5 lines
device-types/blk/description.tex +5 -0
+
+If VIRTIO_BLK_F_LONG_ID was negotiated, VIRTIO_BLK_T_GET_ID fetches
+the complete device ID string.  The response is always 248 bytes long,
+padded to this length with NUL bytes.  Since the longest permitted
+device ID string is 247 bytes, the response is NUL terminated.

Let's just handle short and long forms consistently please. If the string fills all of data then it is not terminated. end of story.

Quoted 3 lines

All the subtle differences are just a source for confusion. Can we not define something like "maximum ID length" and then use it everywhere, instead of all the duplication?

Sure.

Quoted 6 lines

device-types/blk/description.tex \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope · line 537

Quoted 3 lines
device-types/blk/description.tex +3 -0
+
+Although 247 byte device ID strings are allowed, there may be
+interoperability problems if strings longer than 128 bytes are used.

I think you mean 127? so it's 128 with the NUL.

Quoted 6 lines
Quoted 1 line

+It is also advisable to use only 7 bit ASCII characters.

ASCII == 7 bit. Maybe you mean printable characters?

Pls add both these recommendations in the conformance section.

OK.

Rich.

Signature · 4 lines
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
nbdkit - Flexible, fast NBD server with plugins
https://gitlab.com/nbdkit/nbdkit
#5 lore raw
In reply to Richard W.M. Jones
Quoted 47 lines · Richard W.M. Jones

SCSI-based paravirtualized block devices including virtio-scsi and VMware's pvscsi allow longer device IDs. This presents an issue when we change the backing of a disk from one type to another, eg from pvscsi to virtio-blk, or virtio-scsi to virtio-blk. The longer device ID has to be truncated to 20 bytes. This results in guest visible changes, notably /dev/disk/by-id/ paths are different, so any mountpoints or configuration files that use these paths will break.

Therefore extend virtio-blk to allow longer device IDs. I chose 247 bytes (ASCII chars) as the new limit since SCSI serials can in theory be this long. Real serials will be much shorter than this; the aim is to allow UUIDs to be preserved which would use 32 or 36 ASCII chars.

A new feature bit is introduced to indicate that long device IDs are supported.

---
 device-types/blk/description.tex | 27 ++++++++++++++++++++++++---
 1 file changed, 24 insertions(+), 3 deletions(-)
device-types/blk/description.tex +9 -2
index 3b3a4e7..aa3ec66 100644
@@ -73,6 +73,9 @@ \subsection{Feature bits}\label{sec:Device Types / Block Device / Feature bits}
     VIRTIO_BLK_REQ_FLAG_OUT_FUA flag in the \field{flags} bitfield of the
     \field{virtio_blk_req} structure for VIRTIO_BLK_T_OUT requests.
 
+\item[VIRTIO_BLK_F_LONG_ID (20)] Device supports long device ID
+    strings.
+
 \end{description}
 
 \subsubsection{Legacy Interface: Feature bits}\label{sec:Device Types / Block Device / Feature bits / Legacy Interface: Feature bits}
@@ -516,8 +519,23 @@ \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope
 zeroes.
 
 VIRTIO_BLK_T_GET_ID requests fetch the device ID string from the device into
-\field{data}.  The device ID string is a NUL-padded ASCII string up to 20 bytes
-long.  If the string is 20 bytes long then there is no NUL terminator.
+\field{data}.  The device ID string is an ASCII string which can be
+up to 247 bytes long.
+
+If VIRTIO_BLK_F_LONG_ID was not negotiated, VIRTIO_BLK_T_GET_ID
+fetches the first 20 bytes of the device ID string.  If the ID is
+shorter than 20 bytes, then the response is padded with NUL bytes so

device-types/blk/description.tex \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope · line 537

Quoted 10 lines
device-types/blk/description.tex +10 -0
+its length is 20 bytes.  (Note that if the ID is 20 bytes or longer,
+this means the response will not be NUL terminated.)
+
+If VIRTIO_BLK_F_LONG_ID was negotiated, VIRTIO_BLK_T_GET_ID fetches
+the complete device ID string.  The response is always 248 bytes long,
+padded to this length with NUL bytes.  Since the longest permitted
+device ID string is 247 bytes, the response is NUL terminated.
+
+Although 247 byte device ID strings are allowed, there may be
+interoperability problems if strings longer than 128 bytes are used.

Can you be more specific? Is the concern that the guest software stack above of the driver may not be prepared for serial strings longer than 128 bytes?

device-types/blk/description.tex \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope · line 538

Quoted 1 line
device-types/blk/description.tex +1 -0
+It is also advisable to use only 7 bit ASCII characters.

Versus "The device ID string is an ASCII string which can be up to 247 bytes long" earlier in this patch. Is ASCII a "SHOULD" or a "MUST"?

Quoted 19 lines
device-types/blk/description.tex +4 -1
 The \field{data} used for VIRTIO_BLK_T_GET_LIFETIME requests is populated
 by the device, and is of the form
@@ -911,7 +929,10 @@ \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope
 virtio_blk_discard_write_zeroes for VIRTIO_BLK_T_DISCARD,
 VIRTIO_BLK_T_SECURE_ERASE and VIRTIO_BLK_T_WRITE_ZEROES requests.
 
-The length of \field{data} MUST be 20 bytes for VIRTIO_BLK_T_GET_ID requests.
+For VIRTIO_BLK_T_GET_ID requests the length of \field{data} depends
+on the feature VIRTIO_BLK_F_LONG_ID.  If VIRTIO_BLK_F_LONG_ID was
+negotiated the length of \field{data} MUST be 248 bytes, else
+it MUST be 20 bytes.
 
 VIRTIO_BLK_T_DISCARD requests MUST NOT contain more than
 \field{max_discard_seg} struct virtio_blk_discard_write_zeroes segments in
Signature · 1 line
2.55.0
#6 lore raw
Quoted 7 lines · Stefan Hajnoczi

device-types/blk/description.tex \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope · line 537

Quoted 2 lines · Richard W.M. Jones
device-types/blk/description.tex +2 -0
+Although 247 byte device ID strings are allowed, there may be
+interoperability problems if strings longer than 128 bytes are used.

Can you be more specific? Is the concern that the guest software stack above of the driver may not be prepared for serial strings longer than 128 bytes?

I'll add more detail in the next version, but in brief the problems are twofold:

(1) Windows supports up to 128 "characters" (they're not precise but they probably mean Unicode codepoints from the Basic Multilingual Plane):

https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/storport/ns-storport-stor_serial_number

(2) When udev tries to encode a very long serial into a /dev/disk/by-id path you end up uncomfortably close to NAME_MAX (255).

Quoted 4 lines
Quoted 1 line

+It is also advisable to use only 7 bit ASCII characters.

Versus "The device ID string is an ASCII string which can be up to 247 bytes long" earlier in this patch. Is ASCII a "SHOULD" or a "MUST"?

It's "SHOULD". I can't see any good coming from trying to use anything except letters, numbers and dashes in a serial, but both Linux and Windows (see above) could in theory handle Unicode.

Rich.

Signature · 5 lines
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW
#7 lore raw
Quoted 22 lines · Richard W.M. Jones
Quoted 7 lines · Stefan Hajnoczi

device-types/blk/description.tex \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope · line 537

Quoted 2 lines · Richard W.M. Jones
device-types/blk/description.tex +2 -0
+Although 247 byte device ID strings are allowed, there may be
+interoperability problems if strings longer than 128 bytes are used.

Can you be more specific? Is the concern that the guest software stack above of the driver may not be prepared for serial strings longer than 128 bytes?

I'll add more detail in the next version, but in brief the problems are twofold:

(1) Windows supports up to 128 "characters" (they're not precise but they probably mean Unicode codepoints from the Basic Multilingual Plane):

https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/storport/ns-storport-stor_serial_number

(2) When udev tries to encode a very long serial into a /dev/disk/by-id path you end up uncomfortably close to NAME_MAX (255).

Quoted 2 lines
Quoted 1 line

+It is also advisable to use only 7 bit ASCII characters.

Quoted 8 lines
Quoted 2 lines

Versus "The device ID string is an ASCII string which can be up to 247 bytes long" earlier in this patch. Is ASCII a "SHOULD" or a "MUST"?

It's "SHOULD". I can't see any good coming from trying to use anything except letters, numbers and dashes in a serial, but both Linux and Windows (see above) could in theory handle Unicode.

Rich.

Linux actually has code to try and handle that. unicode is actually the less problematic part - ascii is full of pitfalls, eith things like
slashes are much weirder - e.g. udev will create a subdirectory with slashes. what will windows do? and what will it do with backslashes? /me shrugs

Quoted 6 lines
Signature · 5 lines
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW
#8 lore raw
Quoted 33 lines · Michael S. Tsirkin
Quoted 22 lines · Richard W.M. Jones
Quoted 7 lines · Stefan Hajnoczi

device-types/blk/description.tex \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope · line 537

Quoted 2 lines · Richard W.M. Jones
device-types/blk/description.tex +2 -0
+Although 247 byte device ID strings are allowed, there may be
+interoperability problems if strings longer than 128 bytes are used.

Can you be more specific? Is the concern that the guest software stack above of the driver may not be prepared for serial strings longer than 128 bytes?

I'll add more detail in the next version, but in brief the problems are twofold:

(1) Windows supports up to 128 "characters" (they're not precise but they probably mean Unicode codepoints from the Basic Multilingual Plane):

https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/storport/ns-storport-stor_serial_number

(2) When udev tries to encode a very long serial into a /dev/disk/by-id path you end up uncomfortably close to NAME_MAX (255).

Quoted 2 lines
Quoted 1 line

+It is also advisable to use only 7 bit ASCII characters.

Quoted 8 lines
Quoted 2 lines

Versus "The device ID string is an ASCII string which can be up to 247 bytes long" earlier in this patch. Is ASCII a "SHOULD" or a "MUST"?

It's "SHOULD". I can't see any good coming from trying to use anything except letters, numbers and dashes in a serial, but both Linux and Windows (see above) could in theory handle Unicode.

Rich.

Quoted 6 lines

Linux actually has code to try and handle that. unicode is actually the less problematic part - ascii is full of pitfalls, eith things like
slashes are much weirder - e.g. udev will create a subdirectory with slashes. what will windows do? and what will it do with backslashes? /me shrugs

What about /../../../../../../../../..?

Honestly, the simplest way to protect against problems is to just use a hex-encoded or base32-encoded cryptographic hash as the name.

Signature · 2 lines
Sincerely,
Demi Marie Obenour (she/her/hers)
#9 lore raw
Quoted 47 lines

From: Demi Marie Obenour <[email protected]>
Sent: 09 September 2026 07:42 AM

Quoted 33 lines · Michael S. Tsirkin
Quoted 22 lines · Richard W.M. Jones
Quoted 7 lines · Stefan Hajnoczi

device-types/blk/description.tex \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope · line 537

Quoted 2 lines · Richard W.M. Jones
device-types/blk/description.tex +2 -0
+Although 247 byte device ID strings are allowed, there may be
+interoperability problems if strings longer than 128 bytes are used.

Can you be more specific? Is the concern that the guest software stack above of the driver may not be prepared for serial strings longer than 128 bytes?

I'll add more detail in the next version, but in brief the problems are twofold:

(1) Windows supports up to 128 "characters" (they're not precise but they probably mean Unicode codepoints from the Basic Multilingual Plane):

https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/storport/ns-storport-stor_serial_number

(2) When udev tries to encode a very long serial into a /dev/disk/by-id path you end up uncomfortably close to NAME_MAX (255).

Quoted 2 lines
Quoted 1 line

+It is also advisable to use only 7 bit ASCII characters.

Quoted 8 lines
Quoted 2 lines

Versus "The device ID string is an ASCII string which can be up to 247 bytes long" earlier in this patch. Is ASCII a "SHOULD" or a "MUST"?

It's "SHOULD". I can't see any good coming from trying to use anything except letters, numbers and dashes in a serial, but both Linux and Windows (see above) could in theory handle Unicode.

Rich.

Quoted 6 lines

Linux actually has code to try and handle that. unicode is actually the less problematic part - ascii is full of pitfalls, eith things like
slashes are much weirder - e.g. udev will create a subdirectory with slashes. what will windows do? and what will it do with backslashes? /me shrugs

Quoted 6 lines

What about /../../../../../../../../..?

Honestly, the simplest way to protect against problems is to just use a hex-encoded or base32-encoded cryptographic hash as the name.
--

Any issues in just using the UUID format?

Quoted 2 lines

Sincerely,
Demi Marie Obenour (she/her/hers)

#10 lore raw
Quoted 47 lines · Parav Pandit
Quoted 47 lines

From: Demi Marie Obenour <[email protected]>
Sent: 09 September 2026 07:42 AM

Quoted 39 lines · Michael S. Tsirkin
Quoted 22 lines · Richard W.M. Jones
Quoted 7 lines · Stefan Hajnoczi

device-types/blk/description.tex \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope · line 537

Quoted 2 lines · Richard W.M. Jones
device-types/blk/description.tex +2 -0
+Although 247 byte device ID strings are allowed, there may be
+interoperability problems if strings longer than 128 bytes are used.

Can you be more specific? Is the concern that the guest software stack above of the driver may not be prepared for serial strings longer than 128 bytes?

I'll add more detail in the next version, but in brief the problems are twofold:

(1) Windows supports up to 128 "characters" (they're not precise but they probably mean Unicode codepoints from the Basic Multilingual Plane):

https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/storport/ns-storport-stor_serial_number

(2) When udev tries to encode a very long serial into a /dev/disk/by-id path you end up uncomfortably close to NAME_MAX (255).

Quoted 2 lines
Quoted 1 line

+It is also advisable to use only 7 bit ASCII characters.

Quoted 8 lines
Quoted 2 lines

Versus "The device ID string is an ASCII string which can be up to 247 bytes long" earlier in this patch. Is ASCII a "SHOULD" or a "MUST"?

It's "SHOULD". I can't see any good coming from trying to use anything except letters, numbers and dashes in a serial, but both Linux and Windows (see above) could in theory handle Unicode.

Rich.

Linux actually has code to try and handle that. unicode is actually the less problematic part - ascii is full of pitfalls, eith things like
slashes are much weirder - e.g. udev will create a subdirectory with slashes. what will windows do? and what will it do with backslashes? /me shrugs

Quoted 7 lines
Quoted 6 lines

What about /../../../../../../../../..?

Honestly, the simplest way to protect against problems is to just use a hex-encoded or base32-encoded cryptographic hash as the name.
--

Any issues in just using the UUID format?

Not as such, you can use it if you want. limiting ourselves to that isn't addressing what Rich is trying to address, which is a lot of legacy guests, since there are lots of users with lots of different ideas what a serial should be.

Quoted 2 lines
Quoted 2 lines

Sincerely,
Demi Marie Obenour (she/her/hers)

#11 lore raw
In reply to Demi Marie Obenour
Quoted 34 lines · Demi Marie Obenour
Quoted 33 lines · Michael S. Tsirkin
Quoted 30 lines · Richard W.M. Jones
Quoted 7 lines · Stefan Hajnoczi

device-types/blk/description.tex \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope · line 537

Quoted 2 lines · Richard W.M. Jones
device-types/blk/description.tex +2 -0
+Although 247 byte device ID strings are allowed, there may be
+interoperability problems if strings longer than 128 bytes are used.

Can you be more specific? Is the concern that the guest software stack above of the driver may not be prepared for serial strings longer than 128 bytes?

I'll add more detail in the next version, but in brief the problems are twofold:

(1) Windows supports up to 128 "characters" (they're not precise but they probably mean Unicode codepoints from the Basic Multilingual Plane):

https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/storport/ns-storport-stor_serial_number

(2) When udev tries to encode a very long serial into a /dev/disk/by-id path you end up uncomfortably close to NAME_MAX (255).

Quoted 4 lines
Quoted 1 line

+It is also advisable to use only 7 bit ASCII characters.

Versus "The device ID string is an ASCII string which can be up to 247 bytes long" earlier in this patch. Is ASCII a "SHOULD" or a "MUST"?

It's "SHOULD". I can't see any good coming from trying to use anything except letters, numbers and dashes in a serial, but both Linux and Windows (see above) could in theory handle Unicode.

Rich.

Quoted 8 lines
Quoted 6 lines

Linux actually has code to try and handle that. unicode is actually the less problematic part - ascii is full of pitfalls, eith things like
slashes are much weirder - e.g. udev will create a subdirectory with slashes. what will windows do? and what will it do with backslashes? /me shrugs

What about /../../../../../../../../..?

what do you want to know, whether it's valid?

the answer is no - systemd validates paths and will not attempt to create paths it considers invalid, such as ones with dots.

That code is in path-util.h,

https://github.com/systemd/systemd/blob/main/src/basic/path-util.h

peruse it if you want to know more.

Quoted 3 lines

Honestly, the simplest way to protect against problems is to just use a hex-encoded or base32-encoded cryptographic hash as the name.

I don't know that it's simplest, but yes, some do that. Other subsets are safe, too. But as I said,
unicode multibyte codepoints are not really problematic at all.

Signature · 1 line
MST
#12 lore raw
In reply to Stefan Hajnoczi
Quoted 63 lines · Stefan Hajnoczi
Quoted 47 lines · Richard W.M. Jones

SCSI-based paravirtualized block devices including virtio-scsi and VMware's pvscsi allow longer device IDs. This presents an issue when we change the backing of a disk from one type to another, eg from pvscsi to virtio-blk, or virtio-scsi to virtio-blk. The longer device ID has to be truncated to 20 bytes. This results in guest visible changes, notably /dev/disk/by-id/ paths are different, so any mountpoints or configuration files that use these paths will break.

Therefore extend virtio-blk to allow longer device IDs. I chose 247 bytes (ASCII chars) as the new limit since SCSI serials can in theory be this long. Real serials will be much shorter than this; the aim is to allow UUIDs to be preserved which would use 32 or 36 ASCII chars.

A new feature bit is introduced to indicate that long device IDs are supported.

---
 device-types/blk/description.tex | 27 ++++++++++++++++++++++++---
 1 file changed, 24 insertions(+), 3 deletions(-)
device-types/blk/description.tex +9 -2
index 3b3a4e7..aa3ec66 100644
@@ -73,6 +73,9 @@ \subsection{Feature bits}\label{sec:Device Types / Block Device / Feature bits}
     VIRTIO_BLK_REQ_FLAG_OUT_FUA flag in the \field{flags} bitfield of the
     \field{virtio_blk_req} structure for VIRTIO_BLK_T_OUT requests.
 
+\item[VIRTIO_BLK_F_LONG_ID (20)] Device supports long device ID
+    strings.
+
 \end{description}
 
 \subsubsection{Legacy Interface: Feature bits}\label{sec:Device Types / Block Device / Feature bits / Legacy Interface: Feature bits}
@@ -516,8 +519,23 @@ \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope
 zeroes.
 
 VIRTIO_BLK_T_GET_ID requests fetch the device ID string from the device into
-\field{data}.  The device ID string is a NUL-padded ASCII string up to 20 bytes
-long.  If the string is 20 bytes long then there is no NUL terminator.
+\field{data}.  The device ID string is an ASCII string which can be
+up to 247 bytes long.
+
+If VIRTIO_BLK_F_LONG_ID was not negotiated, VIRTIO_BLK_T_GET_ID
+fetches the first 20 bytes of the device ID string.  If the ID is
+shorter than 20 bytes, then the response is padded with NUL bytes so

device-types/blk/description.tex \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope · line 537

Quoted 10 lines
device-types/blk/description.tex +10 -0
+its length is 20 bytes.  (Note that if the ID is 20 bytes or longer,
+this means the response will not be NUL terminated.)
+
+If VIRTIO_BLK_F_LONG_ID was negotiated, VIRTIO_BLK_T_GET_ID fetches
+the complete device ID string.  The response is always 248 bytes long,
+padded to this length with NUL bytes.  Since the longest permitted
+device ID string is 247 bytes, the response is NUL terminated.
+
+Although 247 byte device ID strings are allowed, there may be
+interoperability problems if strings longer than 128 bytes are used.

Can you be more specific? Is the concern that the guest software stack above of the driver may not be prepared for serial strings longer than 128 bytes?

Quoted 4 lines

device-types/blk/description.tex \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope · line 538

Quoted 1 line
device-types/blk/description.tex +1 -0
+It is also advisable to use only 7 bit ASCII characters.

Versus "The device ID string is an ASCII string which can be up to 247 bytes long" earlier in this patch. Is ASCII a "SHOULD" or a "MUST"?

Without VIRTIO_BLK_F_LONG_ID it's a MUST I would say, since drivers might have relied on that. With VIRTIO_BLK_F_LONG_ID we can relax this.

udev has a set of baroque rules what is allowed in the serial everything else it replaces with _'s

int allow_listed_char_for_devnode(char c, const char *additional) {
        return
                ascii_isdigit(c) ||
                ascii_isalpha(c) ||
                strchr("#+-.:=@_", c) ||
                (additional && strchr(additional, c));
}

additional is / and space

and it allows \x followed by 2 hex digits.

And it allows any multi-byte utf-8

So in fact unicode is safer than ascii.

Does not seem like something we want in the spec to be frank.

Quoted 19 lines
Quoted 19 lines
device-types/blk/description.tex +4 -1
 The \field{data} used for VIRTIO_BLK_T_GET_LIFETIME requests is populated
 by the device, and is of the form
@@ -911,7 +929,10 @@ \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope
 virtio_blk_discard_write_zeroes for VIRTIO_BLK_T_DISCARD,
 VIRTIO_BLK_T_SECURE_ERASE and VIRTIO_BLK_T_WRITE_ZEROES requests.
 
-The length of \field{data} MUST be 20 bytes for VIRTIO_BLK_T_GET_ID requests.
+For VIRTIO_BLK_T_GET_ID requests the length of \field{data} depends
+on the feature VIRTIO_BLK_F_LONG_ID.  If VIRTIO_BLK_F_LONG_ID was
+negotiated the length of \field{data} MUST be 248 bytes, else
+it MUST be 20 bytes.
 
 VIRTIO_BLK_T_DISCARD requests MUST NOT contain more than
 \field{max_discard_seg} struct virtio_blk_discard_write_zeroes segments in
Signature · 1 line
2.55.0

A message that is not in the archive (sent off-list or not yet received): [email protected]

#14 lore raw
Quoted 64 lines · Kevin Wolf

Am 08.09.2026 um 11:40 hat Richard W.M. Jones geschrieben:

Quoted 13 lines

SCSI-based paravirtualized block devices including virtio-scsi and VMware's pvscsi allow longer device IDs. This presents an issue when we change the backing of a disk from one type to another, eg from pvscsi to virtio-blk, or virtio-scsi to virtio-blk. The longer device ID has to be truncated to 20 bytes. This results in guest visible changes, notably /dev/disk/by-id/ paths are different, so any mountpoints or configuration files that use these paths will break.

Therefore extend virtio-blk to allow longer device IDs. I chose 247 bytes (ASCII chars) as the new limit since SCSI serials can in theory be this long. Real serials will be much shorter than this; the aim is to allow UUIDs to be preserved which would use 32 or 36 ASCII chars.

Quoted 4 lines

A new feature bit is introduced to indicate that long device IDs are supported.

Please Cc: me on any future versions of the patch.

Quoted 18 lines
 device-types/blk/description.tex | 27 ++++++++++++++++++++++++---
 1 file changed, 24 insertions(+), 3 deletions(-)
device-types/blk/description.tex +3 -0
index 3b3a4e7..aa3ec66 100644
@@ -73,6 +73,9 @@ \subsection{Feature bits}\label{sec:Device Types / Block Device / Feature bits}
     VIRTIO_BLK_REQ_FLAG_OUT_FUA flag in the \field{flags} bitfield of the
     \field{virtio_blk_req} structure for VIRTIO_BLK_T_OUT requests.
 
+\item[VIRTIO_BLK_F_LONG_ID (20)] Device supports long device ID
+    strings.
+
 \end{description}
 
 \subsubsection{Legacy Interface: Feature bits}\label{sec:Device Types / Block Device / Feature bits / Legacy Interface: Feature bits}

device-types/blk/description.tex \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope · line 520

Quoted 5 lines
device-types/blk/description.tex +0 -2
@@ -516,8 +519,23 @@ \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope
 zeroes.
 
 VIRTIO_BLK_T_GET_ID requests fetch the device ID string from the device into
-\field{data}.  The device ID string is a NUL-padded ASCII string up to 20 bytes
-long.  If the string is 20 bytes long then there is no NUL terminator.

(Fun fact: If I'm not missing anything, QEMU seems non-compliant with the NUL-padding. It merely NUL-terminates the string and leaves the remainer untouched.)

device-types/blk/description.tex \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope · line 523

Quoted 2 lines
device-types/blk/description.tex +2 -0
+\field{data}.  The device ID string is an ASCII string which can be
+up to 247 bytes long.

I'd rather not replace one arbitrary limit with another one. This thread already shows how hard it is to agree on a good number. We can just leave this to the device implementations.

Quoted 9 lines
device-types/blk/description.tex +9 -0
+If VIRTIO_BLK_F_LONG_ID was not negotiated, VIRTIO_BLK_T_GET_ID
+fetches the first 20 bytes of the device ID string.  If the ID is
+shorter than 20 bytes, then the response is padded with NUL bytes so
+its length is 20 bytes.  (Note that if the ID is 20 bytes or longer,
+this means the response will not be NUL terminated.)
+
+If VIRTIO_BLK_F_LONG_ID was negotiated, VIRTIO_BLK_T_GET_ID fetches
+the complete device ID string.  The response is always 248 bytes long,
+padded to this length with NUL bytes.  Since the longest permitted
Quoted 8 lines

device-types/blk/description.tex \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope · line 534

Quoted 1 line
device-types/blk/description.tex +1 -0
+device ID string is 247 bytes, the response is NUL terminated.

How about this instead: The config space advertises the actual length of the serial [1]; the config space field is valid if the device offers VIRTIO_BLK_F_LONG_ID. And then VIRTIO_BLK_T_GET_ID just fetches as many bytes from the serial as the driver requested. If VIRTIO_BLK_F_LONG_ID was not negotiated, the requirement that it request exactly 20 bytes remains intact.

I think for compatibility with existing setups, it is preferable to keep a way for *same* driver to say: 1. now i want the legacy 20 byte id - or - 2. now I want a long id. because if one wants a unique 20 byte id then it is likely not a prefix of the long one - people like doing things like using the vendor as a prefix, for example.

Quoted 3 lines

A sane driver would just look at the serial length, sanitise it, and if it's happy with the length, it negotiates VIRTIO_BLK_F_LONG_ID and later issues VIRTIO_BLK_T_GET_ID with the right number of bytes.

it is quite sane to want both a 20byte id and an X byte id.

Quoted 3 lines

[1] Implicitly, there would still be a limit, by us choosing either u8 or le16 for the field, but it would be a lot less arbitrary and not involve any checks that might be forgotten to actually be performed.

I doubt it makes sense to have more than 1 byte for the length...

I'm not sure what kind of checks you have in mind. A fixed length buffer is strictly simpler, isn't it?

What I would do though is get rid of the null termination funkiness. just write out the serial and report the length.

Quoted 21 lines
Quoted 9 lines
device-types/blk/description.tex +3 -0
+Although 247 byte device ID strings are allowed, there may be
+interoperability problems if strings longer than 128 bytes are used.
+It is also advisable to use only 7 bit ASCII characters.
 
 The \field{data} used for VIRTIO_BLK_T_GET_LIFETIME requests is populated
 by the device, and is of the form
@@ -911,7 +929,10 @@ \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope
 virtio_blk_discard_write_zeroes for VIRTIO_BLK_T_DISCARD,

device-types/blk/description.tex \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope · line 938

Quoted 10 lines
device-types/blk/description.tex +4 -1
 VIRTIO_BLK_T_SECURE_ERASE and VIRTIO_BLK_T_WRITE_ZEROES requests.
 
-The length of \field{data} MUST be 20 bytes for VIRTIO_BLK_T_GET_ID requests.
+For VIRTIO_BLK_T_GET_ID requests the length of \field{data} depends
+on the feature VIRTIO_BLK_F_LONG_ID.  If VIRTIO_BLK_F_LONG_ID was
+negotiated the length of \field{data} MUST be 248 bytes, else
+it MUST be 20 bytes.
 
 VIRTIO_BLK_T_DISCARD requests MUST NOT contain more than
 \field{max_discard_seg} struct virtio_blk_discard_write_zeroes segments in

Kevin

#15 lore raw
In reply to a message not in the archive

Thanks for the review. I just want to note that I'm not going to pursue this patch further. If anyone else wishes to take up the idea then please go ahead.

Rich.

Signature · 4 lines
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org