• M
    esx: Implement network driver · b8fa5fd0
    Matthias Bolte 提交于
    An ESX server has one or more PhysicalNics that represent the actual
    hardware NICs. Those can be listed via the interface driver.
    
    A libvirt virtual network is mapped to a HostVirtualSwitch. On the
    physical side a HostVirtualSwitch can be connected to PhysicalNics.
    On the virtual side a HostVirtualSwitch has HostPortGroups that are
    mapped to libvirt virtual network's portgroups. Typically there is
    HostPortGroups named 'VM Network' that is used to connect virtual
    machines to a HostVirtualSwitch. A second HostPortGroup typically
    named 'Management Network' is used to connect the hypervisor itself
    to the HostVirtualSwitch. This one is not mapped to a libvirt virtual
    network's portgroup. There can be more HostPortGroups than those
    typical two on a HostVirtualSwitch.
    
             +---------------+-------------------+
       ...---|               |                   |   +-------------+
             | HostPortGroup |                   |---| PhysicalNic |
             |   VM Network  |                   |   |    vmnic0   |
       ...---|               |                   |   +-------------+
             +---------------+ HostVirtualSwitch |
                             |     vSwitch0      |
             +---------------+                   |
             | HostPortGroup |                   |
       ...---|   Management  |                   |
             |    Network    |                   |
             +---------------+-------------------+
    
    The virtual counterparts of the PhysicalNic is the HostVirtualNic for
    the hypervisor and the VirtualEthernetCard for the virtual machines
    that are grouped into HostPortGroups.
    
       +---------------------+   +---------------+---...
       | VirtualEthernetCard |---|               |
       +---------------------+   | HostPortGroup |
       +---------------------+   |   VM Network  |
       | VirtualEthernetCard |---|               |
       +---------------------+   +---------------+
                                                 |
                                 +---------------+
       +---------------------+   | HostPortGroup |
       |    HostVirtualNic   |---|   Management  |
       +---------------------+   |    Network    |
                                 +---------------+---...
    
    The currently implemented network driver can list, define and undefine
    HostVirtualSwitches including HostPortGroups for virtual machines.
    Existing HostVirtualSwitches cannot be edited yet. This will be added
    in a followup patch.
    b8fa5fd0
network_conf.c 57.7 KB