diff --git a/q.py b/q.py index 678b6d3..6e9b1ca 100755 --- a/q.py +++ b/q.py @@ -5,6 +5,7 @@ import os import requests import shutil +from getpass import getpass dirVms=os.path.expanduser('~')+"/vms" dirVmsTemp=dirVms+"/templates" @@ -57,7 +58,9 @@ def createVms(): vmSize=input("\nSize: ") os.system("qemu-img resize "+dirVmsImgs+"/"+vmName+".qcow2 "+vmSize+"G") print("\nPassword de root") - vmPasswd=input("\nPassword: ") + #vmPasswd=input("\nPassword: ") + vmPasswd=getpass("\nPassword: ") + 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")