]> xenbits.xensource.com Git - libvirt.git/commit
xenFormatNet: correct `type=netfront' to 'type=vif' to match libxl
authorChunyan Liu <cyliu@suse.com>
Tue, 17 May 2016 09:34:45 +0000 (17:34 +0800)
committerJim Fehlig <jfehlig@suse.com>
Tue, 17 May 2016 20:09:11 +0000 (14:09 -0600)
commit03f8bba26e24db9fbce32078f587ed6b8424ce8e
treef4e18c939d5e71c5bae44eeb3942e80fa655c49b
parentf1066d0d4637951110a903fd3229137d11ba2966
xenFormatNet: correct `type=netfront' to 'type=vif' to match libxl

According to current xl.cfg docs and xl codes, it uses type=vif
instead of type=netfront.

Currently after domxml-to-native, libvirt xml model=netfront will be
converted to xl type=netfront. This has no problem before, xen codes
for a long time just check type=ioemu, if not, set type to _VIF.

Since libxl uses parse_nic_config to avoid duplicate codes, it
compares 'type=vif' and 'type=ioemu' for valid parameters, others
are considered as invalid, thus we have problem with type=netfront
in xl config file.
 #xl create sles12gm-hvm.orig
 Parsing config from sles12gm-hvm.orig
 Invalid parameter `type'.

Correct the conversion in libvirt, so that it matchs libxl codes
and also xl.cfg.

Signed-off-by: Chunyan Liu <cyliu@suse.com>
src/xenconfig/xen_common.c
src/xenconfig/xen_common.h
src/xenconfig/xen_xl.c
src/xenconfig/xen_xm.c