hacks/ubuntu-makevm/1804/install.sh

21 lines
514 B
Bash
Raw Normal View History

2020-02-15 21:38:59 +00:00
#!/bin/bash
2020-02-20 04:26:02 +00:00
VAR="ubuntu18.04"
#VAR="generic"
2020-02-16 18:30:21 +00:00
2020-02-15 21:38:59 +00:00
virt-install \
--name $VMNAME \
2020-02-20 04:26:02 +00:00
--cpu host \
2020-02-15 21:38:59 +00:00
--ram 32768 \
2020-02-20 04:26:02 +00:00
--disk path=$DISK_DIR/$VMNAME.qcow2,format=qcow2,size=1000,cache=writeback \
--vcpus 16 \
2020-02-15 21:38:59 +00:00
--os-type linux \
2020-02-16 18:30:21 +00:00
--os-variant "$VAR" \
2020-02-15 21:38:59 +00:00
--network bridge=virbr0 \
--graphics none \
--console pty,target_type=serial \
--initrd-inject=preseed.cfg --extra-args "ks=file:/preseed.cfg" \
--location 'http://us.archive.ubuntu.com/ubuntu/dists/bionic/main/installer-amd64/' \
--extra-args 'console=ttyS0,115200n8 serial'