Added image creation for qcow2
Moved image creation into when block