From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40493) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOX5b-0005To-2U for qemu-devel@nongnu.org; Thu, 19 Feb 2015 14:48:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YOX5W-0000no-WE for qemu-devel@nongnu.org; Thu, 19 Feb 2015 14:48:47 -0500 Received: from mailout25.mail01.mtsvc.net ([216.70.64.55]:57576 helo=n20.mail01.mtsvc.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOX5W-0000ng-Sq for qemu-devel@nongnu.org; Thu, 19 Feb 2015 14:48:42 -0500 Received: from usa-67-224-98-162.sohonet.co.uk ([67.224.98.162]:16918 helo=[192.168.3.15]) by n20.mail01.mtsvc.net with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1YOX5U-0000d6-AL for qemu-devel@nongnu.org; Thu, 19 Feb 2015 14:48:40 -0500 From: Alan Latteri Content-Type: multipart/alternative; boundary="Apple-Mail=_50BEAC2A-3D92-41B8-9B0E-5A8F13B94D26" Message-Id: Date: Thu, 19 Feb 2015 11:48:39 -0800 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: [Qemu-devel] unable to set SATA serial with a spaces List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --Apple-Mail=_50BEAC2A-3D92-41B8-9B0E-5A8F13B94D26 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii I am virtualzing a physical server for which I need to set the SCSI/SATA = drive serial. It is comprised of 12 " " spaces then 8 letter/digits. If = I exclude the spaces, the drive serial is not accurate. If I include the = spaces I get the following error. error: Failed to start domain test1 error: internal error: driver serial ' ABCD1234' contains unsafe = characters virsh edit Centos 7.0 3.19.0-1.el7.elrepo.x86_64 QEMU emulator version 1.5.3 (qemu-kvm-1.5.3-60.el7.centos.7), Copyright = (c) 2003-2008 Fabrice Bellard= --Apple-Mail=_50BEAC2A-3D92-41B8-9B0E-5A8F13B94D26 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii

I am virtualzing a physical server for = which I need to set the SCSI/SATA drive serial. It is comprised of 12 " = " spaces then 8 letter/digits. If I exclude the spaces, the drive serial = is not accurate. If I include the spaces I get the following = error.

error: Failed to start domain test1
error: internal error: driver serial ' ABCD1234' contains = unsafe characters

virsh edit
Centos 7.0
3.19.0-1.el7.elrepo.x86_64
QEMU emulator version 1.5.3 (qemu-kvm-1.5.3-60.el7.centos.7), = Copyright (c) 2003-2008 Fabrice Bellard

= --Apple-Mail=_50BEAC2A-3D92-41B8-9B0E-5A8F13B94D26-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33531) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOZKz-0007BY-Qe for qemu-devel@nongnu.org; Thu, 19 Feb 2015 17:12:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YOZKw-0007d7-L8 for qemu-devel@nongnu.org; Thu, 19 Feb 2015 17:12:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34519) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOZKw-0007d3-DL for qemu-devel@nongnu.org; Thu, 19 Feb 2015 17:12:46 -0500 Message-ID: <54E65FDB.4050708@redhat.com> Date: Thu, 19 Feb 2015 17:12:43 -0500 From: John Snow MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] unable to set SATA serial with a spaces List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alan Latteri , qemu-devel@nongnu.org On 02/19/2015 02:48 PM, Alan Latteri wrote: > I am virtualzing a physical server for which I need to set the SCSI/SATA > drive serial. It is comprised of 12 " " spaces then 8 letter/digits. If > I exclude the spaces, the drive serial is not accurate. If I include the > spaces I get the following error. > > error: Failed to start domain test1 > error: internal error: driver serial ' ABCD1234' contains unsafe characters > > virsh edit > Centos 7.0 > 3.19.0-1.el7.elrepo.x86_64 > QEMU emulator version 1.5.3 (qemu-kvm-1.5.3-60.el7.centos.7), Copyright > (c) 2003-2008 Fabrice Bellard > Are you sure you need to input the spaces? the standard inquiry reply that outputs the serial uses spaces as padding, so even if you use serial "ABCD1234" the inquiry command is going to tell you " ABCD1234". Do you have software that relies on the serial number and can tell the difference between spaces present and no spaces present? --js From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33895) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOZN7-0000Qq-QI for qemu-devel@nongnu.org; Thu, 19 Feb 2015 17:15:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YOZN4-0007wu-Kx for qemu-devel@nongnu.org; Thu, 19 Feb 2015 17:15:01 -0500 Received: from mailout25.mail01.mtsvc.net ([216.70.64.55]:59794 helo=n20.mail01.mtsvc.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOZN4-0007wo-Gp for qemu-devel@nongnu.org; Thu, 19 Feb 2015 17:14:58 -0500 Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) From: Alan Latteri In-Reply-To: <54E65FDB.4050708@redhat.com> Date: Thu, 19 Feb 2015 14:14:55 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: References: <54E65FDB.4050708@redhat.com> Subject: Re: [Qemu-devel] unable to set SATA serial with a spaces List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow Cc: qemu-devel@nongnu.org I have a software that I was able to virtualize on VirtualBox by setting = the HD serial using the spaces easily. Using the same parameters minus = the spaces with QEMU, the software will not license. Only different I = can see is this. > On Feb 19, 2015, at 2:12 PM, John Snow wrote: >=20 >=20 >=20 > On 02/19/2015 02:48 PM, Alan Latteri wrote: >> I am virtualzing a physical server for which I need to set the = SCSI/SATA >> drive serial. It is comprised of 12 " " spaces then 8 letter/digits. = If >> I exclude the spaces, the drive serial is not accurate. If I include = the >> spaces I get the following error. >>=20 >> error: Failed to start domain test1 >> error: internal error: driver serial ' ABCD1234' contains unsafe = characters >>=20 >> virsh edit >> Centos 7.0 >> 3.19.0-1.el7.elrepo.x86_64 >> QEMU emulator version 1.5.3 (qemu-kvm-1.5.3-60.el7.centos.7), = Copyright >> (c) 2003-2008 Fabrice Bellard >>=20 >=20 > Are you sure you need to input the spaces? the standard inquiry reply = that outputs the serial uses spaces as padding, so even if you use = serial "ABCD1234" the inquiry command is going to tell you > " ABCD1234". >=20 > Do you have software that relies on the serial number and can tell the = difference between spaces present and no spaces present? >=20 > --js From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60667) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOiEK-0001ca-SC for qemu-devel@nongnu.org; Fri, 20 Feb 2015 02:42:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YOiEI-0003jw-5h for qemu-devel@nongnu.org; Fri, 20 Feb 2015 02:42:32 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40722) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOiEH-0003jB-U1 for qemu-devel@nongnu.org; Fri, 20 Feb 2015 02:42:30 -0500 From: Markus Armbruster References: <54E65FDB.4050708@redhat.com> Date: Fri, 20 Feb 2015 08:42:25 +0100 In-Reply-To: <54E65FDB.4050708@redhat.com> (John Snow's message of "Thu, 19 Feb 2015 17:12:43 -0500") Message-ID: <874mqhav1a.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] unable to set SATA serial with a spaces List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow Cc: qemu-devel@nongnu.org, Alan Latteri John Snow writes: > On 02/19/2015 02:48 PM, Alan Latteri wrote: >> I am virtualzing a physical server for which I need to set the SCSI/SATA >> drive serial. It is comprised of 12 " " spaces then 8 letter/digits. If >> I exclude the spaces, the drive serial is not accurate. If I include the >> spaces I get the following error. >> >> error: Failed to start domain test1 >> error: internal error: driver serial ' ABCD1234' contains unsafe characters >> >> virsh edit >> Centos 7.0 >> 3.19.0-1.el7.elrepo.x86_64 >> QEMU emulator version 1.5.3 (qemu-kvm-1.5.3-60.el7.centos.7), Copyright >> (c) 2003-2008 Fabrice Bellard >> > > Are you sure you need to input the spaces? the standard inquiry reply > that outputs the serial uses spaces as padding, so even if you use > serial "ABCD1234" the inquiry command is going to tell you > " ABCD1234". Are you sure it pads on the left? padstr() doesn't look like left... [...] From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35611) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOiZV-0007l8-Ti for qemu-devel@nongnu.org; Fri, 20 Feb 2015 03:04:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YOiZS-0001k5-GT for qemu-devel@nongnu.org; Fri, 20 Feb 2015 03:04:25 -0500 Received: from mailout25.mail01.mtsvc.net ([216.70.64.55]:45803 helo=n20.mail01.mtsvc.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOiZS-0001jv-BU for qemu-devel@nongnu.org; Fri, 20 Feb 2015 03:04:22 -0500 Content-Type: multipart/alternative; boundary="Apple-Mail=_43ED4E93-CC85-47C6-9928-353D98AD388F" Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) From: Alan Latteri In-Reply-To: <874mqhav1a.fsf@blackfin.pond.sub.org> Date: Fri, 20 Feb 2015 00:04:11 -0800 Message-Id: <9EA9323F-E450-430B-8722-2BF2D88BCE89@instinctual.tv> References: <54E65FDB.4050708@redhat.com> <874mqhav1a.fsf@blackfin.pond.sub.org> Subject: Re: [Qemu-devel] unable to set SATA serial with a spaces List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: John Snow , qemu-devel@nongnu.org --Apple-Mail=_43ED4E93-CC85-47C6-9928-353D98AD388F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Yes, left pad. This is a strace of the authorization program via = VirtualBox data[96]=3D["\0\200\0\24 ABCD1234\0\0\0\0\0\0\0\0"=E2=80=A6] then the same thing using the serial setting no spaces in QEMU. data[96]=3D["\0\200\0\024ABCD1234 \0\0\0\0\0\0\0\0"=E2=80=A6] The spaces matter here. I tried setting the spaces manually running QEMU from the command line, = but that doesn=E2=80=99t work. [root@XXXXX ~]# /usr/libexec/qemu-kvm -name test1 -S -machine = rhel6.0.0,accel=3Dkvm,usb=3Doff -m 1024 -realtime mlock=3Doff -smp = 1,sockets=3D1,cores=3D1,threads=3D1 -uuid = 372419e1-ca68-408f-b809-04ce54450e60 -no-user-config -nodefaults = -chardev = socket,id=3Dcharmonitor,path=3D/var/lib/libvirt/qemu/test1.monitor,server,= nowait -mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol -rtc = base=3Dutc -no-shutdown -boot strict=3Don -device = piix3-usb-uhci,id=3Dusb,bus=3Dpci.0,addr=3D0x1.0x2 -device = ahci,id=3Dahci0,bus=3Dpci.0,addr=3D0xd -drive = file=3D/var/lib/libvirt/images/372419e1-ca68-408f-b809-04ce54450e60-0.img,= if=3Dnone,id=3Ddrive-sata0-0-0,format=3Dqcow2,serial=3D = ABCD1234,cache=3Dnone -device = ide-hd,bus=3Dahci0.0,drive=3Ddrive-sata0-0-0,id=3Dsata0-0-0,bootindex=3D1 qemu-kvm: -drive = file=3D/var/lib/libvirt/images/372419e1-ca68-408f-b809-04ce54450e60-0.img,= if=3Dnone,id=3Ddrive-sata0-0-0,format=3Dqcow2,serial=3D: could not open = disk image ABCD1234,cache=3Dnone: Could not open file: No such file or = directory tried with quotes around the serial value and also using escpare = characters. No go. Thanks, Alan > On Feb 19, 2015, at 11:42 PM, Markus Armbruster = wrote: >=20 > John Snow > writes: >=20 >> On 02/19/2015 02:48 PM, Alan Latteri wrote: >>> I am virtualzing a physical server for which I need to set the = SCSI/SATA >>> drive serial. It is comprised of 12 " " spaces then 8 letter/digits. = If >>> I exclude the spaces, the drive serial is not accurate. If I include = the >>> spaces I get the following error. >>>=20 >>> error: Failed to start domain test1 >>> error: internal error: driver serial ' ABCD1234' contains unsafe = characters >>>=20 >>> virsh edit >>> Centos 7.0 >>> 3.19.0-1.el7.elrepo.x86_64 >>> QEMU emulator version 1.5.3 (qemu-kvm-1.5.3-60.el7.centos.7), = Copyright >>> (c) 2003-2008 Fabrice Bellard >>>=20 >>=20 >> Are you sure you need to input the spaces? the standard inquiry reply >> that outputs the serial uses spaces as padding, so even if you use >> serial "ABCD1234" the inquiry command is going to tell you >> " ABCD1234". >=20 > Are you sure it pads on the left? padstr() doesn't look like left... >=20 > [...] --Apple-Mail=_43ED4E93-CC85-47C6-9928-353D98AD388F Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Yes, left pad.  This is a strace of the authorization = program via VirtualBox
data[96]=3D["\0\200\0\24   =         =  ABCD1234\0\0\0\0\0\0\0\0"=E2=80=A6]

