Try executing with strace strace -f -o /tmp/trace.txt virt-install --connect=qemu:///system ...
On Sat, Oct 13, 2012 at 1:08 PM, Peter Steele <[email protected]> wrote: > I have a Python application that I use to create KVM based VMs > programmatically. When I run the program interactively (from a command > line), everything works fine. However, when I run it through supervisord, > things do work as expected. > > The code I use in my Python program to launch virt-install is > straightforward: > > cmd = 'virt-install --connect=qemu:///system --name "vmtest" ...' > cmd = shlex.split(cmd) > process = subprocess.Popen(cmd, stdout=subprocess.PIPE, > stderr=subprocess.STDOUT) > > After calling Popen, my Python code monitors the process waiting for it to > exit. The virt-install program that I'm running here via Popen is itself a > Python program, not that it really matters. When it runs properly, it ends > up spawning two processes in addition to the main virt-install process. A > ps list usually looks something like this: > > root 21968 0.3 0.1 300816 20996 pts/3 S+ 10:57 0:00 > /usr/bin/python -tt /usr/sbin/virt-install ... > qemu 22018 9.0 5.2 4477800 860856 ? Sl 10:57 0:16 > /usr/libexec/qemu-kvm -S -M rhel6.3.0 ... > root 22041 0.0 0.0 310184 5712 pts/3 Sl+ 10:57 0:00 > /usr/bin/virsh --connect qemu:///system console 33 > > The VM creation process is designed to run unattended, and like I said > when I run my Python app manually everything works fine. However, when I > run it through supervisord, the virsh process exits for some reason, and > then the main virt-install process terminates, but curiously the qemu-kvm > process continues. > > I have been unable to determine why this is happening. Can anyone offer > any suggestions what might be going on? > > > _______________________________________________ > Supervisor-users mailing list > [email protected] > http://lists.supervisord.org/mailman/listinfo/supervisor-users > >
_______________________________________________ Supervisor-users mailing list [email protected] http://lists.supervisord.org/mailman/listinfo/supervisor-users
