WIP:aryan/build #1

Closed
chopper wants to merge 4 commits from aryan/build into main
Showing only changes of commit c0f174f551 - Show all commits

View file

@ -1,2 +1,21 @@
from subprocess import Popen, PIPE
import os
user = os.getlogin()
image = f"/home/{user}/safe/debian.qcow2"
Review

Might be better to use Path.home() from pathlib. Probably just leave it in the home directory, since safe doesn't necessarily exist for new users

Might be better to use `Path.home()` from pathlib. Probably just leave it in the home directory, since safe doesn't necessarily exist for new users
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",
]
Outdated
Review

This list and the corresponding popen should be in a function that accepts an argument to toggle those nographic flags

This list and the corresponding popen should be in a function that accepts an argument to toggle those nographic flags
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)