Move fake qcow2 image to appvm directory, fixes #10
This commit is contained in:
parent
fd224db22e
commit
20b9b42e03
2
appvm.go
2
appvm.go
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user