Re: [libvirt] KVM/qemu: problems with autostart of vms with non-bridged nets

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

 



On Mon, Dec 01, 2008 at 02:07:37AM +0100, Gerd von Egidy wrote:
> Hi,
> 
> > 2. missing virConnectPtr during autostart of the vm:
> >
> > in src/qemu_driver.c:145, qemudAutostartConfigs() you can find this call:
> > int ret = qemudStartVMDaemon(NULL, driver, vm, NULL);
> >
> > This means virConnectPtr conn is NULL within qemudStartVMDaemon().
> > Following the calls:
> > qemudStartVMDaemon()
> > -> qemudBuildCommandLine()
> > -> qemudNetworkIfaceConnect()
> > -> virNetworkLookupByName()
> >
> > virNetworkLookupByName bails out if called with invalid virConnectPtr. This
> > means starting this vm fails.
> 
> I came up with the attached patch to fix this for me, but
> a) I'm not sure if it is a clean use of the api to call virConnectOpen() from 
>    within a state-initializer function
> b) This is just for qemu/kvm, I haven't looked at any other drivers
> 
> It would be nice if an experienced libvirt-developer could take a look at
> this. Thank you very much.

Thanks for the bug report & patch. 

Did this patch actually make it work for you ?  AFAICT, there's a problem
even earlier, which is that we are doing autostart of the virtual machines, 
before autostart of the networks and storage pools, so I'm not sure that
this patch is sufficient.

Regards,
Daniel
-- 
|: 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 :|

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]