search for: virdomaindetachdeviceflags

Displaying 11 results from an estimated 11 matches for "virdomaindetachdeviceflags".

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->do...
2015 Aug 23
1
Detaching device behaviour
Hi all. In libvirt documentation it is written that virDomainDetachDeviceFlags is an asynchronous call: http://libvirt.org/html/libvirt-libvirt-domain.html#virDomainDetachDeviceFlags Does that mean that also virDomainDetachDevice is asynchronous? the reasons mentioned in the above seems relevant for this one as well. Thanks!
2020 Apr 14
0
Re: what a correct use for virConnectDomainEventRegisterAny API, how to Obtain a stable expected result
On Mon, Apr 13, 2020 at 05:32: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(c...
2010 May 31
1
Qemu driver not supporting VIR_DOMAIN_DEVICE_MODIFY_CONFIG yet?
Hi, According to the docs on http://libvirt.org/html/libvirt-libvirt.html#virDomainDetachDeviceFlags I ought to be able to do virDomainDetachDeviceFlags( <domain>, <devicexml>, VIR_DOMAIN_DEVICE_MODIFY_LIVE | VIR_DOMAIN_DEVICE_MODIFY_CONFIG); to detach a volume both from a currently running VM instance and permanently from the defined config file. If I actually try that, though,...
2020 Apr 07
0
when virEventAddTimeout trigger timeout ,should in the callback call virConnectDomainEventDeregisterAny ?
hi, all I do a hotplug detach a network in a thread, because virDomainDetachDeviceFlags maybe asynchronous, so I do like follow: cb_para->cluster_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_...
2019 Aug 02
2
Re: Detach disk from VM - virsh (working) vs. PHP (not working)
Thank you for your help! 1, i used vda as install disk and vdb as target disk, because i boot from the first. After setup boot order flag i was able change install disk to vdb and target disk to vda. With this configuration when i boot from vdb i can install OS with grub and after it redefine XML without vdb without problem. Thanks a lot. 2, maybe i have something wrong, but still not working:
2019 Aug 03
0
Re: Detach disk from VM - virsh (working) vs. PHP (not working)
...when i boot from vdb i can install OS with grub and after it redefine XML without vdb without problem. Thanks a lot. > > 2, maybe i have something wrong, but still not working: > > Now in libvirt log i got error: device not found: no target device vdb Ah, of coure. I overlooked that virDomainDetachDeviceFlags() is called with VIR_DOMAIN_AFFECT_CONFIG, which means that live configuration is not affected and if the disk you're trying to detach exists only in live XML then the API fails. The same problem was found in libvirt_domain_disk_add, libvirt_domain_nic_add and libvirt_domain_nic_remove. I'...
2020 Apr 07
0
why virConnectDomainEventRegisterAny can't alway trigger the callback ,how can i get a stable callback ?
...ctDomainEventRegisterAny(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 guest os 。。。。 } void vnf_control_del_network_cb(virConnectPtr conn, virDomainPtr dom, const char *dev,void * opaque) //this callback can't already trigger to run ,why ? { struct vnf_del_netwk_opaque * arg = (struct vnf_del_netwk_opaque...
2020 Jan 10
2
Re: [PATCH Fedora libguestfs] Don't depend on libvirt-daemon-kvm monolith.
...tNumOfDomains ( virConnectOpen ( virConnectOpenAuth ( virConnectOpenReadOnly ( virConnectRef( virConnectSetKeepAlive( virConnResetLastError ( virConnSetErrorFunc ( virDomainAttachDeviceFlags ( virDomainBlockPeek ( virDomainBlockStats ( virDomainCreateXML ( virDomainDestroy ( virDomainDestroyFlags ( virDomainDetachDeviceFlags ( virDomainFree ( virDomainGetConnect ( virDomainGetCPUStats( virDomainGetID ( virDomainGetInfo ( virDomainGetMaxMemory ( virDomainGetName ( virDomainGetSchedulerParameters ( virDomainGetSchedulerType ( virDomainGetUUID ( virDomainGetUUIDString ( virDomainGetVcpus ( virDomainGetXMLDesc ( virDomainI...
2020 Jan 10
5
[PATCH Fedora libguestfs] Don't depend on libvirt-daemon-kvm monolith.
libguestfs usually needs qemu. However it only requires an emulator for the same architecture, not for all architectures. libvirt-daemon-kvm pulls in qemu which pulls in emulators for all architectures, as well as a bunch of other stuff we don't need at all like network interface support and nwfilter. There are no Fedora TCG-only arches, so drop the conditional section. I also made support
2012 Oct 08
5
[PATCH v4 0/5] Finish hotplugging support.
This rounds off hotplugging support by allowing you to add and remove drives at any stage (before and after launch). Rich.