You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cloudstack.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/12/02 09:52:58 UTC

[jira] [Commented] (CLOUDSTACK-9647) NIC adapter type becomes e1000 , even after changing the global parameter "vmware.systemvm.nic.device.type" to vmxnet3 for VPC VR

    [ https://issues.apache.org/jira/browse/CLOUDSTACK-9647?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15714651#comment-15714651 ] 

ASF GitHub Bot commented on CLOUDSTACK-9647:
--------------------------------------------

GitHub user sudhansu7 opened a pull request:

    https://github.com/apache/cloudstack/pull/1810

    CLOUDSTACK-9647: NIC adapter type becomes e1000 , even after changing…

    **Issue:**
    NIC adapter type becomes e1000 , even after changing the global parameter "vmware.systemvm.nic.device.type" to vmxnet3.
    
    **Description**
    
    Repro steps:-
    
    -> Set global parameter "vmware.systemvm.nic.device.type" to vmxnet3.
    -> Created a VPC network and deployed a VM using the same network.
    -> Checked the router details and found that for private network , it was showing nic adapter type as VMXNET3 and for other networks (public and guest) it was showing as E1000.
    -> Rebooted the VPC network and checked it again, it was same as earlier.
    
    /vmfs/volumes/3e5dffc5-9b91346e/r-2805-VM # grep virtualDev r-2805-VM.vmx
    pciBridge4.virtualDev = "pcieRootPort"
    pciBridge5.virtualDev = "pcieRootPort"
    pciBridge6.virtualDev = "pcieRootPort"
    pciBridge7.virtualDev = "pcieRootPort"
    scsi0.virtualDev = "lsilogic"
    ethernet0.virtualDev = "vmxnet3"
    ethernet1.virtualDev = "e1000"
    ethernet2.virtualDev = "e1000"
    ethernet3.virtualDev = "e1000"
    
    **Root Cause:**
    
    While preparing PlugNicCommand for VPC Network, NIC adapter type is not used.
    
    PlugNicCommand:
    
                "com.cloud.agent.api.PlugNicCommand": {
                    "nic": {
                        "deviceId": 1,
                        "networkRateMbps": 200,
                        "defaultNic": true,
                        "pxeDisable": true,
                        "nicUuid": "9ae41bb1-dc22-4489-95f4-2c2659c99486",
                        "uuid": "4ffdfb14-7d47-4ffd-b7fb-85f171c349ff",
                        "ip": "10.104.92.161",
                        "netmask": "255.255.254.0",
                        "gateway": "10.104.92.1",
                        "mac": "06:f8:de:00:00:14",
                        "broadcastType": "Vlan",
                        "type": "Public",
                        "broadcastUri": "vlan://untagged",
                        "isolationUri": "vlan://untagged",
                        "isSecurityGroupEnabled": false
                    },
                    "instanceName": "r-2784-VM",
                    "vmType": "DomainRouter",
                    "wait": 0
                }
    
    Code Snippet:
    
    public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplianceManagerImpl implements VpcVirtualNetworkApplianceManager {
    
    ...
    ...
    
    	 @Override
         public boolean finalizeCommandsOnStart(Commands cmds, VirtualMachineProfile profile) {
    
    
    ...
    ...
            //3) PREPARE PLUG NIC COMMANDS
            try {
                //add VPC router to public networks
                ...
                ..
    
                       final PlugNicCommand plugNicCmd = new PlugNicCommand(_nwHelper.getNicTO(domainRouterVO, publicNic.getNetworkId(), publicNic.getBroadcastUri().toString()),
                                domainRouterVO.getInstanceName(), domainRouterVO.getType());
    
    
    ...
    ...
    
                //add VPC router to guest networks
                for (Pair<Nic, Network> nicNtwk : guestNics) {
                    Nic guestNic = nicNtwk.first();
                    //plug guest nic
                    final PlugNicCommand plugNicCmd = new PlugNicCommand(_nwHelper.getNicTO(domainRouterVO, guestNic.getNetworkId(), null), domainRouterVO.getInstanceName(), domainRouterVO.getType());
                    cmds.addCommand(plugNicCmd);
    
    ...
    	   }
    ...
    ...
    }
    
    **Solution:**
    Fetch and add NIC adapter type to PlugNicCommand. Refer attached ES-4150-patch.diff for more details.
    
    Command After fix:
    
           {
             "com.cloud.agent.api.PlugNicCommand":{
                "nic":{
                   "deviceId":2,
                   "networkRateMbps":200,
                   "defaultNic":false,
                   "pxeDisable":true,
                   "nicUuid":"06c1b9dc-9061-4bbf-8ad3-60baa3ee3e9a",
                   "uuid":"381fc075-4035-40c3-a09c-84baf6f1a0b2",
                   "ip":"10.147.100.10",
                   "netmask":"255.255.255.0",
                   "gateway":"10.147.100.1",
                   "mac":"06:0f:88:00:01:48",
                   "broadcastType":"Vlan",
                   "type":"Guest",
                   "broadcastUri":"vlan://100",
                   "isolationUri":"vlan://100",
                   "isSecurityGroupEnabled":false
                },
                "instanceName":"r-2808-VM",
                "vmType":"DomainRouter",
                "details":{
                   "nicAdapter":"Vmxnet3",
                   "vmware.reserve.cpu":"false",
                   "vmware.reserve.mem":"false"
                },
                "wait":0
             }
          },
    
    Before:
    
    /vmfs/volumes/3e5dffc5-9b91346e/r-2805-VM # grep virtualDev r-2805-VM.vmx
    pciBridge4.virtualDev = "pcieRootPort"
    pciBridge5.virtualDev = "pcieRootPort"
    pciBridge6.virtualDev = "pcieRootPort"
    pciBridge7.virtualDev = "pcieRootPort"
    scsi0.virtualDev = "lsilogic"
    ethernet0.virtualDev = "vmxnet3"
    ethernet1.virtualDev = "e1000"
    ethernet2.virtualDev = "e1000"
    ethernet3.virtualDev = "e1000"
    
    After
    
    /vmfs/volumes/3e5dffc5-9b91346e/r-2808-VM # grep virtualDev r-2808-VM.vmx
    pciBridge4.virtualDev = "pcieRootPort"
    pciBridge5.virtualDev = "pcieRootPort"
    pciBridge6.virtualDev = "pcieRootPort"
    pciBridge7.virtualDev = "pcieRootPort"
    scsi0.virtualDev = "lsilogic"
    ethernet0.virtualDev = "vmxnet3"
    ethernet1.virtualDev = "vmxnet3"
    ethernet2.virtualDev = "vmxnet3"
    ethernet3.virtualDev = "vmxnet3"
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/sudhansu7/cloudstack CLOUDSTACK-9647

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cloudstack/pull/1810.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1810
    
----
commit 6314367eba445cf7a2960f56b92c0a21080f41a0
Author: Sudhansu <su...@accelerite.com>
Date:   2016-12-02T08:19:37Z

    CLOUDSTACK-9647: NIC adapter type becomes e1000 , even after changing the global parameter
     "vmware.systemvm.nic.device.type" to vmxnet3 for VPC VR
    
    Added NicAdapter details in PlugNicCommmand.

----


> NIC adapter type becomes e1000 , even after changing the global parameter "vmware.systemvm.nic.device.type" to vmxnet3 for VPC VR
> ---------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-9647
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9647
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: Management Server, VMware
>    Affects Versions: 4.9.0
>            Reporter: Sudhansu Sahu
>            Assignee: Sudhansu Sahu
>
> ISSUE
> =====
> NIC adapter type becomes e1000 , even after changing the global parameter "vmware.systemvm.nic.device.type" to vmxnet3.
> Description
> =========
> Repro steps:-
> -> Set global parameter "vmware.systemvm.nic.device.type" to vmxnet3.
> -> Created a VPC network and deployed a VM using the same network.
> -> Checked the router details and found that for private network , it was showing nic adapter type as VMXNET3 and for other networks (public and guest) it was showing as E1000.
> -> Rebooted the VPC network and checked it again, it was same as earlier.
> /vmfs/volumes/94ec1ec2-0df8514b/r-2784-VM # grep virtualDev r-2784-VM.vmx
> pciBridge4.virtualDev = "pcieRootPort"
> pciBridge5.virtualDev = "pcieRootPort"
> pciBridge6.virtualDev = "pcieRootPort"
> pciBridge7.virtualDev = "pcieRootPort"
> scsi0.virtualDev = "lsilogic"
> ethernet0.virtualDev = "vmxnet3"
> ethernet1.virtualDev = "e1000"
> ethernet2.virtualDev = "vmxnet3"
> ethernet3.virtualDev = "vmxnet3"



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)