Allow customizing libvirt NIC driver
This value will be used for creating virtual baremetal machines in the devstack plugin. Story: 2002079 Task: 19747 Change-Id: I69fbbadb8fdbb110d6e32013a4835e193f30c93d
This commit is contained in:
parent
ab6411fc94
commit
be1b6a341f
@ -1609,6 +1609,10 @@ function create_bridge_and_vms {
|
||||
vm_opts+=" -L $UEFI_LOADER_PATH -N $UEFI_NVRAM_PATH"
|
||||
fi
|
||||
|
||||
if [[ -n "$LIBVIRT_NIC_DRIVER" ]]; then
|
||||
vm_opts+=" -D $LIBVIRT_NIC_DRIVER"
|
||||
fi
|
||||
|
||||
local bridge_mac
|
||||
bridge_mac=$(ip link show dev $IRONIC_VM_NETWORK_BRIDGE | grep -Eo "ether [A-Za-z0-9:]+"|sed "s/ether\ //")
|
||||
|
||||
|
@ -12,7 +12,7 @@ export PS4='+ ${BASH_SOURCE:-}:${FUNCNAME[0]:-}:L${LINENO:-}: '
|
||||
# Keep track of the DevStack directory
|
||||
TOP_DIR=$(cd $(dirname "$0")/.. && pwd)
|
||||
|
||||
while getopts "n:c:i:m:M:d:a:b:e:E:p:o:f:l:L:N:A:" arg; do
|
||||
while getopts "n:c:i:m:M:d:a:b:e:E:p:o:f:l:L:N:A:D:" arg; do
|
||||
case $arg in
|
||||
n) NAME=$OPTARG;;
|
||||
c) CPU=$OPTARG;;
|
||||
@ -33,6 +33,7 @@ while getopts "n:c:i:m:M:d:a:b:e:E:p:o:f:l:L:N:A:" arg; do
|
||||
L) UEFI_LOADER=$OPTARG;;
|
||||
N) UEFI_NVRAM=$OPTARG;;
|
||||
A) MAC_ADDRESS=$OPTARG;;
|
||||
D) NIC_DRIVER=$OPTARG;;
|
||||
esac
|
||||
done
|
||||
|
||||
@ -43,7 +44,7 @@ if [ -z "$UEFI_LOADER" ] && [ ! -z "$UEFI_NVRAM" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
LIBVIRT_NIC_DRIVER=${LIBVIRT_NIC_DRIVER:-"virtio"}
|
||||
LIBVIRT_NIC_DRIVER=${NIC_DRIVER:-"virtio"}
|
||||
LIBVIRT_STORAGE_POOL=${LIBVIRT_STORAGE_POOL:-"default"}
|
||||
LIBVIRT_CONNECT_URI=${LIBVIRT_CONNECT_URI:-"qemu:///system"}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user