[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v2 21/22] libxl: set correct nic type for HVM guests without a device model
If there's no device model running nic type is always LIBXL_NIC_TYPE_VIF. Signed-off-by: Roger Pau Monnà <roger.pau@xxxxxxxxxx> Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> Cc: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> Cc: Ian Campbell <ian.campbell@xxxxxxxxxx> Cc: Wei Liu <wei.liu2@xxxxxxxxxx> --- tools/libxl/libxl_create.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c index a00eda9..fb8b97b 100644 --- a/tools/libxl/libxl_create.c +++ b/tools/libxl/libxl_create.c @@ -955,6 +955,11 @@ static void initiate_domain_create(libxl__egc *egc, ret = libxl__device_nic_setdefault(gc, &d_config->nics[i], domid); if (ret) goto error_out; + /* HVM guests without a device model only have PV nics. */ + if (d_config->b_info.device_model_version == + LIBXL_DEVICE_MODEL_VERSION_NONE) + d_config->nics[i].nictype = LIBXL_NIC_TYPE_VIF; + if (d_config->nics[i].devid > last_devid) last_devid = d_config->nics[i].devid; } -- 1.9.5 (Apple Git-50.3) _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |