[Libguestfs] virt-v2v become zombie via python cpopen on error

Shahar Havivi
Wed, 30 Mar 2016 09:19:35 -0000

Hi,

We encounter a problem in VDSM project that virt-v2v become zombie task while
importing vm from vmware.
When virt-v2v is in 'copy disk' mode and we someone deletes the vm at
vmware
the process hang in read() method,
I am pretty sure that its not virt-v2v problem because when I run it from the
shell virt-v2v exit with an error, still maybe someone have an idea....

I wrote a small python script that encounter the problem:

----------------------------------------------------------------------------
from cpopen import CPopen

env = {'LIBGUESTFS_BACKEND': 'direct'}
cmd = ['/usr/bin/virt-v2v', '-ic',
       'vpx://....', '-o',
       'local', '-os', '/tmp', '-of',
'raw', '-oa', 'sparse',
       '--password-file', '/tmp/passwd',
'--machine-readable', 'bbb']
p = CPopen(cmd, env=env)
while p.returncode is None:
    c = p.stdout.read(1)
    print c
----------------------------------------------------------------------------

Thanks,
  Shahar Havivi.