diff --git a/src/mad/sh/scripts_common.sh b/src/mad/sh/scripts_common.sh index 8fb659900c..2f3dcd1256 100644 --- a/src/mad/sh/scripts_common.sh +++ b/src/mad/sh/scripts_common.sh @@ -855,6 +855,7 @@ function get_disk_information { # * MODEL # * IP # * FILTER +# * VIRTIO_QUEUES # * VROUTER_IP # * INBOUND_AVG_BW # * INBOUND_PEAK_BW @@ -887,6 +888,7 @@ function get_nic_information { $NIC_XPATH/MODEL \ $NIC_XPATH/IP \ $NIC_XPATH/FILTER \ + $NIC_XPATH/VIRTIO_QUEUES \ $NIC_XPATH/VROUTER_IP \ $NIC_XPATH/INBOUND_AVG_BW \ $NIC_XPATH/INBOUND_PEAK_BW \ @@ -906,6 +908,7 @@ function get_nic_information { MODEL="${XPATH_ELEMENTS[j++]}" IP="${XPATH_ELEMENTS[j++]}" FILTER="${XPATH_ELEMENTS[j++]}" + VIRTIO_QUEUES="${XPATH_ELEMENTS[j++]}" VROUTER_IP="${XPATH_ELEMENTS[j++]}" INBOUND_AVG_BW="${XPATH_ELEMENTS[j++]}" INBOUND_PEAK_BW="${XPATH_ELEMENTS[j++]}" diff --git a/src/vmm/LibVirtDriverKVM.cc b/src/vmm/LibVirtDriverKVM.cc index bc3fdac50d..ecc5bd3dc6 100644 --- a/src/vmm/LibVirtDriverKVM.cc +++ b/src/vmm/LibVirtDriverKVM.cc @@ -174,6 +174,7 @@ int LibVirtDriver::deployment_description_kvm( string ip = ""; string vrouter_ip = ""; string filter = ""; + string virtio_queues = ""; string i_avg_bw = ""; string i_peak_bw = ""; @@ -902,14 +903,15 @@ int LibVirtDriver::deployment_description_kvm( for(int i=0; ivector_value("BRIDGE"); - vn_mad = nic[i]->vector_value("VN_MAD"); - mac = nic[i]->vector_value("MAC"); - target = nic[i]->vector_value("TARGET"); - script = nic[i]->vector_value("SCRIPT"); - model = nic[i]->vector_value("MODEL"); - ip = nic[i]->vector_value("IP"); - filter = nic[i]->vector_value("FILTER"); + bridge = nic[i]->vector_value("BRIDGE"); + vn_mad = nic[i]->vector_value("VN_MAD"); + mac = nic[i]->vector_value("MAC"); + target = nic[i]->vector_value("TARGET"); + script = nic[i]->vector_value("SCRIPT"); + model = nic[i]->vector_value("MODEL"); + ip = nic[i]->vector_value("IP"); + filter = nic[i]->vector_value("FILTER"); + virtio_queues = nic[i]->vector_value("VIRTIO_QUEUES"); vrouter_ip = nic[i]->vector_value("VROUTER_IP"); @@ -978,6 +980,13 @@ int LibVirtDriver::deployment_description_kvm( { file << "\t\t\t\n"; + + if(!virtio_queues.empty() && *the_model == "virtio") + { + file << "\t\t\t\n"; + } } if (!ip.empty() ) diff --git a/src/vmm_mad/remotes/kvm/attach_nic b/src/vmm_mad/remotes/kvm/attach_nic index 51bbc3cc54..8ff0cfe736 100755 --- a/src/vmm_mad/remotes/kvm/attach_nic +++ b/src/vmm_mad/remotes/kvm/attach_nic @@ -58,6 +58,10 @@ fi [ -n "${SCRIPT}" ] && DEVICE+="