then the same thing using the serial = setting no spaces in QEMU.

data[96]=3D["\0\200\0\024ABCD1234         =    \0\0\0\0\0\0\0\0"=E2=80=A6]

The spaces matter here.


I tried setting the spaces manually running QEMU from the = command line, but that doesn=E2=80=99t work.

[root@XXXXX ~]# /usr/libexec/qemu-kvm = -name test1 -S -machine rhel6.0.0,accel=3Dkvm,usb=3Doff -m 1024 = -realtime mlock=3Doff -smp 1,sockets=3D1,cores=3D1,threads=3D1 -uuid = 372419e1-ca68-408f-b809-04ce54450e60 -no-user-config -nodefaults = -chardev = socket,id=3Dcharmonitor,path=3D/var/lib/libvirt/qemu/test1.monitor,server,= nowait -mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol -rtc = base=3Dutc -no-shutdown -boot strict=3Don = -device piix3-usb-uhci,id=3Dusb,bus=3Dpci.0,addr=3D0x1.0x2 -device = ahci,id=3Dahci0,bus=3Dpci.0,addr=3D0xd -drive = file=3D/var/lib/libvirt/images/372419e1-ca68-408f-b809-04ce54450e60-0.img,= if=3Dnone,id=3Ddrive-sata0-0-0,format=3Dqcow2,serial=3D    =         ABCD1234,cache=3Dnone -device = ide-hd,bus=3Dahci0.0,drive=3Ddrive-sata0-0-0,id=3Dsata0-0-0,bootindex=3D1<= br class=3D"">
qemu-kvm: -drive = file=3D/var/lib/libvirt/images/372419e1-ca68-408f-b809-04ce54450e60-0.img,= if=3Dnone,id=3Ddrive-sata0-0-0,format=3Dqcow2,serial=3D: could not open = disk image ABCD1234,cache=3Dnone: Could not open file: No such file = or directory


