parallels: don't fill net adapter model for containers

Network adapter model has no sense for container,
so we shouldn't set it to e1000 in
parallelsDomainDeviceDefPostParse.

Signed-off-by: Dmitry Guryanov <dguryanov@parallels.com>
This commit is contained in:
Dmitry Guryanov 2015-04-07 23:35:06 +03:00 committed by Michal Privoznik
parent 6a06b467f5
commit b16868a135

View File

@ -174,7 +174,7 @@ parallelsDomainDefPostParse(virDomainDefPtr def,
static int
parallelsDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
const virDomainDef *def ATTRIBUTE_UNUSED,
const virDomainDef *def,
virCapsPtr caps ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
{
@ -184,6 +184,7 @@ parallelsDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
(dev->data.net->type == VIR_DOMAIN_NET_TYPE_NETWORK ||
dev->data.net->type == VIR_DOMAIN_NET_TYPE_BRIDGE) &&
!dev->data.net->model &&
STREQ(def->os.type, "hvm") &&
VIR_STRDUP(dev->data.net->model, "e1000") < 0)
goto cleanup;