Support multiple NICs on HVMs
[invirt/packages/invirt-xen-config.git] / qemu-ifup.invirt
index d50b412..588bb92 100755 (executable)
@@ -8,9 +8,10 @@ if [ -z "$domid" ]; then
 fi
 
 dev=$1
 fi
 
 dev=$1
+ifnum=${1##*.}
 qemu_online=yes
 qemu_online=yes
-XENBUS_PATH=/local/domain/0/backend/vif/${domid}/0
-vif=vif${domid}.0
+XENBUS_PATH=/local/domain/0/backend/vif/${domid}/${ifnum}
+vif=vif${domid}.${ifnum}
 export vif qemu_online XENBUS_PATH dev 
 
 exec /etc/xen/scripts/vif-invirtroute online
 export vif qemu_online XENBUS_PATH dev 
 
 exec /etc/xen/scripts/vif-invirtroute online