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

Re: [libvirt] dynamic scsi disk attach seems to be broken in qemu(-kvm)-0.11, libvirt-0.7.1

On Thu, Oct 08, 2009 at 10:57:55PM -0500, Dustin Kirkland wrote:
> Now, all of that said, it is actually possible to hot-add a second
> scsi device. However, as far as I can tell, this method is not yet
> supported by libvirt.  It looks to me that with modern qemu, you have
> to do it this way:
> Drop to a qemu console with ctrl-alt-2. Get the address of the current scsi bus:
>   (qemu) info pci
>   Look for "SCSI Controller". In my case, it's on Bus 0, device 4, function 0
> Now instead of pci_add, use drive_add
>   (qemu) drive_add 0:4 file=/tmp/foo,if=scsi
>   OK bus 0, unit 1

That is correct - the SCSI driver hotplug in libvirt is not implemented
in the right way. If you specify multiple SCSI devices at boot, they
all get on one controller, if you hotplug multiple SCSI devices, we're
hotplugging a new SCSI controller per disk. This is clearly not good,
because when you then reboot, all those controllers are merged back into

There is a guy who is working on implementing the correct SCSI hotplug
approach for libvirt, that is still work in progress though. The most
recent patches were here:


We will ultimately support hotplug of both drives, and drive controllers
independantly, giving apps/users the flexibility they need.

> I would like some advice on how to proceed with this bug, and where
> the solution lies...in qemu or in libvirt.  Ultimately, I would like
> the behavior we had in our previous release with kvm-84 and
> libvirt-0.6.1, where we could dynamically add scsi devices without a
> problem, using:
>   pci_add 1 storage file=/tmp/foo,if=scsi
> Can anyone else reproduce this?  Is this considered a regression by
> anyone else?  Where should I look to solve this, in libvirt, or in
> qemu?

Independently of what I said about libvirt not implementing SCSI hotplug
with the right apporoach, the pci-add stuff should definitely work,  so 
if it doesn't then this is a regression that needs to be fixed

|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

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