Displaying 9 results from an estimated 9 matches for "vir_domain_event_id_device_removed".
2020 Apr 13
2
what a correct use for virConnectDomainEventRegisterAny API, how to Obtain a stable expected result
HI, everyone:
My target deal with network hotplug use virDomainDetachDeviceFlags. Because when the API return ,the network maybe doesn’t remove from my vm guest os.
So I use virConnectDomainEventRegisterAny to register an event ID: VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED ,
my process as follow:
cb_para->call_id=virConnectDomainEventRegisterAny(cb_para->conn,cb_para->dom,VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED, VIR_DOMAIN_EVENT_CALLBACK(vnf_control_del_network_cb), cb_para, vnf_control_del_network_cb_free);
flags |= VIR_DOMAIN_AFFECT_CONFIG;
if (v...
2020 Apr 14
0
Re: what a correct use for virConnectDomainEventRegisterAny API, how to Obtain a stable expected result
...:38PM +0800, thomas.kuang wrote:
> HI, everyone:
>
>
> My target deal with network hotplug use virDomainDetachDeviceFlags. Because when the API return ,the network maybe doesn’t remove from my vm guest os.
>
> So I use virConnectDomainEventRegisterAny to register an event ID: VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED ,
>
> my process as follow:
>
> cb_para->call_id=virConnectDomainEventRegisterAny(cb_para->conn,cb_para->dom,VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED, VIR_DOMAIN_EVENT_CALLBACK(vnf_control_del_network_cb), cb_para, vnf_control_del_network_cb_free);
>
>
>
> flag...
2018 Oct 12
2
Device lease hot unplug and events
Hi, when working on hot unplugs of various devices, I've found out that
hot unplugging <lease> device doesn't generate
VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED event. <lease> also doesn't have an
alias, so it wouldn't be identifiable in the corresponding callback.
Is this difference from other hotpluggable devices intentional? If yes,
is there any better way of checking that <lease> removal is completed
than querying and examining t...
2018 Oct 15
2
Re: Device lease hot unplug and events
Peter Krempa <pkrempa@redhat.com> writes:
> On Fri, Oct 12, 2018 at 19:33:54 +0200, Milan Zamazal wrote:
>> Hi, when working on hot unplugs of various devices, I've found out that
>> hot unplugging <lease> device doesn't generate
>> VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED event. <lease> also doesn't have an
>> alias, so it wouldn't be identifiable in the corresponding callback.
>>
>> Is this difference from other hotpluggable devices intentional? If yes,
>
> Well a "lease" is not a device per-se. It's just libvi...
2018 Oct 15
0
Re: Device lease hot unplug and events
On Fri, Oct 12, 2018 at 19:33:54 +0200, Milan Zamazal wrote:
> Hi, when working on hot unplugs of various devices, I've found out that
> hot unplugging <lease> device doesn't generate
> VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED event. <lease> also doesn't have an
> alias, so it wouldn't be identifiable in the corresponding callback.
>
> Is this difference from other hotpluggable devices intentional? If yes,
Well a "lease" is not a device per-se. It's just libvirt putting it with
de...
2018 Oct 15
0
Re: Device lease hot unplug and events
...Peter Krempa <pkrempa@redhat.com> writes:
>
> > On Fri, Oct 12, 2018 at 19:33:54 +0200, Milan Zamazal wrote:
> >> Hi, when working on hot unplugs of various devices, I've found out that
> >> hot unplugging <lease> device doesn't generate
> >> VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED event. <lease> also doesn't have an
> >> alias, so it wouldn't be identifiable in the corresponding callback.
> >>
> >> Is this difference from other hotpluggable devices intentional? If yes,
> >
> > Well a "lease" is not a device pe...
2020 Apr 07
0
why virConnectDomainEventRegisterAny can't alway trigger the callback ,how can i get a stable callback ?
hi, all:
I create a vm with six nic, after the vm start, i delete tree nics.
all the three nic delete logic will happen in a thread , every nic delete has the following process:
int vnf_control_del_network(void *arg)
{
。。。。。
call_id = virConnectDomainEventRegisterAny(conn, dom, VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED, VIR_DOMAIN_EVENT_CALLBACK(vnf_control_del_network_cb), cb_para, vnf_control_del_network_cb_free);
flags |= VIR_DOMAIN_AFFECT_CONFIG;
if (virDomainIsActive(dom) == 1) {
flags |= VIR_DOMAIN_AFFECT_LIVE;
}
ret = virDomainDetachDeviceFlags(dom, xml, flags); // detach a nic from vm g...
2014 Dec 22
0
Device attach event
Hi all,
I'm trying to use libvirt events API, but I can't find what event is
fired when some device (disk in this case) got attached to the domain.
In the docs I see only VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED, but not
VIR_DOMAIN_EVENT_ID_DEVICE_ATTACHED. Is there some event for that?
BTW libxl driver implements only VIR_DOMAIN_EVENT_ID_LIFECYCLE, but that's
another story...
--
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally...
2020 Apr 07
0
when virEventAddTimeout trigger timeout ,should in the callback call virConnectDomainEventDeregisterAny ?
...er_id = info->cluster_id;
cb_para->group_id = info->group_id;
cb_para->vsys_id = info->vsysid;
cb_para->vnf_id = info->vnf_id;
cb_para->conn = conn;
cb_para->time_out = 20*1000;//20s
cb_para->call_id = virConnectDomainEventRegisterAny(conn, dom, VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED, VIR_DOMAIN_EVENT_CALLBACK(vnf_control_del_network_cb), cb_para, vnf_control_del_network_cb_free);
flags |= VIR_DOMAIN_AFFECT_CONFIG;
if (virDomainIsActive(dom) == 1) {
flags |= VIR_DOMAIN_AFFECT_LIVE;
}
cb_para->timer_id = virEventAddTimeout(cb_para->time_out, vnf_co...