AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only
Expand all | Collapse all

Has anyone setup a "Test AIX LPAR" on IBM Cloud?

  • 1.  Has anyone setup a "Test AIX LPAR" on IBM Cloud?

    Posted 2 days ago

    Although I was "ended" by IBM in 2024, I want to keep my AIX skills updated, as I'm still looking for a new position. It seems I can get  a Virtual server instance with AIX for $118/month, with storage Tier 3 (3 IOPs / GB), 200GB at $20/month. I've never setup an LPAR on the cloud, and am hoping others have done so, and can advise of any gotchas I should think of. I don't want to get over $150/month, as it is likely that I'll never recoup this cost :-)

    Thanks, in advance for any input!



    ------------------------------
    Jan Harris
    AIX & Security Support Engineer | Escalations, KCS & Technical Writing | Driving Process Improvement
    Austin, TX
    ------------------------------


  • 2.  RE: Has anyone setup a "Test AIX LPAR" on IBM Cloud?

    Posted 2 days ago

    Jan,

    Hi there, very sorry to hear that IBM have "ended" you, they're missing out for sure!!

    Ok, PowerVS, yep we've been setting up some LPARs (AIX, IBMi) so more than happy to help where I can.  How far have you got, what are you wanting to achieve?

    Let me know.

    All the best, Steve



    ------------------------------
    Steve Munday
    AIX, IBMi, HMC, PowerVM, PowerVS, Ansible automation engineering
    ------------------------------



  • 3.  RE: Has anyone setup a "Test AIX LPAR" on IBM Cloud?

    Posted 2 days ago

    Hi Steve  - THANKS!

    I got far enough to get an estimate for a virtual instance with 200GB storage. I was not sure if I needed to add the shared resource pool. Honestly, this will probably be a low usage LPAR. Running some Toolbox updates, security configuration, PowerSC if the AIX image is Enterprise. some script and app development, etc.  The intent is to be up to date to date on latest levels, and not get rusty. I'm applying for ANY job I can qualify for, including system admin. My dev and dev support positions did not require a lot of consistent sys admin, so it has been a while since that was my primary focus. 



    ------------------------------
    Jan Harris
    AIX Development Support (Liaison to the AIX Toolbox for Open Source)
    IBM (Contract)
    Austin
    ------------------------------



  • 4.  RE: Has anyone setup a "Test AIX LPAR" on IBM Cloud?

    Posted 20 hours ago
    Edited by Steve Munday 20 hours ago

    Hi Jan,

    @Ralf Schmidt-Dannert is quite correct, you can right-size your config as you wish and, as he says, you're billed for your CURRENT configuration -- compute and storage.

    Here's the list of IBM supplied (AIX) images on offer from the drop down (NOTE: I had to redact a couple of non-IBM supplied entries).

    When you initially define the LPAR you get a 20GB boot LUN thrown in as part of the deal however you can add more as needed -- either during the initial build or afterwards.  Here's an example where I've added two extra 50GB LUNs which will be created during the build.

    As an aside:

    • Tier 0 (25 IOPS/GB) 50GB LUN ~$12 USD/month
    • Tier 1 (10 IOPS/GB) 50GB LUN ~$10 USD/month
    • Tier 3 (3 IOPS/GB) 50GB LUN ~$5 USD/month

     

    I built the above configuration and after it booted I see the following on the console (automatically provided by noVNC)

    I then did an alt_disk_copy to clone rootvg to hdisk0 before re-booting, here's what I now see (boot LUN now 00c0a4f183b1201e).

    I then powered down the LPAR and deleted it from PowerVS whilst 'retaining' the (extra) two LUNS -- of which hdisk0 (00c0a4f183b1201e) is the current boot disk of the LPAR being deleted.

    Once deleted, I created a new LPAR and added back the two "extra" (50GB) LUNs from the original LPAR.  After the initial build/boot we see that whilst there's a "spare" 20GB hdisk2 (comes with the image) we actually booted from the 50GB clone (00c0a4f183b1201e) of the original rootvg, nice as that saves a change to the bootlist and another re-boot.

    So, you can

    • Build an LPAR, include however many extra LUN(s) you need
    • Clone rootvg to one of the extra LUNs
    • Re-boot to the cloned LUN
    • Make all the updates/changes you like
    • Run all your tests

    When you're done

    • Power off the LPAR
    • Delete the LPAR [NOTE: Deleting is important as that stops the big $'s from being spent] HOWEVER "keep" the extra LUN(s) (at a minimal monthly cost) as this will safeguard all your hard work for when you want to temporarily build a new LPAR using the "saved" LUNs.

     

    @Nigel Griffiths has loads of great videos on PowerVS here https://www.youtube.com/channel/UCgE9X6PQy5D7zx30Gsz8e3w.

    All the best, Steve



    ------------------------------
    Steve Munday
    AIX, IBMi, HMC, PowerVM, PowerVS, Ansible automation engineering
    ------------------------------



  • 5.  RE: Has anyone setup a "Test AIX LPAR" on IBM Cloud?

    Posted 2 days ago

    Jan,

    setting up a LPAR in PowerVS is very simple and "GUI" driven.

    Assuming you have your IBM Cloud account with funding, then you'd create a workspace - basically defines what data center your LPAR will be deployed into.

    Then, in that workspace, you create your LPAR.

    I assume you are planning to use a public IP for access - so don't forget to set that check mark.

    Cheapest server is S922.

    From a cost perspective an uncapped sharedCPU  LPAR is most cost efficient. If one CPU equivalent processing power is sufficient, you'd specify 0.25 cores and that will give you 1 VP. So, guarantee is you get 0.25 cores, but your LPAR can utilize a full core if unused CPU resources are available. If you need more than 1 core, then you'd specify 1.25 cores for 2 VP.

    On the storage side tier 3 is least costly, but it will slow down LPAR deployment as well as AIX processing with the limit of 3 IOPS / GB and AIX deployment images are quite small.

    PowerVS provides several AIX images to select from for your deploy. Linux on Power is an option as well!

    To minimize costs over time you could "skinny down CPU and Memory" - dynamic ! - when you don't need the LPAR - weekend,... - and resize again when needed.

    You are billed for what is your current configuration, even if the LPAR is shut down!

    Hope this helps.



    ------------------------------
    Ralf Schmidt-Dannert
    ------------------------------



  • 6.  RE: Has anyone setup a "Test AIX LPAR" on IBM Cloud?

    Posted 2 days ago

    Thanks, Ralf! Do you know if the AIX image is Enterprise level? I would like to install PowerSC if possible. I've been trying to determine if I will be able to install AIX 7.1.5 then do an alt disk migration. Getting help from Watson is futile, so I have been poring over docs to figure out what bare minimum I can start with, and what I can add when the time comes....



    ------------------------------
    Jan Harris
    AIX Development Support (Liaison to the AIX Toolbox for Open Source)
    IBM (Contract)
    Austin
    ------------------------------



  • 7.  RE: Has anyone setup a "Test AIX LPAR" on IBM Cloud?

    Posted 2 days ago

    If you look at  the available images AIX 7.1 TL5 SP9 is available for deploy ... AIX 7.1 is quite old so.

    Re PowerSC - I do not know if packages are included in the image or what the licensing terms in PowerVS are for that licensable feature.



    ------------------------------
    Ralf Schmidt-Dannert
    ------------------------------



  • 8.  RE: Has anyone setup a "Test AIX LPAR" on IBM Cloud?

    Posted 2 days ago

    Great question Jan. I too am interested in this. I explored this option maybe a year back or two and opened an account so that I can create a test, or a POC, but navigating through IBMs web sites sometimes is a challenge in itself. And with that said, I pretty much gave up and to go back in one day. 

    In contrast to Amazon's free trials, I was able to learn the AWS management console relatively quickly and created 3 working Linux servers with storage and networking I can access from work to play with.  All that plus I had extra time to do other cool stuff before the trial expired. I hope I could say the same with IBM offerings. 

    My goal for a free trial is to setup a POC for a simple disaster-recovery style in the cloud using a mksysb image.  Some of the things I'm interested to test is network and storage performance among other things.

    Please update us in your quest. I'm interested and will follow. 



    ------------------------------
    Angel Bugarin
    ------------------------------



  • 9.  RE: Has anyone setup a "Test AIX LPAR" on IBM Cloud?

    Posted 2 days ago

    I must agree. WatsonX has not been helpful in most of my efforts. I actually got more guidance from Gemini :-/ 

    I will let you know how far I get, and what it cost!



    ------------------------------
    Jan Harris
    AIX Development Support (Liaison to the AIX Toolbox for Open Source)
    IBM (Contract)
    Austin
    ------------------------------



  • 10.  RE: Has anyone setup a "Test AIX LPAR" on IBM Cloud?

    Posted 18 hours ago

    I think this $2000 promo credit is still going on: https://community.ibm.com/community/user/blogs/stephanie-wing1/2025/02/07/try-ibm-powervs-for-free

    In PowerVS you pay for CPU and memory regardless of whether the VSI is running or not. In addition to Steve's method of retaining the volumes on delete, you could also capture the VSI as an image to the image catalog. That copies the SAN volumes into a re-deployable image. You could then delete the VSI. When the VSI is deleted you only pay for the volumes that comprise the image, and to make sure the image is as inexpensive as possible you can change the volumes to tier 3 before capturing the image. You can do this in the GUI, but if you have a lot of volumes or want to avoid all the clicking you can use a script like this.

    Note: That when you have multiple bootable disks like @Steve Munday did, or if you capture multiple bootable disks into an image and deploy it, historically you've not been guaranteed which disk it will actually boot from on first boot. The new LPAR does not have any memory of the boot order in SMS and the LPAR would scan the virtual fibre channel buses for bootable disks and boot from the first one it finds. After the partition is booted you could change the bootlist in AIX or reboot and go into SMS to do it. In PowerVC, which PowerVS is built on we used to attach the image boot disk first followed by the additional disks so the disk scan would find the image's boot disk first rather than one in "extra volumes". Given that I was surprised to see Steve's VSI booted from the 50GB disk. 



    ------------------------------
    Samuel Matzek
    ------------------------------



  • 11.  RE: Has anyone setup a "Test AIX LPAR" on IBM Cloud?

    Posted 17 hours ago

    Samuel,

    Hi, yes I was surprised, too, as I didn't expect the "replacement" VSI to use one of the 50GB LUNs to boot from.  Clearly, I was "lucky"!!

    I like the idea of grabbing the image of the LUN where one has added LPPs, rpms, etc., as that keeps things nice a clean by removing the "complete" VSI, including all the LUNs (after the image has been grabbed, naturally).

    Many thanks, Steve



    ------------------------------
    Steve Munday
    AIX, IBMi, HMC, PowerVM, PowerVS, Ansible automation engineering
    ------------------------------



  • 12.  RE: Has anyone setup a "Test AIX LPAR" on IBM Cloud?

    Posted 16 hours ago

    Hi Jan,

    if you want to save some money and don't need LPAR 100% time, just from time to time, I would propose to deploy your LPAR using Terraform. It makes it easier for you to deploy it when you need it and then destroy it when you don't need it anymore.

    All you need are:

    • Terraform (https://developer.hashicorp.com/terraform/install)
    • API key for your account (https://cloud.ibm.com/iam/apikeys)

    Now you need to create a single configuration file or you can create multiple files in one directory.

    First you must define the Terraform providers to use:

    terraform {
      required_providers {
        ibm = {
          source = "IBM-Cloud/ibm"
        }
        local = {
          source = "hashicorp/local"
        }
        null = {
          source = "hashicorp/null"
        }
      }
    }
    
    provider "ibm" {
        ibmcloud_api_key = var.ibmcloud_apikey
        region = var.ibmcloud_region
        zone = var.ibmcloud_zone
    }

    The next step is to create variables:

    variable "ibmcloud_apikey" {
        type = string
        description = "API key to use for IBM Cloud"
        default = "your-api-key"
        sensitive = true
    }
    
    variable "ibmcloud_region" {
        type = string
        description = "Region in IBM Cloud"
        default = "mad"
    }
    
    variable "ibmcloud_zone" {
        type = string
        description = "Zone in IBM Cloud"
        default = "mad02"
    }

    Paste your API key into the variable, and set the region. As you see, I use Madrid.

    To create an LPAR in PowerVS you need a workspace:

    data "ibm_resource_group" "cloudrg" {
      name = "Default"
    }
    
    resource "ibm_pi_workspace" "jan_power_ws" {
      pi_name = "Jan Power workspace"
      pi_datacenter = var.ibmcloud_zone
      pi_resource_group_id = data.ibm_resource_group.cloudrg.id
      pi_plan = "public"
    }

    The workspace must be in some resource group. The Default resource group is the standard.

    You need a network for your LPAR. I think you want to access the LPAR from your home. In this case you need a public network:

    resource "ibm_pi_network" "pubnet" {
      pi_network_name = "public-net"
      pi_network_type = "pub-vlan"
      pi_dns = [ "8.8.8.8" ]
      pi_network_mtu = "1450"
      pi_cloud_instance_id = ibm_pi_workspace.jan_power_ws.id
    }

    To access the LPAR you must upload your SSH key to PowerVS:

    resource "ibm_pi_key" "jan_ssh" {
      pi_key_name          = "jan_ssh_key"
      pi_ssh_key           = file("~/.ssh/id_rsa.pub")
      pi_cloud_instance_id = ibm_pi_workspace.jan_power_ws.id
    }

    Of course, you need a specific AIX version. AFAIU you want to have AIX 7.1 TL5 SP9. We can search for it in IBM's catalog and if it is found, we create a local copy of the image:

    data "ibm_pi_catalog_images" "pvs_catalog" {
      pi_cloud_instance_id = ibm_pi_workspace.jan_power_ws.id
    }
    
    locals {
      img_index = index(data.ibm_pi_catalog_images.pvs_catalog.images[*].name, "7100-05-09")
      pvs_image = data.ibm_pi_catalog_images.pvs_catalog.images[local.img_index]
    }
    
    resource "ibm_pi_image" "aix710509" {
      pi_image_id          = local.pvs_image.image_id
      pi_cloud_instance_id = ibm_pi_workspace.jan_power_ws.id
    }

    If you wish additional storage you can define it too:

    resource "ibm_pi_volume" "datavg" {
      pi_volume_size = 20
      pi_volume_name = "datavg"
      pi_volume_type = "tier1"
      pi_volume_shareable = true
      pi_cloud_instance_id = ibm_pi_workspace.jan_power_ws.id
    }
    
    resource "ibm_pi_volume_attach" "datavg_lpar_attach" {
      pi_volume_id = ibm_pi_volume.datavg.volume_id
      pi_instance_id = ibm_pi_instance.lpar.instance_id
      pi_cloud_instance_id = ibm_pi_workspace.jan_power_ws.id
    }

    The storage must be attached to an LPAR.

    resource "ibm_pi_instance" "lpar" {
        pi_instance_name      = "jan-aix"
        pi_memory             = 2
        pi_processors         = 0.25
        pi_proc_type          = "shared"
        pi_image_id           = ibm_pi_image.aix710509.image_id
        pi_key_pair_name      = ibm_pi_key.jan_ssh.ssh_key_id
        pi_sys_type           = "s922"
        pi_cloud_instance_id  = ibm_pi_workspace.jan_power_ws.id
        pi_health_status      = "WARNING"
        pi_storage_type       = "tier1"
        pi_network {
            network_id = ibm_pi_network.pubnet.network_id
        }
    }

    After the LPAR is deployed, we must check the SSH connection and do some initial configuration like installing DNF:

    resource "null_resource" "configure_lpar" {
      connection {
        host = ibm_pi_instance.lpar.pi_network[0].external_ip
        user = "root"
        private_key = file("~/.ssh/id_rsa")
        agent = "false"
        timeout = "10m"
      }
    
      provisioner "file" {
        source = "openssl-3.0.15.1001.tar.Z"
        destination = "/tmp/openssl.tar.Z"
      }
    
      provisioner "remote-exec" {
        inline = [
          "set -v",
          "set -o errexit",
          "chdev -l en0 -a mtu=1476",
          "chfs -a size=1G /tmp",
          "chfs -a size=2G /opt",
          "chfs -a size=2G /var",
          "mkdir /tmp/openssl",
          "while [[ ! -f /tmp/openssl.tar.Z ]] ; do sleep 1 ; done",
          "cd /tmp/openssl",
          "uncompress -c /tmp/openssl.tar.Z | tar xf -",
          "installp -acgXYd . all",
          "cd /",
          "rm -rf /tmp/openssl*",
          "updtvpkg",
          "/usr/opt/perl5/bin/lwp-download https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/ezinstall/ppc/dnf_aixtoolbox.sh",
          "chmod +x dnf_aixtoolbox.sh",
          "./dnf_aixtoolbox.sh -y",
          "/opt/freeware/bin/dnf -y update",
          "ln -s /opt/freeware/bin/dnf /usr/bin/dnf",
          "echo 'done!'",
        ]
      }
    }

    I hope I didn't forget to post something important. At this point you can provision your LPAR in PowerVS:

    terraform init
    terraform plan
    terraform apply

    If you don't need it anymore, or some problems occurred, you can destroy all deployed resources:

    terraform destroy



    ------------------------------
    Andrey Klyachkin

    https://www.power-devops.com
    ------------------------------