hacks/ubuntu-makevm/2004/install.sh

21 lines
510 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="ubuntu2004"
#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-20 04:26:02 +00:00
--os-variant auto \
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" \
2020-02-20 04:26:02 +00:00
--location 'http://us.archive.ubuntu.com/ubuntu/dists/focal/main/installer-amd64/' \
2020-02-15 21:38:59 +00:00
--extra-args 'console=ttyS0,115200n8 serial'