tried with quotes around the serial = value and also using escpare characters.

No go.

Thanks,
Alan

On = Feb 19, 2015, at 11:42 PM, Markus Armbruster <armbru@redhat.com> = wrote:

John Snow <jsnow@redhat.com> writes:

On 02/19/2015 02:48 PM, = Alan Latteri wrote:
I = am virtualzing a physical server for which I need to set the = SCSI/SATA
drive serial. It is comprised of 12 " " spaces = then 8 letter/digits. If
I exclude the spaces, the drive = serial is not accurate. If I include the
spaces I get the = following error.

error: Failed to start = domain test1
error: internal error: driver serial ' = ABCD1234' contains unsafe characters

virsh = edit
Centos 7.0
3.19.0-1.el7.elrepo.x86_64
QEMU emulator version 1.5.3 (qemu-kvm-1.5.3-60.el7.centos.7), = Copyright
(c) 2003-2008 Fabrice Bellard


Are you sure you need to input = the spaces? the standard inquiry reply
that outputs the = serial uses spaces as padding, so even if you use
serial = "ABCD1234" the inquiry command is going to tell you
" =            ABCD1234= ".

Are you sure it pads on = the left?  padstr() doesn't look like left...

[...]

= --Apple-Mail=_43ED4E93-CC85-47C6-9928-353D98AD388F-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47851) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOjjH-0003xp-DE for qemu-devel@nongnu.org; Fri, 20 Feb 2015 04:18:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YOjjA-0000VQ-PD for qemu-devel@nongnu.org; Fri, 20 Feb 2015 04:18:35 -0500 Received: from mailout25.mail01.mtsvc.net ([216.70.64.55]:37744 helo=n20.mail01.mtsvc.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOjjA-0000V7-KW for qemu-devel@nongnu.org; Fri, 20 Feb 2015 04:18:28 -0500 Content-Type: multipart/alternative; boundary="Apple-Mail=_46F02D10-E1ED-4412-8DF8-0021A21A7C91" Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) From: Alan Latteri In-Reply-To: <874mqhav1a.fsf@blackfin.pond.sub.org> Date: Fri, 20 Feb 2015 01:18:24 -0800 Message-Id: <3AD8E0F9-DBBE-4455-97D3-FE045783FE0C@instinctual.tv> References: <54E65FDB.4050708@redhat.com> <874mqhav1a.fsf@blackfin.pond.sub.org> Subject: Re: [Qemu-devel] unable to set SATA serial with a spaces List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: John Snow , qemu-devel@nongnu.org --Apple-Mail=_46F02D10-E1ED-4412-8DF8-0021A21A7C91 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii =46rom what I can tell in the code, padstr() is only coded in the IDE = section, not SCSI/SATA? > On Feb 19, 2015, at 11:42 PM, Markus Armbruster = wrote: >=20 > John Snow > writes: >=20 >> On 02/19/2015 02:48 PM, Alan Latteri wrote: >>> I am virtualzing a physical server for which I need to set the = SCSI/SATA >>> drive serial. It is comprised of 12 " " spaces then 8 letter/digits. = If >>> I exclude the spaces, the drive serial is not accurate. If I include = the >>> spaces I get the following error. >>>=20 >>> error: Failed to start domain test1 >>> error: internal error: driver serial ' ABCD1234' contains unsafe = characters >>>=20 >>> virsh edit >>> Centos 7.0 >>> 3.19.0-1.el7.elrepo.x86_64 >>> QEMU emulator version 1.5.3 (qemu-kvm-1.5.3-60.el7.centos.7), = Copyright >>> (c) 2003-2008 Fabrice Bellard >>>=20 >>=20 >> Are you sure you need to input the spaces? the standard inquiry reply >> that outputs the serial uses spaces as padding, so even if you use >> serial "ABCD1234" the inquiry command is going to tell you >> " ABCD1234". >=20 > Are you sure it pads on the left? padstr() doesn't look like left... >=20 > [...] --Apple-Mail=_46F02D10-E1ED-4412-8DF8-0021A21A7C91 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii =46rom what I can tell in the code, padstr() is only coded in = the IDE section, not SCSI/SATA?


