I have a very specific problem. Using paramiko client i am deleting a VM sitting in the VM. It does it task but after deletion i want to come out of the VM to the host server. But its hanging for about 2-3 minutes and

Write failed: Broken pipe

The command which i am using is :

cmd1 = "virsh destroy {0} && virsh undefine {0} && rm -rf /root/ubuntu_vm/{0} && exit".format(vm)
stdin, stdout, stderr = ssh.exec_command(cmd1)
outlines = stdout.readlines()
resp = ''.join(outlines)
print resp

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.