[libvirt] [PATCH 0/4] vmx: allow more than 4 NICs (RHBZ#1560917)

Hi, the VMX parser, used in the esx driver, has currently hardcoded 4 NICs possible, ignoring extra more than that. The following series removes this limitation, allowing to parse all the 10 NICs in the VMX of RHBZ#1560917. Thanks, Pino Toscano (4): vmx: check for present/enabled devices earlier vmx: allocate space for network interfaces if needed internal: add STRCASEPREFIX vmx: convert any amount of NICs src/internal.h | 1 + src/vmx/vmx.c | 150 +++++++++++----------- tests/vmx2xmldata/vmx2xml-esx-in-the-wild-8.vmx | 163 ++++++++++++++++++++++++ tests/vmx2xmldata/vmx2xml-esx-in-the-wild-8.xml | 89 +++++++++++++ tests/vmx2xmltest.c | 1 + 5 files changed, 325 insertions(+), 79 deletions(-) create mode 100644 tests/vmx2xmldata/vmx2xml-esx-in-the-wild-8.vmx create mode 100644 tests/vmx2xmldata/vmx2xml-esx-in-the-wild-8.xml -- 2.14.3

When parsing filesystems, network interfaces, serial ports, and parallel ports, check earlier whether they are present/enabled, delaying the allocation of the objects. This is mostly a small optimization, with no behaviour change. Signed-off-by: Pino Toscano <ptoscano@redhat.com> --- src/vmx/vmx.c | 92 +++++++++++++++++++---------------------------------------- 1 file changed, 30 insertions(+), 62 deletions(-) diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c index 3b0c16d5a..ba47a87b7 100644 --- a/src/vmx/vmx.c +++ b/src/vmx/vmx.c @@ -2439,11 +2439,6 @@ int virVMXParseFileSystem(virConfPtr conf, int number, virDomainFSDefPtr *def) return -1; } - if (!(*def = virDomainFSDefNew())) - return -1; - - (*def)->type = VIR_DOMAIN_FS_TYPE_MOUNT; - snprintf(prefix, sizeof(prefix), "sharedFolder%d", number); VMX_BUILD_NAME(present); @@ -2454,14 +2449,19 @@ int virVMXParseFileSystem(virConfPtr conf, int number, virDomainFSDefPtr *def) /* vmx:present */ if (virVMXGetConfigBoolean(conf, present_name, &present, false, true) < 0) - goto cleanup; + return -1; /* vmx:enabled */ if (virVMXGetConfigBoolean(conf, enabled_name, &enabled, false, true) < 0) - goto cleanup; + return -1; if (!(present && enabled)) - goto ignore; + return 0; + + if (!(*def = virDomainFSDefNew())) + return -1; + + (*def)->type = VIR_DOMAIN_FS_TYPE_MOUNT; /* vmx:hostPath */ if (virVMXGetConfigString(conf, hostPath_name, &hostPath, false) < 0) @@ -2497,14 +2497,6 @@ int virVMXParseFileSystem(virConfPtr conf, int number, virDomainFSDefPtr *def) VIR_FREE(guestName); return result; - - ignore: - virDomainFSDefFree(*def); - *def = NULL; - - result = 0; - - goto cleanup; } @@ -2557,9 +2549,6 @@ virVMXParseEthernet(virConfPtr conf, int controller, virDomainNetDefPtr *def) return -1; } - if (VIR_ALLOC(*def) < 0) - return -1; - snprintf(prefix, sizeof(prefix), "ethernet%d", controller); VMX_BUILD_NAME(present); @@ -2575,17 +2564,20 @@ virVMXParseEthernet(virConfPtr conf, int controller, virDomainNetDefPtr *def) /* vmx:present */ if (virVMXGetConfigBoolean(conf, present_name, &present, false, true) < 0) - goto cleanup; + return -1; /* vmx:startConnected */ if (virVMXGetConfigBoolean(conf, startConnected_name, &startConnected, true, true) < 0) { - goto cleanup; + return -1; } /* FIXME: Need to distiguish between active and inactive domains here */ if (! present/* && ! startConnected*/) - goto ignore; + return 0; + + if (VIR_ALLOC(*def) < 0) + return -1; /* vmx:connectionType -> def:type */ if (virVMXGetConfigString(conf, connectionType_name, &connectionType, @@ -2726,14 +2718,6 @@ virVMXParseEthernet(virConfPtr conf, int controller, virDomainNetDefPtr *def) VIR_FREE(vnet); return result; - - ignore: - virDomainNetDefFree(*def); - *def = NULL; - - result = 0; - - goto cleanup; } @@ -2773,11 +2757,6 @@ virVMXParseSerial(virVMXContext *ctx, virConfPtr conf, int port, return -1; } - if (!(*def = virDomainChrDefNew(NULL))) - return -1; - - (*def)->deviceType = VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL; - snprintf(prefix, sizeof(prefix), "serial%d", port); VMX_BUILD_NAME(present); @@ -2788,17 +2767,22 @@ virVMXParseSerial(virVMXContext *ctx, virConfPtr conf, int port, /* vmx:present */ if (virVMXGetConfigBoolean(conf, present_name, &present, false, true) < 0) - goto cleanup; + return -1; /* vmx:startConnected */ if (virVMXGetConfigBoolean(conf, startConnected_name, &startConnected, true, true) < 0) { - goto cleanup; + return -1; } /* FIXME: Need to distiguish between active and inactive domains here */ if (! present/* && ! startConnected*/) - goto ignore; + return 0; + + if (!(*def = virDomainChrDefNew(NULL))) + return -1; + + (*def)->deviceType = VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL; /* vmx:fileType -> def:type */ if (virVMXGetConfigString(conf, fileType_name, &fileType, true) < 0) @@ -2919,14 +2903,6 @@ virVMXParseSerial(virVMXContext *ctx, virConfPtr conf, int port, virURIFree(parsedUri); return result; - - ignore: - virDomainChrDefFree(*def); - *def = NULL; - - result = 0; - - goto cleanup; } @@ -2961,11 +2937,6 @@ virVMXParseParallel(virVMXContext *ctx, virConfPtr conf, int port, return -1; } - if (!(*def = virDomainChrDefNew(NULL))) - return -1; - - (*def)->deviceType = VIR_DOMAIN_CHR_DEVICE_TYPE_PARALLEL; - snprintf(prefix, sizeof(prefix), "parallel%d", port); VMX_BUILD_NAME(present); @@ -2975,17 +2946,22 @@ virVMXParseParallel(virVMXContext *ctx, virConfPtr conf, int port, /* vmx:present */ if (virVMXGetConfigBoolean(conf, present_name, &present, false, true) < 0) - goto cleanup; + return -1; /* vmx:startConnected */ if (virVMXGetConfigBoolean(conf, startConnected_name, &startConnected, true, true) < 0) { - goto cleanup; + return -1; } /* FIXME: Need to distiguish between active and inactive domains here */ if (! present/* && ! startConnected*/) - goto ignore; + return 0; + + if (!(*def = virDomainChrDefNew(NULL))) + return -1; + + (*def)->deviceType = VIR_DOMAIN_CHR_DEVICE_TYPE_PARALLEL; /* vmx:fileType -> def:type */ if (virVMXGetConfigString(conf, fileType_name, &fileType, false) < 0) @@ -3029,14 +3005,6 @@ virVMXParseParallel(virVMXContext *ctx, virConfPtr conf, int port, VIR_FREE(fileName); return result; - - ignore: - virDomainChrDefFree(*def); - *def = NULL; - - result = 0; - - goto cleanup; } -- 2.14.3

Dynamically grow the array of network interfaces for each interface read, instead of using a single array of size 4. This way, in the future it will be easier to not limit the number of network interfaces (which this patch still does not change). Signed-off-by: Pino Toscano <ptoscano@redhat.com> --- src/vmx/vmx.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c index ba47a87b7..fd9b55950 100644 --- a/src/vmx/vmx.c +++ b/src/vmx/vmx.c @@ -1751,19 +1751,16 @@ virVMXParseConfig(virVMXContext *ctx, } /* def:nets */ - if (VIR_ALLOC_N(def->nets, 4) < 0) - goto cleanup; - - def->nnets = 0; - for (controller = 0; controller < 4; ++controller) { - if (virVMXParseEthernet(conf, controller, - &def->nets[def->nnets]) < 0) { + virDomainNetDefPtr net = NULL; + if (virVMXParseEthernet(conf, controller, &net) < 0) goto cleanup; - } - if (def->nets[def->nnets] != NULL) - ++def->nnets; + if (!net) + continue; + + if (VIR_APPEND_ELEMENT(def->nets, def->nnets, net) < 0) + goto cleanup; } /* def:inputs */ -- 2.14.3

Simple macro to check the prefix of a string in a case-insensitive way. Signed-off-by: Pino Toscano <ptoscano@redhat.com> --- src/internal.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/internal.h b/src/internal.h index 589503041..1760e3b69 100644 --- a/src/internal.h +++ b/src/internal.h @@ -75,6 +75,7 @@ # define STRNEQLEN(a, b, n) (strncmp(a, b, n) != 0) # define STRCASENEQLEN(a, b, n) (c_strncasecmp(a, b, n) != 0) # define STRPREFIX(a, b) (strncmp(a, b, strlen(b)) == 0) +# define STRCASEPREFIX(a, b) (c_strncasecmp(a, b, strlen(b)) == 0) # define STRSKIP(a, b) (STRPREFIX(a, b) ? (a) + strlen(b) : NULL) # define STREQ_NULLABLE(a, b) \ -- 2.14.3

Scan the parsed VMX file, and gather the biggest index of the network interfaces there: this way, it is possible to parse all the available network interfaces, instead of just 4 maximum. Add the VMX file attached to RHBZ#1560917 as testcase esx-in-the-wild-8. https://bugzilla.redhat.com/show_bug.cgi?id=1560917 Signed-off-by: Pino Toscano <ptoscano@redhat.com> --- src/vmx/vmx.c | 43 +++++-- tests/vmx2xmldata/vmx2xml-esx-in-the-wild-8.vmx | 163 ++++++++++++++++++++++++ tests/vmx2xmldata/vmx2xml-esx-in-the-wild-8.xml | 89 +++++++++++++ tests/vmx2xmltest.c | 1 + 4 files changed, 288 insertions(+), 8 deletions(-) create mode 100644 tests/vmx2xmldata/vmx2xml-esx-in-the-wild-8.vmx create mode 100644 tests/vmx2xmldata/vmx2xml-esx-in-the-wild-8.xml diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c index fd9b55950..cd43d9c49 100644 --- a/src/vmx/vmx.c +++ b/src/vmx/vmx.c @@ -1286,6 +1286,36 @@ virVMXGatherSCSIControllers(virVMXContext *ctx, virDomainDefPtr def, return result; } +struct virVMXConfigScanResults { + int networks_max_index; +}; + +static int +virVMXConfigScanResultsCollector(const char* name, + virConfValuePtr value ATTRIBUTE_UNUSED, + void *opaque) +{ + struct virVMXConfigScanResults *results = opaque; + + if (STRCASEPREFIX(name, "ethernet")) { + unsigned int idx; + char *p; + + if (virStrToLong_uip(name + 8, &p, 10, &idx) < 0 || + *p != '.') { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("failed to parse the index of the VMX key '%s'"), + name); + return -1; + } + + if ((int) idx > results->networks_max_index) + results->networks_max_index = (int) idx; + } + + return 0; +} + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -1322,6 +1352,7 @@ virVMXParseConfig(virVMXContext *ctx, bool hgfs_disabled = true; long long sharedFolder_maxNum = 0; int cpumasklen; + struct virVMXConfigScanResults results = { -1 }; if (ctx->parseFileName == NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", @@ -1357,6 +1388,9 @@ virVMXParseConfig(virVMXContext *ctx, goto cleanup; } + if (virConfWalk(conf, virVMXConfigScanResultsCollector, &results) < 0) + goto cleanup; + /* Allocate domain def */ if (!(def = virDomainDefNew())) goto cleanup; @@ -1751,7 +1785,7 @@ virVMXParseConfig(virVMXContext *ctx, } /* def:nets */ - for (controller = 0; controller < 4; ++controller) { + for (controller = 0; controller <= results.networks_max_index; ++controller) { virDomainNetDefPtr net = NULL; if (virVMXParseEthernet(conf, controller, &net) < 0) goto cleanup; @@ -2539,13 +2573,6 @@ virVMXParseEthernet(virConfPtr conf, int controller, virDomainNetDefPtr *def) return -1; } - if (controller < 0 || controller > 3) { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("Ethernet controller index %d out of [0..3] range"), - controller); - return -1; - } - snprintf(prefix, sizeof(prefix), "ethernet%d", controller); VMX_BUILD_NAME(present); diff --git a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-8.vmx b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-8.vmx new file mode 100644 index 000000000..1e3dbf23c --- /dev/null +++ b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-8.vmx @@ -0,0 +1,163 @@ +.encoding = "UTF-8" +config.version = "8" +virtualHW.version = "11" +vmci0.present = "TRUE" +svga.vramSize = "8388608" +memSize = "2048" +sched.cpu.units = "mhz" +tools.upgrade.policy = "manual" +scsi0.virtualDev = "pvscsi" +scsi0.present = "TRUE" +sata0.present = "TRUE" +sata0:0.deviceType = "cdrom-image" +sata0:0.fileName = "/vmfs/volumes/692eb778-2d4937fe/CentOS-4.7.ServerCD-x86_64.iso" +sata0:0.present = "TRUE" +scsi0:0.deviceType = "scsi-hardDisk" +scsi0:0.fileName = "RHEL7_6.vmdk" +sched.scsi0:0.shares = "normal" +scsi0:0.present = "TRUE" +floppy0.startConnected = "FALSE" +floppy0.clientDevice = "TRUE" +floppy0.fileName = "vmware-null-remote-floppy" +ethernet0.virtualDev = "vmxnet3" +ethernet0.networkName = "VM Network" +ethernet0.addressType = "static" +ethernet0.address = "00:1a:4a:16:01:55" +ethernet0.present = "TRUE" +displayName = "RHEL7_10_NICs" +guestOS = "rhel7-64" +toolScripts.afterPowerOn = "TRUE" +toolScripts.afterResume = "TRUE" +toolScripts.beforeSuspend = "TRUE" +toolScripts.beforePowerOff = "TRUE" +tools.syncTime = "FALSE" +messageBus.tunnelEnabled = "FALSE" +uuid.bios = "42 35 94 20 99 dc 42 61-52 64 ba 58 dd ae 20 e4" +vc.uuid = "50 35 1d e6 7d 56 29 ab-9d 72 c7 f9 ea 3f cf d0" +sched.cpu.latencySensitivity = "normal" +tools.guest.desktop.autolock = "FALSE" +nvram = "RHEL7_6.nvram" +pciBridge0.present = "TRUE" +svga.present = "TRUE" +pciBridge4.present = "TRUE" +pciBridge4.virtualDev = "pcieRootPort" +pciBridge4.functions = "8" +pciBridge5.present = "TRUE" +pciBridge5.virtualDev = "pcieRootPort" +pciBridge5.functions = "8" +pciBridge6.present = "TRUE" +pciBridge6.virtualDev = "pcieRootPort" +pciBridge6.functions = "8" +pciBridge7.present = "TRUE" +pciBridge7.virtualDev = "pcieRootPort" +pciBridge7.functions = "8" +hpet0.present = "true" +sched.scsi0:0.throughputCap = "off" +ethernet0.uptCompatibility = "TRUE" +ethernet0.pciSlotNumber = "192" +monitor.phys_bits_used = "42" +pciBridge0.pciSlotNumber = "17" +pciBridge4.pciSlotNumber = "21" +pciBridge5.pciSlotNumber = "22" +pciBridge6.pciSlotNumber = "23" +pciBridge7.pciSlotNumber = "24" +replay.supported = "false" +sata0.pciSlotNumber = "33" +scsi0.pciSlotNumber = "160" +scsi0.sasWWID = "50 05 05 60 99 dc 42 60" +softPowerOff = "FALSE" +virtualHW.productCompatibility = "hosted" +vmci0.pciSlotNumber = "32" +vmotion.checkpointFBSize = "8388608" +vmotion.checkpointSVGAPrimarySize = "8388608" +tools.remindInstall = "FALSE" +toolsInstallManager.lastInstallError = "0" +toolsInstallManager.updateCounter = "1" +migrate.hostlog = "RHEL7_6-2a23b979.hlog" +sched.cpu.min = "0" +sched.cpu.shares = "normal" +sched.mem.min = "0" +sched.mem.minSize = "0" +sched.mem.shares = "normal" +scsi0:1.deviceType = "scsi-hardDisk" +scsi0:1.fileName = "RHEL7_6_1.vmdk" +scsi0:1.mode = "independent-nonpersistent" +sched.scsi0:1.shares = "normal" +sched.scsi0:1.throughputCap = "off" +scsi0:1.present = "TRUE" +scsi0:2.deviceType = "scsi-hardDisk" +scsi0:2.fileName = "/vmfs/volumes/5669422e-699d77db-c144-00e0815e303e/block4/block4.vmdk" +sched.scsi0:2.shares = "normal" +sched.scsi0:2.throughputCap = "off" +scsi0:2.present = "TRUE" +numvcpus = "8" +cpuid.coresPerSocket = "2" +sched.swap.derivedName = "/vmfs/volumes/29dcc8ec-e8d62d3b-0000-000000000000/RHEL7_6/RHEL7_6-05efff7d.vswp" +uuid.location = "56 4d d9 db b7 4e df ce-58 6a 77 56 82 53 aa 18" +replay.filename = "" +scsi0:2.redo = "" +scsi0:1.redo = "" +scsi0:0.redo = "" +vmci0.id = "-575790876" +cleanShutdown = "TRUE" +ethernet1.virtualDev = "e1000" +ethernet1.networkName = "VM Network" +ethernet1.addressType = "vpx" +ethernet1.generatedAddress = "00:1a:4a:16:21:85" +ethernet1.present = "TRUE" +ethernet2.virtualDev = "e1000e" +ethernet2.networkName = "VM Network" +ethernet2.addressType = "vpx" +ethernet2.generatedAddress = "00:1a:4a:16:21:82" +ethernet2.present = "TRUE" +ethernet3.virtualDev = "vmxnet3" +ethernet3.networkName = "VM Network" +ethernet3.addressType = "vpx" +ethernet3.generatedAddress = "00:1a:4a:16:21:69" +ethernet3.uptCompatibility = "TRUE" +ethernet3.present = "TRUE" +ethernet4.virtualDev = "vmxnet3" +ethernet4.networkName = "VM Network" +ethernet4.addressType = "vpx" +ethernet4.generatedAddress = "00:1a:4a:16:21:80" +ethernet4.uptCompatibility = "TRUE" +ethernet4.present = "TRUE" +ethernet5.virtualDev = "vmxnet3" +ethernet5.networkName = "VM Network" +ethernet5.addressType = "vpx" +ethernet5.generatedAddress = "00:1a:4a:16:21:a3" +ethernet5.uptCompatibility = "TRUE" +ethernet5.present = "TRUE" +ethernet6.virtualDev = "vmxnet3" +ethernet6.networkName = "VM Network" +ethernet6.addressType = "vpx" +ethernet6.generatedAddress = "00:1a:4a:16:21:a8" +ethernet6.uptCompatibility = "TRUE" +ethernet6.present = "TRUE" +ethernet7.virtualDev = "vmxnet3" +ethernet7.networkName = "VM Network" +ethernet7.addressType = "vpx" +ethernet7.generatedAddress = "00:1a:4a:16:21:a9" +ethernet7.uptCompatibility = "TRUE" +ethernet7.present = "TRUE" +ethernet8.virtualDev = "vmxnet3" +ethernet8.networkName = "VM Network" +ethernet8.addressType = "vpx" +ethernet8.generatedAddress = "00:1a:4a:16:21:78" +ethernet8.uptCompatibility = "TRUE" +ethernet8.present = "TRUE" +ethernet9.virtualDev = "vmxnet3" +ethernet9.networkName = "VM Network" +ethernet9.addressType = "vpx" +ethernet9.generatedAddress = "00:1a:4a:16:21:81" +ethernet9.uptCompatibility = "TRUE" +ethernet9.present = "TRUE" +ethernet1.pciSlotNumber = "34" +ethernet2.pciSlotNumber = "224" +ethernet3.pciSlotNumber = "256" +ethernet4.pciSlotNumber = "1184" +ethernet5.pciSlotNumber = "1216" +ethernet6.pciSlotNumber = "1248" +ethernet7.pciSlotNumber = "1280" +ethernet8.pciSlotNumber = "2208" +ethernet9.pciSlotNumber = "2240" diff --git a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-8.xml b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-8.xml new file mode 100644 index 000000000..c85ccf364 --- /dev/null +++ b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-8.xml @@ -0,0 +1,89 @@ +<domain type='vmware'> + <name>RHEL7_10_NICs</name> + <uuid>42359420-99dc-4261-5264-ba58ddae20e4</uuid> + <memory unit='KiB'>2097152</memory> + <currentMemory unit='KiB'>2097152</currentMemory> + <vcpu placement='static'>8</vcpu> + <cputune> + <shares>8000</shares> + </cputune> + <os> + <type arch='x86_64'>hvm</type> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <disk type='file' device='disk'> + <source file='[datastore] directory/RHEL7_6.vmdk'/> + <target dev='sda' bus='scsi'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> + </disk> + <disk type='file' device='disk'> + <source file='[datastore] directory/RHEL7_6_1.vmdk'/> + <target dev='sdb' bus='scsi'/> + <transient/> + <address type='drive' controller='0' bus='0' target='0' unit='1'/> + </disk> + <disk type='file' device='disk'> + <source file='[5669422e-699d77db-c144-00e0815e303e] block4/block4.vmdk'/> + <target dev='sdc' bus='scsi'/> + <address type='drive' controller='0' bus='0' target='0' unit='2'/> + </disk> + <controller type='scsi' index='0' model='vmpvscsi'/> + <interface type='bridge'> + <mac address='00:1a:4a:16:01:55'/> + <source bridge='VM Network'/> + <model type='vmxnet3'/> + </interface> + <interface type='bridge'> + <mac address='00:1a:4a:16:21:85'/> + <source bridge='VM Network'/> + <model type='e1000'/> + </interface> + <interface type='bridge'> + <mac address='00:1a:4a:16:21:82'/> + <source bridge='VM Network'/> + <model type='e1000e'/> + </interface> + <interface type='bridge'> + <mac address='00:1a:4a:16:21:69'/> + <source bridge='VM Network'/> + <model type='vmxnet3'/> + </interface> + <interface type='bridge'> + <mac address='00:1a:4a:16:21:80'/> + <source bridge='VM Network'/> + <model type='vmxnet3'/> + </interface> + <interface type='bridge'> + <mac address='00:1a:4a:16:21:a3'/> + <source bridge='VM Network'/> + <model type='vmxnet3'/> + </interface> + <interface type='bridge'> + <mac address='00:1a:4a:16:21:a8'/> + <source bridge='VM Network'/> + <model type='vmxnet3'/> + </interface> + <interface type='bridge'> + <mac address='00:1a:4a:16:21:a9'/> + <source bridge='VM Network'/> + <model type='vmxnet3'/> + </interface> + <interface type='bridge'> + <mac address='00:1a:4a:16:21:78'/> + <source bridge='VM Network'/> + <model type='vmxnet3'/> + </interface> + <interface type='bridge'> + <mac address='00:1a:4a:16:21:81'/> + <source bridge='VM Network'/> + <model type='vmxnet3'/> + </interface> + <video> + <model type='vmvga' vram='8192' primary='yes'/> + </video> + </devices> +</domain> diff --git a/tests/vmx2xmltest.c b/tests/vmx2xmltest.c index e0be64225..319bf345a 100644 --- a/tests/vmx2xmltest.c +++ b/tests/vmx2xmltest.c @@ -268,6 +268,7 @@ mymain(void) DO_TEST("esx-in-the-wild-5", "esx-in-the-wild-5"); DO_TEST("esx-in-the-wild-6", "esx-in-the-wild-6"); DO_TEST("esx-in-the-wild-7", "esx-in-the-wild-7"); + DO_TEST("esx-in-the-wild-8", "esx-in-the-wild-8"); DO_TEST("gsx-in-the-wild-1", "gsx-in-the-wild-1"); DO_TEST("gsx-in-the-wild-2", "gsx-in-the-wild-2"); -- 2.14.3

On Wed, Mar 28, 2018 at 01:40:17PM +0200, Pino Toscano wrote:
Hi,
the VMX parser, used in the esx driver, has currently hardcoded 4 NICs possible, ignoring extra more than that. The following series removes this limitation, allowing to parse all the 10 NICs in the VMX of RHBZ#1560917.
Thanks,
Pino Toscano (4): vmx: check for present/enabled devices earlier vmx: allocate space for network interfaces if needed internal: add STRCASEPREFIX vmx: convert any amount of NICs
ACK series Jan

On 03/28/2018 01:56 PM, Ján Tomko wrote:
On Wed, Mar 28, 2018 at 01:40:17PM +0200, Pino Toscano wrote:
Hi,
the VMX parser, used in the esx driver, has currently hardcoded 4 NICs possible, ignoring extra more than that. The following series removes this limitation, allowing to parse all the 10 NICs in the VMX of RHBZ#1560917.
Thanks,
Pino Toscano (4): vmx: check for present/enabled devices earlier vmx: allocate space for network interfaces if needed internal: add STRCASEPREFIX vmx: convert any amount of NICs
ACK series
Pushed now. Michal

On Sun, Apr 01, 2018 at 12:48:13PM +0200, Michal Privoznik wrote:
On 03/28/2018 01:56 PM, Ján Tomko wrote:
On Wed, Mar 28, 2018 at 01:40:17PM +0200, Pino Toscano wrote:
Hi,
the VMX parser, used in the esx driver, has currently hardcoded 4 NICs possible, ignoring extra more than that. The following series removes this limitation, allowing to parse all the 10 NICs in the VMX of RHBZ#1560917.
Thanks,
Pino Toscano (4): vmx: check for present/enabled devices earlier vmx: allocate space for network interfaces if needed internal: add STRCASEPREFIX vmx: convert any amount of NICs
ACK series
Pushed now.
Thanks, I was AFK on a Sunday and did not notice the release. Jano
Michal
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
participants (3)
-
Ján Tomko
-
Michal Privoznik
-
Pino Toscano