[libvirt] [PATCH v2 1/2] qemu: make attaching disk partition to VM illegal

Pavel Mores pmores at redhat.com
Wed Oct 2 12:55:28 UTC 2019


On Wed, Oct 02, 2019 at 02:04:28PM +0200, Michal Privoznik wrote:
> On 10/2/19 1:11 PM, Daniel P. Berrangé wrote:
> > On Wed, Oct 02, 2019 at 10:45:28AM +0200, Michal Privoznik wrote:
> > > On 9/30/19 3:41 PM, Pavel Mores wrote:
> > > > The way in which the qemu driver generates aliases for disks involves
> > > > ignoring the partition number part of a target dev name.  This means that
> > > > all partitions of a block device and the device itself all end up with the
> > > > same alias.  If multiple such disks are specified in XML, the resulting
> > > > name clash makes qemu invocation fail.
> > > > 
> > > > Since attaching partitions to qemu VMs doesn't seem to make much sense
> > > > anyway, disallow partitions in target specifications altogether.
> > > > 
> > > > https://bugzilla.redhat.com/show_bug.cgi?id=1346265
> > > > 
> > > > Signed-off-by: Pavel Mores <pmores at redhat.com>
> > > > ---
> > > >    src/qemu/qemu_domain.c                        | 15 +++++++++++
> > > >    .../disk-attaching-partition-nosupport.xml    | 27 +++++++++++++++++++
> > > >    tests/qemuxml2argvtest.c                      |  1 +
> > > >    3 files changed, 43 insertions(+)
> > > >    create mode 100644 tests/qemuxml2argvdata/disk-attaching-partition-nosupport.xml
> > > > 
> 
> > 
> > I think it is fine for freeze, so go ahead with your proposed fix.
> > 
> 
> Thanks, I've made the change and pushed these.
> 
> Congratulations Pavel on your first libvirt contribution!

Cheers, and apologies for the additional work you had with it. :-)

	pvl




More information about the libvir-list mailing list