Hint: In the virsh version, I added a simple check at this point because virsh follows a REST-like model.  i.e. When using the <code>-c</code> option, it won't actually try to communicate to the remote libvirt unless there is a command.  This can lead to asynchronous problems where a command sent much later fails due to a connection problem that could have been detected earlier.  To make debugging easier, I put a simple check (i.e. list all VM's and throw away the result) inside <code>__init__</code> that causes it to fail if the connection is bad.  You may consider doing something similar here (assuming guestfish also follows a REST-full model) to help detect networking-related problems early.