Add support for direct boot from Debian installer repository
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build encountered an error Details

This commit is contained in:
Victor LABORIE 2019-05-28 16:43:22 +02:00
parent 55791a8c26
commit 501c5134d4
1 changed files with 3 additions and 0 deletions

3
add-vm
View File

@ -37,6 +37,8 @@ disks="${disks:-}"
bridgeName="${bridgeName:-br0}"
doDryRun=${doDryRun:-false}
isoImagePath="${isoImagePath:-}"
debianVersion="${debianAuto:-stable}"
preseedURL="${preseedURL:-}"
export DIALOGOUT=$(mktemp --tmpdir=/tmp addvm.XXX)
# TODO: How to replace _ with a space??
@ -200,6 +202,7 @@ fi
virtHome=""
[ "$volhomeDisk" != "none" ] && virtHome="--disk path=/dev/drbd/by-disk/${volhomeDisk}/${vmName}_home,bus=virtio,io=threads,cache=none,format=raw"
bootMode="--pxe"
[ -n "${preseedURL}" ] && bootMode="--location https://deb.debian.org/debian/dists/${debianVersion}/main/installer-amd64/ --extra-args \"auto=true priority=critical url=${preseedURL} hostname=${vmName}\""
[ -f "$isoImagePath" ] && bootMode="--cdrom=$isoImagePath"
dryRun virt-install --connect=qemu:///system \