Topic
4 replies Latest Post - ‏2013-01-02T13:14:39Z by SystemAdmin
SystemAdmin
SystemAdmin
1744 Posts
ACCEPTED ANSWER

Pinned topic add a virtual ethernet adapter via HMC command line

‏2012-12-27T21:57:43Z |
Hi All,

I would like to know how can I add a virtual ethernet adapter via command line to a LPAR profile. Would DLPAR work in this case?
Updated on 2013-01-02T13:14:39Z at 2013-01-02T13:14:39Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    1744 Posts
    ACCEPTED ANSWER

    Re: add a virtual ethernet adapter via HMC command line

    ‏2012-12-28T09:29:29Z  in response to SystemAdmin
    Hi,

    For DLPAR use chhwres command :
    
    # chhwres -r virtualio -m CPU-FRM12 -o a --id 101 --rsubtype eth -s 4 -a 
    "ieee_virtual_eth=0,port_vlan_id=131,vswitch=VS_VIO" # chhwres -r virtualio -m CPU-FRM12 -o a --id 101 --rsubtype eth -s 5 -a 
    "ieee_virtual_eth=0,port_vlan_id=132,vswitch=VS_VIO"
    

    Then modify lpar profile with chsyscfg command :
    
    # chsyscfg -m CPU-FRM12-r prof -i 
    'name=quatest01, lpar_id=101, "virtual_eth_adapters=4/0/131//0/1/VS_VIO,5/0/132//0/1/VS_VIO"
    


    Use man chhwres and man chsyscfg for detailed examples.

    Hope this can help

    http://chmod666.org
    • SystemAdmin
      SystemAdmin
      1744 Posts
      ACCEPTED ANSWER

      Re: add a virtual ethernet adapter via HMC command line

      ‏2012-12-28T14:14:19Z  in response to SystemAdmin
      Hi, thanks for your answer. However, my concern is that currently I have two virtual eth adapters assigned to the LPAR, if I change the profile to add the new adapter, would I lose the two previous ones?
      • SystemAdmin
        SystemAdmin
        1744 Posts
        ACCEPTED ANSWER

        Re: add a virtual ethernet adapter via HMC command line

        ‏2012-12-28T14:49:53Z  in response to SystemAdmin
        To add and not to erase you current profile add a '+' before the '='

        Example with a '+'
        
        chsyscfg -m CPU-FRM12-r prof -i 
        'name=quatest01, lpar_id=101, "virtual_eth_adapters+=4/0/131//0/1/VS_VIO,5/0/132//0/1/VS_VIO"
        


        Extract for the man :
        
        If 
        '+=' is used in the attribute name/value pair instead of 
        '=', then the specified value is added to the existing value 
        
        for the attribute 
        
        if the attribute is numerical.  If the attribute is a list, then the specified value(s) is added to the existing list.
        


        For the dlpar chhwres with "-o a" will add an adapter without removing the others.
        
        -o     The  operation  to  perform.   Valid  values are a to add hardware resources, r to remove hardware resources, m to move hardware resources from one partition to another, s to set hardware resource related attributes, rs to reset I/O entitled memory statistics 
        
        for a partition, so to 
        
        switch over a running shared memory partition to its redundant paging VIOS partition,  or  c to clear a physical I/O slot or bus. The c operation is useful 
        
        for clearing stale physical I/O slot or bus information after a physical I/O adapter or drawer has been concurrently removed but not replaced. The clear physical I/O slot operation is only supported on POWER6 and later servers.
        


        Hope this can help.

        Benoit
        http://chmod666.org
  • SystemAdmin
    SystemAdmin
    1744 Posts
    ACCEPTED ANSWER

    Re: add a virtual ethernet adapter via HMC command line

    ‏2013-01-02T13:14:39Z  in response to SystemAdmin
    Thanks for the answered provided, it has helped me out a lot.