Add support for direct boot from Debian installer repository
This commit is contained in:
parent
55791a8c26
commit
501c5134d4
3
add-vm
3
add-vm
|
@ -37,6 +37,8 @@ disks="${disks:-}"
|
||||||
bridgeName="${bridgeName:-br0}"
|
bridgeName="${bridgeName:-br0}"
|
||||||
doDryRun=${doDryRun:-false}
|
doDryRun=${doDryRun:-false}
|
||||||
isoImagePath="${isoImagePath:-}"
|
isoImagePath="${isoImagePath:-}"
|
||||||
|
debianVersion="${debianAuto:-stable}"
|
||||||
|
preseedURL="${preseedURL:-}"
|
||||||
|
|
||||||
export DIALOGOUT=$(mktemp --tmpdir=/tmp addvm.XXX)
|
export DIALOGOUT=$(mktemp --tmpdir=/tmp addvm.XXX)
|
||||||
# TODO: How to replace _ with a space??
|
# TODO: How to replace _ with a space??
|
||||||
|
@ -200,6 +202,7 @@ fi
|
||||||
virtHome=""
|
virtHome=""
|
||||||
[ "$volhomeDisk" != "none" ] && virtHome="--disk path=/dev/drbd/by-disk/${volhomeDisk}/${vmName}_home,bus=virtio,io=threads,cache=none,format=raw"
|
[ "$volhomeDisk" != "none" ] && virtHome="--disk path=/dev/drbd/by-disk/${volhomeDisk}/${vmName}_home,bus=virtio,io=threads,cache=none,format=raw"
|
||||||
bootMode="--pxe"
|
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"
|
[ -f "$isoImagePath" ] && bootMode="--cdrom=$isoImagePath"
|
||||||
|
|
||||||
dryRun virt-install --connect=qemu:///system \
|
dryRun virt-install --connect=qemu:///system \
|
||||||
|
|
Loading…
Reference in a new issue