Signed-off-by: Shradha Shah <sshah(a)solarflare.com>
---
src/qemu/qemu_command.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 93c018d..0f6b714 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -5030,6 +5030,20 @@ qemuBuildCommandLine(virConnectPtr conn,
* code here that adds the newly minted hostdev to the
* hostdevs array).
*/
+ if (qemuAssignDeviceHostdevAlias(def,
+ virDomainNetGetActualHostdev(net),
+ (def->nhostdevs-1)) < 0) {
+ qemuReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Could not assign alias to Net
Hostdev"));
+ goto error;
+ }
+
+ if (virDomainHostdevInsert(def,
+ virDomainNetGetActualHostdev(net)) < 0) {
+ qemuReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Hostdev not inserted into the array"));
+ goto error;
+ }
continue;
}
--
1.7.4.4