[please don't top-post on technical lists]
On 04/09/2013 03:19 PM, Daniele Testa wrote:
Hi,
Actually, the serial is not there :)
Works for me, but that's a new qemu, new libvirt and new fedora guest,
see below.
Btw, as you can see in the XML, libvirt and/or KVM is completely
ignoring
my target="vdb" and attaches the drive to "/dev/vdi" inside the
virtual
server.
Yes, this is an issue, but we do state in the documentation that the
target attribute is just a hint as to where to plug the disk and we
currently cannot guarantee the disk name precisely.
(root@h2)-(/)# virsh --version
0.7.5
This version is very old and even though the serial element is
supported, ...
(root@h2)-(/)# kvm --version
QEMU PC emulator version 0.12.3 (qemu-kvm-0.12.3), Copyright (c) 2003-2008
Fabrice Bellard
... it might not be for such old qemu.
The log-file only shows the command used to start the virtual server.
It
does not contain any of the commands I used to attache the additional disk.
And that command would help identify whether we start qemu with the
serial parameter (which I doubt with such old implementation) or not.
Regards,
Daniele
2013/4/9 Martin Kletzander <mkletzan(a)redhat.com>
> On 04/08/2013 11:58 PM, Daniele Testa wrote:
>> Hi,
>>
>> I am adding a disk to my KVM virtual server, but for some reason it
> refuses
>> to honor the <address>
>>
>> I have tried the following 3:
>>
>> <disk type='block' device='disk'>
>> <driver name='phy' type='raw'/>
>> <source dev='/dev/nbd2'/>
>> <target dev='vdb' bus='virtio'/>
>> <serial>my-fake-serial</serial>
>> <address type='drive' controller='0' bus='1'
target='3' unit='2'/>
>> </disk>
>>
>>
>> <disk type='block' device='disk'>
>> <driver name='phy' type='raw'/>
>> <source dev='/dev/nbd2'/>
>> <target dev='vdb' bus='virtio'/>
>> <serial>my-fake-serial</serial>
>> <address type='pci' bus='0x00' slot='0x08'
function='0x0'/>
>> </disk>
>>
>>
>> <disk type='block' device='disk'>
>> <driver name='phy' type='raw'/>
>> <source dev='/dev/nbd2'/>
>> <target dev='vdb' bus='virtio'/>
>> <serial>my-fake-serial</serial>
>> <address type='virtio-serial' controller='0'
bus='0' port='8'/>
>> </disk>
>>
>> I would assume the last one is the one to use, as I am using a
"virtio"
>> bus. However, the <address> attribute is simply ignored and the disk is
>> always attached as this:
>>
>> pci-0000:00:05.0
>>
>> Further, how do I read the "my-fake-serial" from within the virtual
> machine?
>>
>
> The serial for vdb for example is in /sys/class/block/vdb/serial
>
> I know I haven't helped with the addresses, don't know much about that,
> but try attaching your libvirt version and the log of
> /var/log/libvirt/qemu/<machine_name>.log.
> I'll see when I'll get to you. Maybe somebody will found out in the
> meantime. If not, feel free to create a bug for this.
>
> Martin
>
_______________________________________________
libvirt-users mailing list
libvirt-users(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users