PowerVM

Power Virtualization

Learn about the virtualization technologies designed specifically for IBM Power including #PowerVM, #PowerVC, #VM Recovery Manager#HCM/CMC, and more.


#Power
#TechXchangeConferenceLab

 View Only
  • 1.  VIOS RBAC for monitoring

    Posted Fri November 21, 2025 08:51 AM

    Hi all.

    I am deskilled having not worked on VIO for over a decade, so I need help from the community please.

    I am trying to give a user the minimum privs to be able to monitor the VIO server.

    I need to give them access to the lsmap and the lsnports command from the ios cli command set.

    VIOS 4.1.1.10

    AIX 7300-03-01-2520

    According to this page:

    Using role-based access control with the Virtual I/O Server

    Ibm remove preview
    Using role-based access control with the Virtual I/O Server
    With Virtual I/O Server Version 2.2, and later, a system administrator can define roles based on job functions in an organization by using role-based access control (RBAC).
    View this on Ibm >

    I need to give these authorizations to the user:

    vios.device.manage.list

    vios.device.manage.map.phyvir 

    So I created a role:

    mkrole authorizations='vios.device.manage.list,vios.device.manage.map.phyvirt' dfltmsg='Monitoring role for VIOS' monrole

    and added the role to the user:

    chuser roles='monrole' monuser

    I still get

    "Access to run the command is not valid"

    This is for a customer who has no VIOS support and needs to call in a consultant everytime they want something doing so I have no access to the VIO server myself.

    Thanks in advance for any and all advice.



    ------------------------------
    Michael Davison
    EMEA Support Team Lead
    Fortra
    Peterborough
    ------------------------------


  • 2.  RE: VIOS RBAC for monitoring

    Posted Fri November 21, 2025 08:54 AM

    I think I just realised.... need to run the setkst command...



    ------------------------------
    Michael Davison
    EMEA Support Team Lead
    Fortra
    Peterborough
    ------------------------------



  • 3.  RE: VIOS RBAC for monitoring

    Posted Fri November 21, 2025 10:39 AM

    So setkst ran and I saw the auth updates to the kernel,, but no change - my user cannot run the command still... any ideas?



    ------------------------------
    Michael Davison
    EMEA Support Team Lead
    Fortra
    Peterborough
    ------------------------------



  • 4.  RE: VIOS RBAC for monitoring

    Posted Sun November 23, 2025 02:08 AM

    Did you try the "ViewOnly' role provided by IBM?

    If it's working, I'd start with cloning it then deleting unnecessary authorizations.



    ------------------------------
    Sylvain Manceau
    Blue
    ------------------------------



  • 5.  RE: VIOS RBAC for monitoring

    Posted Mon December 01, 2025 05:13 AM

    Thank you for the idea.  I think I've cracked it - will report back once I have completed my testing.



    ------------------------------
    Michael Davison
    EMEA Support Team Lead
    Fortra
    Peterborough
    ------------------------------



  • 6.  RE: VIOS RBAC for monitoring

    Posted Mon December 01, 2025 05:14 AM

    Thank you for the idea.  I think I've cracked it - will report back once I have completed my testing.



    ------------------------------
    Michael Davison
    EMEA Support Team Lead
    Fortra
    Peterborough
    ------------------------------



  • 7.  RE: VIOS RBAC for monitoring

    Posted Tue December 02, 2025 04:46 AM

    Hi Mike.

    Not sure if this is part of the issue, but just adding the role to a user does not allow them to use those priviliges without executing "swrole" first.
    You can set the "default_roles" attribute to your user, this can be a role list or "ALL" to select the roles you have defined.

     default_roles
          Specifies the default roles for the user. The Value parameter, a comma-separated list of valid role names, can only
          contain roles assigned to the user in the roles attribute. You can use the ALL keyword to signify that the default
          roles for the user are all their assigned roles.

    Also watch out for the default PATH and aliases used in padmin to execute `/usr/ios/cli/ioscli`for all the VIOS commands.



    ------------------------------
    Rich Jefferies
    ------------------------------



  • 8.  RE: VIOS RBAC for monitoring

    Posted Mon November 24, 2025 03:18 AM
      |   view attached

    Hi ,

    Please check the attached file.

    Thank you



    ------------------------------
    Anas AlSaleh
    IBM Power Systems Software Specialist
    Saudi Business Machines ( SBM )
    Riyadh
    ------------------------------

    Attachment(s)

    txt
    VIOs user monitoring.txt   2 KB 1 version


  • 9.  RE: VIOS RBAC for monitoring

    Posted Tue December 02, 2025 04:57 AM

    The solution, using existing RBAC was as follows:

    Create a user 'halcyon' to operate the Halcyon agent (We had already done this a long time ago on the customer system)

    mkuser admin='false' pgrp='staff' groups='staff' su='false' shell='/usr/bin/ksh' gecos='Halcyon User' halcyon

    We then made a role called "Halcyon", using the existing RBAC authorisations to the VIOS commands we need access to:

    mkrole authorizations='vios.device.manage.list,vios.device.manage.map.phyvirt' dfltmsg='Halcyon role for VIOS' Halcyon

    Ensure that the halcyon user has the role "Halcyon" assigned to it:

    chuser roles='Halcyon' halcyon

    Make sure the "Halcyon role is the default role for the user:

    chuser default_roles=Halcyon halcyon

    We then update the Kernel to pick up the changes:

    setkst

    We then switched to the Halcyon user and checked we could access the commands:

    su - halcyon

    /usr/ios/cli/ioscli lsmap -all

    The bit I missed was the setting of the default role, so the halcyon account could operate automatically.

    Thanks for everyones ideas and pointers.



    ------------------------------
    Michael Davison
    EMEA Support Team Lead
    Fortra
    Peterborough
    ------------------------------