Last active
July 23, 2019 03:19
-
-
Save z3nth10n/cf4f8f439e8058c2b5b60d83ce1ad3a9 to your computer and use it in GitHub Desktop.
Creates a new Debian from Internet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
name="debian-9.9.0-amd64-xfce-CD-1.iso" | |
mac=$(od -txC -An -N3 /dev/random|tr \ :) | |
cd /var/lib/vz/template/iso | |
wget https://cdimage.debian.org/mirror/cdimage/archive/9.9.0/amd64/iso-cd/$name | |
qm create 100 --cdrom nfs-iso:iso/$name --name debian-test -bootdisk scsi0 -scsi0 NVME:60,size=15G -scsihw virtio-scsi-pci --ostype l26 --memory 1024 -sockets 2 -cores 2 -cpu host -numa 1 -net0 virtio,bridge=vmbr0 | |
qm start 100 | |
echo -e "\e[VM created && started succesfully!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment