search for: virdomaindestroy

Displaying 20 results from an estimated 27 matches for "virdomaindestroy".

2010 May 21
2
Better error codes when stopping a VM that is already stopped
Hi, Sometimes when stopping a virtual domain using virDomainDestroy(), I come across a domain that is already stopped. (For example when someone already stopped the domain manually using virsh or because the guest OS issued a shutdown.) This is a special case that I absolutely need to catch and handle. Unfortunately, when this happens, and I call virGetLastErro...
2017 Jul 31
1
libvirt virDomainDestroy
When stop a qemu vm via libvirt api, I call virDomainShutdown, I can seen the vm shutdown process, But I call virDomainDestroyFlags with VIR_DOMAIN_DESTROY_GRACEFULL ,I can't seen the vm shutdown process, virDomainDestroyFlags with VIR_DOMAIN_DESTROY_GRACEFULL is gave vm driver process a SIGTERM , how vm driver process SIGTERM signal (like qemu). Thanks
2016 Jan 19
2
[PATCH libguestfs v3] lib: Handle slow USB devices more gracefully.
Libvirt has a fixed 15 second timeout for qemu to exit. If qemu is writing to a slow USB key, it can hang (in D state) for much longer than this - many minutes usually. The solution is to check specifically for the libvirt EBUSY error when this happens, and retry the virDomainDestroyFlags operation (indefinitely). See also the description here: https://www.redhat.com/archives/libvir-list/2016-January/msg00767.html Similar to the following OpenStack Nova commit: http://git.openstack.org/cgit/openstack/nova/commit/?id=3907867 Thanks: Kashyap Chamarthy and Daniel Berrange. ---...
2016 Jan 19
0
Re: [PATCH libguestfs v3] lib: Handle slow USB devices more gracefully.
...> Libvirt has a fixed 15 second timeout for qemu to exit. If qemu is > writing to a slow USB key, it can hang (in D state) for much longer > than this - many minutes usually. > > The solution is to check specifically for the libvirt EBUSY error when > this happens, and retry the virDomainDestroyFlags operation > (indefinitely). > > See also the description here: > https://www.redhat.com/archives/libvir-list/2016-January/msg00767.html > > Similar to the following OpenStack Nova commit: > http://git.openstack.org/cgit/openstack/nova/commit/?id=3907867 > > Thanks...
2012 Jan 24
1
[Problem] C# virDomainShutdown
...t since 2 weeks now and there are still some issues im confronted with. I use libvirt in C# and I'm running a 32-bit machine on Windows 7. Actually my worst problem is, is that I'm not able to Shutdown on machine no matter which command I'm using. virDomainShutdown isn't working nor virDomainDestroy. Basically I use the virConnectOpenAuth example to make a test on this. You'll find a code-excerpt in the attachment. Everything else is working. Like Domain.GetName etc. - i just can't figure out the failure and I wanted to ask if the mistake is in the API since it's not tested on a 32...
2016 Jan 19
1
Re: [PATCH libguestfs v3] lib: Handle slow USB devices more gracefully.
...15 second timeout for qemu to exit. If qemu is > > writing to a slow USB key, it can hang (in D state) for much longer > > than this - many minutes usually. > > > > The solution is to check specifically for the libvirt EBUSY error when > > this happens, and retry the virDomainDestroyFlags operation > > (indefinitely). > > > > See also the description here: > > https://www.redhat.com/archives/libvir-list/2016-January/msg00767.html > > > > Similar to the following OpenStack Nova commit: > > http://git.openstack.org/cgit/openstack/nova/c...
2017 Jul 25
1
transient configure turn to persistent configure
libvirt version: 3.4.0 architecture: x86_64 ubuntu16.04-server hypervisor: kvm,qemu I call virDomainCreate create a transient vm, After a period of time ,I call virDomainDestroy, the vm configure is stil exist, the vm turn to persistent, I don't known the reason. Thanks
2012 Feb 22
1
Bug? virGetLastError() returns NULL after virDomainCreate() if Domain running already
...l, however, print an error to the console: libvir: QEMU error : Requested operation is not valid: domain is already running This looks like a bug to me, and I'm fairly certain that earlier version would return an error code of VIR_ERR_OPERATION_INVALID at that point. Or maybe that was just virDomainDestroy(), and I'm just blindly assuming that virDomainCreate() will work analogously... Anyway, no error code is bad, because I can't tell what happened. This is version 0.9.8. I couldn't find anything about this issue in the changelogs for 0.9.9 and 0.9.10, so I'm assuming the issue h...
2011 Dec 13
1
Thread-safety issues with vbox driver ?
...*arg) { virDomainPtr dom = (virDomainPtr)arg; char buf[VIR_UUID_STRING_BUFLEN]; virDomainGetUUIDString(dom, buf); if (virDomainCreate(dom) != 0) { printf("failed to start %s\n", buf); goto end; } printf("%s started\n", buf); if (virDomainDestroy(dom) != 0) { printf("failed to destroy %s\n", buf); } printf("%s destroyed\n", buf); end: virDomainFree(dom); pthread_exit(NULL); } int main(int argc, char **argv) { virConnectPtr conn = virConnectOpen("vbox:///session"); int i;...
2015 Apr 08
4
SIGTERM signal to qemu-kvm process
Hi I am using QEMU 0.12.1 as the hypervisor in my RHEL installation of 6.5. I wanted to know if there are any side-effects with respect to VM image corruption when i use SIGTERM signal to kill a qemu-kvm process which effectively stops my VM running on the host. Appreciate if you can provide me some valuable information in this regard. Thanks Jatin
2015 Apr 09
0
Re: SIGTERM signal to qemu-kvm process
...to kill a qemu-kvm process which > effectively stops my VM running on the host. It's equivalent to plugging the power cord from a computer. If you're using journaled FS, disks should be in consistent state, however you still may experience data loss. Moreover, I'd advice you to use virDomainDestroy() API (or 'virsh destroy'). Michal
2020 Jan 10
2
Re: [PATCH Fedora libguestfs] Don't depend on libvirt-daemon-kvm monolith.
...( virConnectNumOfDefinedDomains ( virConnectNumOfDomains ( 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 (...
2013 Dec 19
1
Re: About debugging of libvirt.
...11 0x00007fc32af20274 in libxlVmReap (driver=0x7fc338108930, vm=0x7fc32400f530, reason=VIR_DOMAIN_SHUTOFF_DESTROYED) at libxl/libxl_driver.c:338 #12 0x00007fc32af207de in libxlDomainDestroyFlags (dom=0x7fc3380e3770, flags=<optimized out>) at libxl/libxl_driver.c:1507 #13 0x00007fc33723cd37 in virDomainDestroy (domain=domain@entry=0x7fc3380e3770) at libvirt.c:2342 #14 0x00007fc337cb9ba4 in remoteDispatchDomainDestroy (args=<optimized out>, rerr=0x7fc32f67bcd0, client=0x7fc32400ee60, server=<optimized out>, msg=<optimized out>) at remote_dispatch.h:3165 #15 remoteDispatchDomainDestro...
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
2013 Dec 19
2
Re: About debugging of libvirt.
I am newbie to this gdb debugging. now i did the bt in the debugging. In my side still it showing the error. Following are the stacktrace which i got. Kindly refer the following logs for full information: **** [New Thread 0x7f8503695700 (LWP 20012)] Program received signal SIGSEGV, Segmentation fault. 0x0000000000000000 in ?? () (gdb) bt #0 0x0000000000000000 in ?? () #1 0x00007f84f671281e in
2012 Jul 21
8
[PATCH libguestfs 0/4] Add a libvirt backend to libguestfs.
This preliminary patch series adds a libvirt backend to libguestfs. It's for review only because although it launches the guest OK, there are some missing features that need to be implemented. The meat of the patch is in part 4/4. To save you the trouble of interpreting libxml2 fragments, an example of the generated XML and the corresponding qemu command line are attached below. Note the
2016 Aug 29
2
guestfs_launch gets stuck
...5 freq=0 passno=0 umount-all: /proc/mounts: fsname=/dev dir=/dev type=devtmpfs opts=rw,relatime,size=242000k,nr_inodes=60500,mode=755 freq=0 passno=0 umount-all: /proc/mounts: fsname=/dev/sda1 dir=/sysroot type=ext2 opts=rw,relatime freq=0 passno=0 umount /sysroot fsync /dev/sda libguestfs: calling virDomainDestroy "guestfs-aglq751pjoftyb6s" flags=VIR_DOMAIN_DESTROY_GRACEFUL libguestfs: closing guestfs handle 0x7f50db53e620 (state 0) libguestfs: command: run: rm libguestfs: command: run: \ -rf /tmp/libguestfsfJ31Qj ===== TEST FINISHED OK =====
2020 Jan 08
3
回复: bug report
...mmandrvf: stdout=n stderr=y flags=0x0 commandrvf: udevadm --debug settle -E /dev/sdb calling: settle commandrvf: stdout=n stderr=y flags=0x0 commandrvf: udevadm --debug settle -E /dev/sda calling: settle fsync /dev/sda guestfsd: =&gt; internal_autosync (0x11a) took 0.04 secs libguestfs: calling virDomainDestroy flags=VIR_DOMAIN_DESTROY_GRACEFUL libguestfs: closing guestfs handle 0x5616f24bc000 (state 0) libguestfs: command: run: rm libguestfs: command: run: \ -rf /tmp/libguestfs8AN8TK libguestfs: command: run: rm libguestfs: command: run: \ -rf /tmp/libguestfsn4dNLJ ===== TEST FINISHED OK =====...
2017 Dec 11
3
Libguestfs Hangs on CentOS 7.4
...,ptmxmode=000 freq=0 passno=0 umount-all: /proc/mounts: fsname=/dev/sda1 dir=/sysroot type=ext2 opts=rw,relatime freq=0 passno=0 commandrvf: stdout=n stderr=y flags=0x0 commandrvf: umount /sysroot fsync /dev/sda guestfsd: main_loop: proc 282 (internal_autosync) took 0.16 seconds libguestfs: calling virDomainDestroy flags=VIR_DOMAIN_DESTROY_GRACEFUL libguestfs: closing guestfs handle 0x55b252e51d30 (state 0) libguestfs: command: run: rm libguestfs: command: run: \ -rf /tmp/libguestfs0ZWR4R libguestfs: command: run: rm libguestfs: command: run: \ -rf /tmp/libguestfsRtBQ5s ===== TEST FINISHED OK =====
2020 Jan 03
2
bug report
Hi, &nbsp; &nbsp; I have use&nbsp; kvm ? virsh ? virt&nbsp; &nbsp;for almost half year ?all things goes well ? &nbsp; &nbsp; but recently? I use virt-copy-in&nbsp; found some problem ? I&nbsp; have&nbsp; &nbsp;do&nbsp; nothing&nbsp; with my server&nbsp; ?but the problem appear .&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;