qemu-devel
[Top][All Lists]
Advanced

[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 00:04:11 -0800

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 -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/test1.monitor,server,nowait -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 file=/var/lib/libvirt/images/372419e1-ca68-408f-b809-04ce54450e60-0.img,if=none,id=drive-sata0-0-0,format=qcow2,serial=            ABCD1234,cache=none -device ide-hd,bus=ahci0.0,drive=drive-sata0-0-0,id=sata0-0-0,bootindex=1

qemu-kvm: -drive file=/var/lib/libvirt/images/372419e1-ca68-408f-b809-04ce54450e60-0.img,if=none,id=drive-sata0-0-0,format=qcow2,serial=: 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.

Thanks,
Alan

On Feb 19, 2015, at 11:42 PM, Markus Armbruster <address@hidden> wrote:

John Snow <address@hidden> 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...

[...]


reply via email to

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