Re: [PATCH] virtio-blk: Set default serial id

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

 



On Wed, Mar 20, 2013 at 01:56:08PM +0800, Asias He wrote:
> If user does not specify a serial id, e.g.
> 
>    -device virtio-blk-pci,serial="serial_id"
> or
>    -drive serial="serial_id"
> 
> no serial id will be assigned.
> 
> Add a default serial id in this case to help identifying
> the disk in guest.
> 
> Signed-off-by: Asias He <asias@xxxxxxxxxx>
> ---
>  hw/virtio-blk.c | 7 +++++++
>  1 file changed, 7 insertions(+)

Autogenerated IDs have been proposed (for other devices?) before and I
think we should avoid them.

The serial in this patch depends on the internal counter we use for
savevm.  It is not a well-defined value that guests can depend on
remaining the same.

It can change between QEMU invocations - due to internal changes in QEMU
or because the management tool reordered -device options.

Users will be confused and their guests may stop working if they depend
on an ID like this.

The solution is to do persistent naming either by really passing -device
virtio-blk-pci,serial= or with udev inside the guest using the bus
address (PCI devfn) like the new persistent network interface naming for
Linux.

Stefan
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux