Category: NSX

  • NSX Edge Backup and Restore

     

    Apart from NSX Manager backup and restore procedure , I was looking for a procedure to backup and restore NSX edge appliances.Here is the API way to do this…. (this may not be supported by VMware)

    Backup NSX Edge Configuration-

    To get edge configuration of a specified edge using REST API, use the following rest API call.

    Request type: GET https://<nsxmgr-ip>/api/4.0/edges/<Edge-id>

    get_edge

    Save the response body (output) as backed up configuration in a file.

    Note : Backup the edge certificates , passkeys and passphrase outside of NSX as the edge certificates are not exported  as  part of the REST call.

    How to Restore Edge Configuration-

    To deploy a new edge using backed up configuration in the above step, use the following rest API call with the saved backed up configuration inside the API call body.

    Before pasting the backup in the request body make the following changes……

    Remove the section <id><edge-id></id>

    remove

    Add a new section <password>your 12 digit password </password> inside <cliSettings></cliSettings>

    Example:

     

    passw

    you must remove the section <clientSsl></clientSsl> in the Application Profiles inside Load-Balancer if exists.

    clientssl

    Now go to your API client and

    Request type: POST   and URL – https://<nsxmgr-ip>/api/4.0/edges/
    where body is the backed up configuration with the above modifications.

    send

    if above goes well , it will deploy edge with existing configuration and response will be like this.

    created

    then user will have to go to the NSX UI and self sign the certificate or import the certificate. If the certificate was associated to an application profile, the user will have to do the same via UI.

     

  • Assigning User Permissions(RBAC)-NSX

    In this post, we will get into the NSX  Permission (Role Based Access control) configuration.

    Let’s go to NSX console from vSphere Client and from there Go to “Manage” -> “Users” -> Click on the green Plus button:

    8

    Here we can select if we want to map specific A/D user to NSX Role or A/D Group to Role.

    2

    Format to use is as – > “group_name”@domain.name. or. “user_name”@domain.name.

    Let’s start with a sample user “dave”, which should have been already created in our Active Directory, this user “dave” is required “Enterprise Administrator” permission, as he is going to manage our entire NSX environment. same way we can assign permission to other users with different permission needs.

    3

    Select one of the NSX Role, for “dave” user we chose “Enterprise Administrator”

    4

    Let’s Try our first login with user “dave”:

    6

     The login successful but there is no “Network & Security” tab , as user got the permission on the NSX but not on the vCenter.

    7

    So far we configure all NSX Manager part but we didnt take care of the vCenter Configuration permission for that user.

    Let’s configure vCenter permission, so that user can view Network & Security Tab:

    vCenter has its own Role for each group. We need to configure roles to etch A/D group/users to whom we want to assign permission. These settings determine what the user can create/access the in vCenter environment.

    Configure vCenter Roles:

    Let’s start by configure the Role for “dave”. We know this user is for “Enterprise Administrator” in the NSX Manager, so it will make sense to give this user “Network Administrator” to all other vCenter environment, so that he can manage network related components of vSphere also.

    Go to vCenter -> Manage -> Permissions and click the green button:

    8

    For our case choose “Network Administrator” is the Minimum.

    Select “Network Administrator” from the Assigned Role drop down list and click on the “Add” button from “User and Group”:

    9

    From the Domain Select your Domain name, in our lab the domain is “CORP”, choose your Active Directory user from the list (dave for this example) and click the “Add” button:

    10

    Click Ok and Ok for Next Step:

    11

    12

    Now we can try to login with “Dave” user: now Networking & Security is visible.

    13