basic working build script
This commit is contained in:
parent
7c818dd926
commit
c0f174f551
1 changed files with 19 additions and 0 deletions
19
build.py
19
build.py
|
@ -1,2 +1,21 @@
|
|||
from subprocess import Popen, PIPE
|
||||
import os
|
||||
|
||||
user = os.getlogin()
|
||||
image = f"/home/{user}/safe/debian.qcow2"
|
||||
|
||||
|
||||
initialize = [
|
||||
"qemu-system-x86_64",
|
||||
"-enable-kvm",
|
||||
"-m", "2G",
|
||||
"-nic", "user,hostfwd=tcp::5555-:22",
|
||||
"-drive", "file=%s,media=disk,if=virtio" % image,
|
||||
# "-display", "sdl",
|
||||
]
|
||||
|
||||
Popen(["cp", "/home/chopper/safe/debian.qcow2", f"/home/{user}/nnnnndebian.qcow2"]) #copy the base image to a directory with everyones virtual machines.
|
||||
Popen(initialize)
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue