diff --git a/src/mad/sh/scripts_common.sh b/src/mad/sh/scripts_common.sh index 5b5c2431de..2947a3c0e8 100644 --- a/src/mad/sh/scripts_common.sh +++ b/src/mad/sh/scripts_common.sh @@ -928,6 +928,7 @@ function get_disk_information { # * MODEL # * IP # * FILTER +# * VIRTIO_QUEUES # * VROUTER_IP # * INBOUND_AVG_BW # * INBOUND_PEAK_BW @@ -960,6 +961,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 \ @@ -979,6 +981,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 cbbf858b1e..73b20b7ad5 100644 --- a/src/vmm/LibVirtDriverKVM.cc +++ b/src/vmm/LibVirtDriverKVM.cc @@ -269,6 +269,7 @@ int LibVirtDriver::deployment_description_kvm( string ip = ""; string vrouter_ip = ""; string filter = ""; + string virtio_queues = ""; string i_avg_bw = ""; string i_peak_bw = ""; @@ -1026,14 +1027,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"); @@ -1102,6 +1104,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 6a5d23a241..d7fc1ef9f1 100755 --- a/src/vmm_mad/remotes/kvm/attach_nic +++ b/src/vmm_mad/remotes/kvm/attach_nic @@ -46,6 +46,10 @@ fi [ -n "${SCRIPT}" ] && DEVICE+="