For "touch" you can use <code>os.utime()</code>, but I don't think that's what you want to do here.  For file creation use <code>open()</code>. It would be nice if "bad_disk" value is relative to the images directory.  So <code>os.path.join(test.virtdir, 'data', 'images', bad_disk)</code> or similar.  That will end up being (via symlinks) either <code>$HOME/virt_test/images/bad-disk-filename</code> or <code>/var/lib/virt_test/images/bad-disk-filename</code>, which is proper place for disk images.