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]

 



Hi Daniel,

thanks for looking into this.

> +    virConnectPtr conn = virConnectOpen(getuid() ?
> +                                        "qemu:///session" :
> +                                        "qemu:///system");
> +
> +    if (!conn) {
> +        qemudLog(QEMUD_ERR, "%s",
> +                 _("Cannot autostart domains, failed to open
> connection")); +        return;
> +    }

I thought about that check too, but decided against it, because

a) currently we always call it with conn=NULL, it only fails if you don't use 
a directly bridged network

b) it currently won't do any harm calling with conn=NULL, creating the vm 
fails later on because it can't find the network device.

But if some code relying on the conn-structure is added later on without 
sanity-checks, this check will make sure no bigger harm is done.

Kind regards,

Gerd

-- 
Address (better: trap) for people I really don't want to get mail from:
james@xxxxxxxxxxxxxxxxx

--
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]