diff --git a/devstack/tools/ironic/scripts/configure-vm.py b/devstack/tools/ironic/scripts/configure-vm.py index dee17b886f..18590279ae 100755 --- a/devstack/tools/ironic/scripts/configure-vm.py +++ b/devstack/tools/ironic/scripts/configure-vm.py @@ -91,6 +91,8 @@ def main(): help=('The absolute path of the non-volatile memory ' 'to store the UEFI variables. Should be used ' 'only when --uefi-loader is also specified.')) + parser.add_argument('--block-size', default='512', + help='The block size for the block storage.') args = parser.parse_args() env = jinja2.Environment(loader=jinja2.FileSystemLoader(templatedir)) @@ -117,6 +119,7 @@ def main(): 'disk_format': args.disk_format, 'uefi_loader': args.uefi_loader, 'uefi_nvram': args.uefi_nvram, + 'block_size': args.block_size, } if args.emulator: diff --git a/devstack/tools/ironic/scripts/create-node.sh b/devstack/tools/ironic/scripts/create-node.sh index 8530b846ff..5cca0ffc25 100755 --- a/devstack/tools/ironic/scripts/create-node.sh +++ b/devstack/tools/ironic/scripts/create-node.sh @@ -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:D:v:P:t:" arg; do +while getopts "n:c:i:m:M:d:a:b:e:E:p:o:f:l:L:N:A:D:v:P:t:B:" arg; do case $arg in n) NAME=$OPTARG;; c) CPU=$OPTARG;; @@ -37,6 +37,7 @@ while getopts "n:c:i:m:M:d:a:b:e:E:p:o:f:l:L:N:A:D:v:P:t:" arg; do v) VOLUME_COUNT=$OPTARG;; P) STORAGE_POOL=$OPTARG;; t) MACHINE_TYPE=$OPTARG;; + B) BLOCK_SIZE=$OPTARG;; esac done @@ -77,6 +78,8 @@ if [ ! -z "$UEFI_LOADER" ]; then fi fi +BLOCK_SIZE=${BLOCK_SIZE:-512} + # Create bridge and add VM interface to it. # Additional interface will be added to this bridge and # it will be plugged to OVS. @@ -129,7 +132,8 @@ if ! virsh list --all | grep -q $NAME; then --bootdev network --name $NAME \ --arch $ARCH --cpus $CPU --memory $MEM --libvirt-nic-driver $LIBVIRT_NIC_DRIVER \ --disk-format $DISK_FORMAT $VM_LOGGING --engine $ENGINE $UEFI_OPTS $vm_opts \ - --interface-count $INTERFACE_COUNT $MAC_ADDRESS --machine_type $MACHINE_TYPE >&2 + --interface-count $INTERFACE_COUNT $MAC_ADDRESS --machine_type $MACHINE_TYPE \ + --block-size $BLOCK_SIZE >&2 fi # echo mac in format mac1,ovs-node-0i1;mac2,ovs-node-0i2;...;macN,ovs-node0iN diff --git a/devstack/tools/ironic/templates/vm.xml b/devstack/tools/ironic/templates/vm.xml index bd36e9f360..f91b166b78 100644 --- a/devstack/tools/ironic/templates/vm.xml +++ b/devstack/tools/ironic/templates/vm.xml @@ -46,6 +46,7 @@ + {% endfor %} {% for n in range(1, interface_count+1) %}