diff --git a/nova/templates/bin/_nova-compute-init.sh.tpl b/nova/templates/bin/_nova-compute-init.sh.tpl index 2dccfb4c29..b1e7cb505a 100644 --- a/nova/templates/bin/_nova-compute-init.sh.tpl +++ b/nova/templates/bin/_nova-compute-init.sh.tpl @@ -27,7 +27,7 @@ chown ${NOVA_USER_UID} /var/lib/nova /var/lib/nova/instances migration_interface="{{- .Values.conf.libvirt.live_migration_interface -}}" if [[ -n $migration_interface ]]; then # determine ip dynamically based on interface provided - migration_address=$(ip r | grep $migration_interface | grep -v default | awk '{print $9}') + migration_address=$(ip a s $migration_interface | grep 'inet ' | awk '{print $2}' | awk -F "/" '{print $1}') fi touch /tmp/pod-shared/nova-libvirt.conf