On Feb 19, 2015, at 11:42 PM, Markus Armbruster <armbru@redhat.com> = wrote:

John Snow <jsnow@redhat.com> writes:

On 02/19/2015 02:48 PM, = Alan Latteri wrote:
I = am virtualzing a physical server for which I need to set the = SCSI/SATA
drive serial. It is comprised of 12 " " spaces = then 8 letter/digits. If
I exclude the spaces, the drive = serial is not accurate. If I include the
spaces I get the = following error.

error: Failed to start = domain test1
error: internal error: driver serial ' = ABCD1234' contains unsafe characters

virsh = edit
Centos 7.0
3.19.0-1.el7.elrepo.x86_64
QEMU emulator version 1.5.3 (qemu-kvm-1.5.3-60.el7.centos.7), = Copyright
(c) 2003-2008 Fabrice Bellard


Are you sure you need to input = the spaces? the standard inquiry reply
that outputs the = serial uses spaces as padding, so even if you use
serial = "ABCD1234" the inquiry command is going to tell you
" =            ABCD1234= ".

Are you sure it pads on = the left?  padstr() doesn't look like left...

[...]

= --Apple-Mail=_46F02D10-E1ED-4412-8DF8-0021A21A7C91-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49727) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOjtZ-00085g-9F for qemu-devel@nongnu.org; Fri, 20 Feb 2015 04:29:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YOjtT-0003sJ-7p for qemu-devel@nongnu.org; Fri, 20 Feb 2015 04:29:13 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56557) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOjtS-0003sE-VG for qemu-devel@nongnu.org; Fri, 20 Feb 2015 04:29:07 -0500 From: Markus Armbruster References: <54E65FDB.4050708@redhat.com> <874mqhav1a.fsf@blackfin.pond.sub.org> <9EA9323F-E450-430B-8722-2BF2D88BCE89@instinctual.tv> Date: Fri, 20 Feb 2015 10:28:59 +0100 In-Reply-To: <9EA9323F-E450-430B-8722-2BF2D88BCE89@instinctual.tv> (Alan Latteri's message of "Fri, 20 Feb 2015 00:04:11 -0800") Message-ID: <87wq3d6iec.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] unable to set SATA serial with a spaces List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alan Latteri Cc: John Snow , qemu-devel@nongnu.org Alan Latteri writes: > Yes, left pad. This is a strace of the authorization program via Virtual= Box > data[96]=3D["\0\200\0\24 ABCD1234\0\0\0\0\0\0\0\0"=E2=80=A6] > > then the same thing using the serial setting no spaces in QEMU. > > data[96]=3D["\0\200\0\024ABCD1234 \0\0\0\0\0\0\0\0"=E2=80=A6] > > The spaces matter here. > > > I tried setting the spaces manually running QEMU from the command > line, but that doesn=E2=80=99t work. > > [root@XXXXX ~]# /usr/libexec/qemu-kvm -name test1 -S -machine > rhel6.0.0,accel=3Dkvm,usb=3Doff -m 1024 -realtime mlock=3Doff -smp > 1,sockets=3D1,cores=3D1,threads=3D1 -uuid > 372419e1-ca68-408f-b809-04ce54450e60 -no-user-config -nodefaults > -chardev > socket,id=3Dcharmonitor,path=3D/var/lib/libvirt/qemu/test1.monitor,server= ,nowait > -mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol -rtc base=3Dutc > -no-shutdown -boot strict=3Don -device > piix3-usb-uhci,id=3Dusb,bus=3Dpci.0,addr=3D0x1.0x2 -device > ahci,id=3Dahci0,bus=3Dpci.0,addr=3D0xd -drive > file=3D/var/lib/libvirt/images/372419e1-ca68-408f-b809-04ce54450e60-0.img= ,if=3Dnone,id=3Ddrive-sata0-0-0,format=3Dqcow2,serial=3D > ABCD1234,cache=3Dnone -device > ide-hd,bus=3Dahci0.0,drive=3Ddrive-sata0-0-0,id=3Dsata0-0-0,bootindex=3D1 > > qemu-kvm: -drive > file=3D/var/lib/libvirt/images/372419e1-ca68-408f-b809-04ce54450e60-0.img= ,if=3Dnone,id=3Ddrive-sata0-0-0,format=3Dqcow2,serial=3D: > could not open disk image ABCD1234,cache=3Dnone: Could not open file: No > such file or directory > > > tried with quotes around the serial value and also using escpare characte= rs. > > No go. Quoting appears to work for me: $ echo -e 'info qtree\nq' | qemu-system-x86_64 -nodefaults -S -display none= -monitor stdio -drive if=3Dnone,id=3Ddrv0,file=3Dtmp.qcow2,serial=3D' = ABCD1234' -device ide-hd,drive=3Ddrv0 | grep serial serial =3D " ABCD1234" Aside: the above uses legacy syntax. The preferred place for serial is -device, like this: -drive if=3Dnone,id=3Ddrv0,file=3Dtmp.qcow2 -device ide-hd,drive=3Ddrv0,serial=3D' ABCD1234' From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36811) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YP0vp-00068C-Fd for qemu-devel@nongnu.org; Fri, 20 Feb 2015 22:40:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YP0vm-0007BK-4o for qemu-devel@nongnu.org; Fri, 20 Feb 2015 22:40:41 -0500 Received: from mailout25.mail01.mtsvc.net ([216.70.64.55]:51170 helo=n20.mail01.mtsvc.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YP0vl-0007B3-VV for qemu-devel@nongnu.org; Fri, 20 Feb 2015 22:40:38 -0500 Content-Type: multipart/alternative; boundary="Apple-Mail=_0014874B-2006-4020-BC45-47B225E705FD" Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) From: Alan Latteri In-Reply-To: <87wq3d6iec.fsf@blackfin.pond.sub.org> Date: Fri, 20 Feb 2015 19:40:33 -0800 Message-Id: <441401E2-780B-405B-8A22-0A933317D748@instinctual.tv> References: <54E65FDB.4050708@redhat.com> <874mqhav1a.fsf@blackfin.pond.sub.org> <9EA9323F-E450-430B-8722-2BF2D88BCE89@instinctual.tv> <87wq3d6iec.fsf@blackfin.pond.sub.org> Subject: Re: [Qemu-devel] unable to set SATA serial with a spaces List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: John Snow , qemu-devel@nongnu.org --Apple-Mail=_0014874B-2006-4020-BC45-47B225E705FD Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 The left padding is important and necessary to keep for my particular = application. This is broken in libvirt, but works fine with direct Qemu = invocation. =20 Thank you for the help.=20 Alan > On Feb 20, 2015, at 1:28 AM, Markus Armbruster = wrote: >=20 > Alan Latteri > = writes: >=20 >> Yes, left pad. This is a strace of the authorization program via = VirtualBox >> data[96]=3D["\0\200\0\24 ABCD1234\0\0\0\0\0\0\0\0"=E2=80=A6]= >>=20 >> then the same thing using the serial setting no spaces in QEMU. >>=20 >> data[96]=3D["\0\200\0\024ABCD1234 \0\0\0\0\0\0\0\0"=E2=80=A6= ] >>=20 >> The spaces matter here. >>=20 >>=20 >> I tried setting the spaces manually running QEMU from the command >> line, but that doesn=E2=80=99t work. >>=20 >> [root@XXXXX ~]# /usr/libexec/qemu-kvm -name test1 -S -machine >> rhel6.0.0,accel=3Dkvm,usb=3Doff -m 1024 -realtime mlock=3Doff -smp >> 1,sockets=3D1,cores=3D1,threads=3D1 -uuid >> 372419e1-ca68-408f-b809-04ce54450e60 -no-user-config -nodefaults >> -chardev >> = socket,id=3Dcharmonitor,path=3D/var/lib/libvirt/qemu/test1.monitor,server,= nowait >> -mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol -rtc base=3Dutc >> -no-shutdown -boot strict=3Don -device >> piix3-usb-uhci,id=3Dusb,bus=3Dpci.0,addr=3D0x1.0x2 -device >> ahci,id=3Dahci0,bus=3Dpci.0,addr=3D0xd -drive >> = file=3D/var/lib/libvirt/images/372419e1-ca68-408f-b809-04ce54450e60-0.img,= if=3Dnone,id=3Ddrive-sata0-0-0,format=3Dqcow2,serial=3D >> ABCD1234,cache=3Dnone -device >> ide-hd,bus=3Dahci0.0,drive=3Ddrive-sata0-0-0,id=3Dsata0-0-0,bootindex=3D= 1 >>=20 >> qemu-kvm: -drive >> = file=3D/var/lib/libvirt/images/372419e1-ca68-408f-b809-04ce54450e60-0.img,= if=3Dnone,id=3Ddrive-sata0-0-0,format=3Dqcow2,serial=3D: >> could not open disk image ABCD1234,cache=3Dnone: Could not open file: = No >> such file or directory >>=20 >>=20 >> tried with quotes around the serial value and also using escpare = characters. >>=20 >> No go. >=20 > Quoting appears to work for me: >=20 > $ echo -e 'info qtree\nq' | qemu-system-x86_64 -nodefaults -S -display = none -monitor stdio -drive if=3Dnone,id=3Ddrv0,file=3Dtmp.qcow2,serial=3D'= ABCD1234' -device ide-hd,drive=3Ddrv0 | grep serial > serial =3D " ABCD1234" >=20 > Aside: the above uses legacy syntax. The preferred place for serial = is > -device, like this: >=20 > -drive if=3Dnone,id=3Ddrv0,file=3Dtmp.qcow2 > -device ide-hd,drive=3Ddrv0,serial=3D' ABCD1234' --Apple-Mail=_0014874B-2006-4020-BC45-47B225E705FD Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8  The left padding is important and necessary to keep for = my particular application.  This is broken in libvirt, but works = fine with direct Qemu invocation.  

Thank you for the help. 
Alan

On Feb 20, 2015, at 1:28 AM, = Markus Armbruster <armbru@redhat.com> wrote:

Alan Latteri <alan@instinctual.tv> writes:

Yes, left pad. =  This is a strace of the authorization program via VirtualBox
data[96]=3D["\0\200\0\24 =            ABCD1234= \0\0\0\0\0\0\0\0"=E2=80=A6]

then the same = thing using the serial setting no spaces in QEMU.

data[96]=3D["\0\200\0\024ABCD1234 =            \0\0\0\0= \0\0\0\0"=E2=80=A6]

The spaces matter = here.


I tried setting the = spaces manually running QEMU from the command
line, but = that doesn=E2=80=99t work.

[root@XXXXX ~]# = /usr/libexec/qemu-kvm -name test1 -S -machine
rhel6.0.0,accel=3Dkvm,usb=3Doff -m 1024 -realtime mlock=3Doff = -smp
1,sockets=3D1,cores=3D1,threads=3D1 -uuid
372419e1-ca68-408f-b809-04ce54450e60 -no-user-config = -nodefaults
-chardev
socket,id=3Dcharmonitor,path=3D/var/lib/libvirt/qemu/test1.moni= tor,server,nowait
-mon = chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol -rtc base=3Dutc
-no-shutdown -boot strict=3Don -device
piix3-usb-uhci,id=3Dusb,bus=3Dpci.0,addr=3D0x1.0x2 -device
ahci,id=3Dahci0,bus=3Dpci.0,addr=3D0xd -drive
file=3D/var/lib/libvirt/images/372419e1-ca68-408f-b809-04ce5445= 0e60-0.img,if=3Dnone,id=3Ddrive-sata0-0-0,format=3Dqcow2,serial=3D
ABCD1234,cache=3Dnone -device
ide-hd,bus=3Dahci0.0,drive=3Ddrive-sata0-0-0,id=3Dsata0-0-0,boo= tindex=3D1

qemu-kvm: -drive
file=3D/var/lib/libvirt/images/372419e1-ca68-408f-b809-04ce5445= 0e60-0.img,if=3Dnone,id=3Ddrive-sata0-0-0,format=3Dqcow2,serial=3D:
could not open disk image ABCD1234,cache=3Dnone: Could not = open file: No
such file or directory


tried with quotes around the serial value and = also using escpare characters.

No go.

Quoting appears to work = for me:

$ echo -e 'info qtree\nq' = | qemu-system-x86_64 -nodefaults -S -display none -monitor stdio -drive = if=3Dnone,id=3Ddrv0,file=3Dtmp.qcow2,serial=3D' =            ABCD1234= ' -device ide-hd,drive=3Ddrv0 | grep serial
          &nb= sp;serial =3D " =            ABCD1234= "

Aside: the above uses = legacy syntax.  The preferred place for serial is
-device, like this:

   -drive = if=3Dnone,id=3Ddrv0,file=3Dtmp.qcow2
   -device = ide-hd,drive=3Ddrv0,serial=3D' =            ABCD1234= '

= --Apple-Mail=_0014874B-2006-4020-BC45-47B225E705FD-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35580) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YPq6M-0007oa-6s for qemu-devel@nongnu.org; Mon, 23 Feb 2015 05:18:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YPq6J-0005n8-07 for qemu-devel@nongnu.org; Mon, 23 Feb 2015 05:18:58 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42255) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YPq6I-0005n1-P6 for qemu-devel@nongnu.org; Mon, 23 Feb 2015 05:18:54 -0500 From: Markus Armbruster References: <54E65FDB.4050708@redhat.com> <874mqhav1a.fsf@blackfin.pond.sub.org> <9EA9323F-E450-430B-8722-2BF2D88BCE89@instinctual.tv> <87wq3d6iec.fsf@blackfin.pond.sub.org> <441401E2-780B-405B-8A22-0A933317D748@instinctual.tv> Date: Mon, 23 Feb 2015 11:18:48 +0100 In-Reply-To: <441401E2-780B-405B-8A22-0A933317D748@instinctual.tv> (Alan Latteri's message of "Fri, 20 Feb 2015 19:40:33 -0800") Message-ID: <874mqdue0n.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] unable to set SATA serial with a spaces List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alan Latteri Cc: John Snow , qemu-devel@nongnu.org Alan Latteri writes: > The left padding is important and necessary to keep for my particular > application. This is broken in libvirt, but works fine with direct > Qemu invocation. > > Thank you for the help. Please file a bug against libvirt, so this gets fixed. https://bugzilla.redhat.com/enter_bug.cgi?product=Virtualization%20Tools&component=libvirt http://libvirt.org/bugs.html From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49659) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YPrO3-00084y-Qm for qemu-devel@nongnu.org; Mon, 23 Feb 2015 06:41:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YPrNx-0006rJ-BT for qemu-devel@nongnu.org; Mon, 23 Feb 2015 06:41:19 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48082) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YPrNx-0006r7-4P for qemu-devel@nongnu.org; Mon, 23 Feb 2015 06:41:13 -0500 Message-ID: <54EB11D2.2070905@redhat.com> Date: Mon, 23 Feb 2015 12:41:06 +0100 From: Michal Privoznik MIME-Version: 1.0 References: <54E65FDB.4050708@redhat.com> <874mqhav1a.fsf@blackfin.pond.sub.org> <9EA9323F-E450-430B-8722-2BF2D88BCE89@instinctual.tv> <87wq3d6iec.fsf@blackfin.pond.sub.org> <441401E2-780B-405B-8A22-0A933317D748@instinctual.tv> <874mqdue0n.fsf@blackfin.pond.sub.org> In-Reply-To: <874mqdue0n.fsf@blackfin.pond.sub.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] unable to set SATA serial with a spaces List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , Alan Latteri Cc: John Snow , qemu-devel@nongnu.org On 23.02.2015 11:18, Markus Armbruster wrote: > Alan Latteri writes: > >> The left padding is important and necessary to keep for my particular >> application. This is broken in libvirt, but works fine with direct >> Qemu invocation. >> >> Thank you for the help. > > Please file a bug against libvirt, so this gets fixed. > > https://bugzilla.redhat.com/enter_bug.cgi?product=Virtualization%20Tools&component=libvirt > http://libvirt.org/bugs.html > I've just proposed a patch for that: https://www.redhat.com/archives/libvir-list/2015-February/msg00871.html Once you create a bug, I can attach its number into the commit message. Michal From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39876) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQCOc-0002PZ-KW for qemu-devel@nongnu.org; Tue, 24 Feb 2015 05:07:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YQCOX-0003kE-PH for qemu-devel@nongnu.org; Tue, 24 Feb 2015 05:07:18 -0500 Received: from mailout25.mail01.mtsvc.net ([216.70.64.55]:53648 helo=n20.mail01.mtsvc.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQC5y-0001CR-CL for qemu-devel@nongnu.org; Tue, 24 Feb 2015 04:48:02 -0500 Content-Type: multipart/alternative; boundary="Apple-Mail=_6EFF04BA-C86D-4D2C-80DC-CAC10528D43E" Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) From: Alan Latteri In-Reply-To: <54EB11D2.2070905@redhat.com> Date: Tue, 24 Feb 2015 01:47:57 -0800 Message-Id: References: <54E65FDB.4050708@redhat.com> <874mqhav1a.fsf@blackfin.pond.sub.org> <9EA9323F-E450-430B-8722-2BF2D88BCE89@instinctual.tv> <87wq3d6iec.fsf@blackfin.pond.sub.org> <441401E2-780B-405B-8A22-0A933317D748@instinctual.tv> <874mqdue0n.fsf@blackfin.pond.sub.org> <54EB11D2.2070905@redhat.com> Subject: Re: [Qemu-devel] unable to set SATA serial with a spaces List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michal Privoznik Cc: John Snow , Markus Armbruster , qemu-devel@nongnu.org --Apple-Mail=_6EFF04BA-C86D-4D2C-80DC-CAC10528D43E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 Bug 1195660 has = been added to the database > On Feb 23, 2015, at 3:41 AM, Michal Privoznik = wrote: >=20 > On 23.02.2015 11:18, Markus Armbruster wrote: >> Alan Latteri writes: >>=20 >>> The left padding is important and necessary to keep for my = particular >>> application. This is broken in libvirt, but works fine with direct >>> Qemu invocation. >>>=20 >>> Thank you for the help.=20 >>=20 >> Please file a bug against libvirt, so this gets fixed. >>=20 >> = https://bugzilla.redhat.com/enter_bug.cgi?product=3DVirtualization%20Tools= &component=3Dlibvirt >> http://libvirt.org/bugs.html >>=20 >=20 > I've just proposed a patch for that: >=20 > = https://www.redhat.com/archives/libvir-list/2015-February/msg00871.html >=20 > Once you create a bug, I can attach its number into the commit = message. >=20 > Michal --Apple-Mail=_6EFF04BA-C86D-4D2C-80DC-CAC10528D43E Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=windows-1252
Bug = 1195660 has been added to the database

On Feb 23, 2015, at 3:41 AM, Michal Privoznik = <mprivozn@redhat.com> wrote:

On 23.02.2015 11:18, = Markus Armbruster wrote:
Alan Latteri <alan@instinctual.tv> writes:

The left padding is = important and necessary to keep for my particular
application.  This is broken in libvirt, but works fine = with direct
Qemu invocation.

Thank you for the help.

Please file a bug against libvirt, so this gets fixed.

https://bugzilla.redhat.com/enter_bug.cgi?product=3DVirtualizat= ion%20Tools&component=3Dlibvirt
http://libvirt.org/bugs.html


I've just proposed a patch for = that:

https://www.redhat.com/archives/libvir-list/2015-February/msg00= 871.html

Once you create a bug, I can = attach its number into the commit message.

Michal

= --Apple-Mail=_6EFF04BA-C86D-4D2C-80DC-CAC10528D43E--