[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] unable to set SATA serial with a spaces

From: Alan Latteri
Subject: Re: [Qemu-devel] unable to set SATA serial with a spaces
Date: Fri, 20 Feb 2015 19:40:33 -0800

 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. 

On Feb 20, 2015, at 1:28 AM, Markus Armbruster <address@hidden> wrote:

Alan Latteri <address@hidden> writes:

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

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

data[96]=["\0\200\0\024ABCD1234            \0\0\0\0\0\0\0\0"…]

The spaces matter here.

I tried setting the spaces manually running QEMU from the command
line, but that doesn’t work.

address@hidden ~]# /usr/libexec/qemu-kvm -name test1 -S -machine
rhel6.0.0,accel=kvm,usb=off -m 1024 -realtime mlock=off -smp
1,sockets=1,cores=1,threads=1 -uuid
372419e1-ca68-408f-b809-04ce54450e60 -no-user-config -nodefaults
-mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc
-no-shutdown -boot strict=on -device
piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device
ahci,id=ahci0,bus=pci.0,addr=0xd -drive
ABCD1234,cache=none -device

qemu-kvm: -drive
could not open disk image ABCD1234,cache=none: 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=none,id=drv0,file=tmp.qcow2,serial='            ABCD1234' -device ide-hd,drive=drv0 | grep serial
           serial = "            ABCD1234"

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

   -drive if=none,id=drv0,file=tmp.qcow2
   -device ide-hd,drive=drv0,serial='            ABCD1234'

reply via email to

[Prev in Thread] Current Thread [Next in Thread]