Eek! Shelling out is okay once or twice, but lmr doesn't want it used excessively: https://github.com/autotest/autotest/wiki/TestCodingStyle

You could easily leverage the <code>re</code> module and regular python IO for many of these operations. Also, since they're VM-instance specific, It may be worthwhile to just add them to the libvirt_vm class, what do you think?