Move fake qcow2 image to appvm directory, fixes #10

This commit is contained in:
Mikhail Klementev 2019-03-07 11:57:06 +00:00
parent fd224db22e
commit 20b9b42e03

View file

@ -206,7 +206,7 @@ func generateVM(name string, verbose bool) (realpath, reginfo, qcow2 string, err
syscall.Unlink("result") syscall.Unlink("result")
qcow2 = "/tmp/.appvm.fake.qcow2" qcow2 = os.Getenv("HOME") + "/appvm/.fake.qcow2"
if _, err = os.Stat(qcow2); os.IsNotExist(err) { if _, err = os.Stat(qcow2); os.IsNotExist(err) {
system.System("qemu-img", "create", "-f", "qcow2", qcow2, "512M") system.System("qemu-img", "create", "-f", "qcow2", qcow2, "512M")
err = os.Chmod(qcow2, 0400) // qemu run with -snapshot, we only need it for create /dev/vda err = os.Chmod(qcow2, 0400) // qemu run with -snapshot, we only need it for create /dev/vda