Optional Suggestion:  We really prefer using native-python instead of calling out to the shell.  However, since this is only done once in the test we can let it slide.

Though my suggestion is more related to performance:  Disk images don't have to be complete files, they can be sparse files.  Creating a sparse file is <b><i>much</i></b> faster that writing out 512Mb of zeros, and probably faster than using utils.run() also.  

All you have to do is make a new file (or truncate an old one).  Then file.seek() out one-byte less than the size you want (so (512 * 1024 * 1024) - 1) and write a single zero-byte there.  This will complete nearly instantly since the code is literally writing a single byte, vs 512MB of bytes.  e.g.
    <p><code>
    f = open('/tmp/foobar', 'wb')
    f.seek((512 * 1024 * 1024) - 1)
    f.write(str(0))
    f.close()
    </code></p>