sin verbose

master
root 7 months ago
parent f8a45542ec
commit 8d36b6f03b

@ -31,5 +31,4 @@ init 0
- Probar que funciona en diferentes distros (Por ejeplo Debian 12, Ubuntu, ...)
- El menú no me termina de gustar, no tiene forma de ir atrás cuando entras a Run VM.
- Muestra vervbose por pantalla cuando se configura la VM. Eso tendría que ser algo desactivado y activable si se quiere debug.
. ...
. ...

14
q.py

@ -57,15 +57,13 @@ def createVms():
print("\nTamaño del disco en Gigas")
vmSize=input("\nSize: ")
os.system("qemu-img resize "+dirVmsImgs+"/"+vmName+".qcow2 "+vmSize+"G")
print("\nPassword de root")
#vmPasswd=input("\nPassword: ")
vmPasswd=getpass("\nPassword: ")
vmPasswd=getpass("\nroot password: ")
os.system("virt-customize -a "+dirVmsImgs+"/"+vmName+".qcow2 --root-password password:"+vmPasswd)
os.system("virt-customize -a "+dirVmsImgs+"/"+vmName+".qcow2 --hostname "+vmName)
os.system("virt-customize -a "+dirVmsImgs+"/"+vmName+".qcow2 --install dropbear")
os.system("virt-customize -a "+dirVmsImgs+"/"+vmName+".qcow2 --firstboot-command 'growpart /dev/sda 1'")
os.system("virt-customize -a "+dirVmsImgs+"/"+vmName+".qcow2 --firstboot-command 'resize2fs /dev/sda1'")
os.system("virt-customize -a "+dirVmsImgs+"/"+vmName+".qcow2 --root-password password:"+vmPasswd+" > /dev/null 2>&1")
os.system("virt-customize -a "+dirVmsImgs+"/"+vmName+".qcow2 --hostname "+vmName+" > /dev/null 2>&1")
os.system("virt-customize -a "+dirVmsImgs+"/"+vmName+".qcow2 --install dropbear > /dev/null 2>&1")
os.system("virt-customize -a "+dirVmsImgs+"/"+vmName+".qcow2 --firstboot-command 'growpart /dev/sda 1' > /dev/null 2>&1")
os.system("virt-customize -a "+dirVmsImgs+"/"+vmName+".qcow2 --firstboot-command 'resize2fs /dev/sda1' > /dev/null 2>&1")
choice()
def runVms():

Loading…
Cancel
Save