Creating an initial image for PowerVC

By Archive User posted Thu October 27, 2016 12:00 AM



Kenneth Burger

Sridhar Venkat

Stephen W.

Special thanks to Johnny Shieh for testing these steps for us!

Anyone familiar with PowerVC probably knows that you can use it to add an existing image to your environment and to deploy a virtual machine from an image, but where does that initial image come from? Today, we will discuss the “day 0” genesis case of creating the first virtual machine in your environment.  This virtual machine can then be used to install an operating system (OS) via an ISO, mksysb, or other method.   For this article, we will show you how to install an OS via an ISO image attached to this virtual machine. Let’s get started!

  1. Create a new cinder volume of the desired size in PowerVC.

    From the Home screen, select the “Storage Volumes” icon in the left navigation bar, then select the “create” (+) button to create a volume.

  2. Create an image from the volume.

    1. Select the “images” icon from the left navigation bar, then select “import”.

    2. Select the “add volume” icon on the bottom left, then select your volume from step 1, and click “Add.”

    3. Next, select “create” on the Import image page.

  3. Deploy a virtual machine with the image.

    From the “Images” page, select your newly created image, then select “Deploy.”

    You now have a blank VM ready for you to install an operating system onto it.

  4. Mount the ISO file onto the VIOS and boot volume for the virtual machine, then restart and install the operating system.

    Note: The VIOS commands below should be run as padmin or equivalent user authority.

    1. In the terminal on your system, use scp to copy the ISO image to the VIOS from the file directory on your system that contains the ISO file.

    2. $ scp RHEL-7.2-20151030.0-Server-ppc64-dvd1.iso padmin@9

    3. On the VIOS, use lsrep to check if there is a media repository for the ISO file.

    4. If there is not a media repository on the VIOS, use mkrep -sp rootvg -size 4G to create a new media repository for the ISO file.

      Note: Make sure rootvg has sufficient free space. The repository is typically set to 1024 Mb (1 GB), but you can use the chrep command to increase the amount of free space if necessary. For example, chrep -size 4G.

    5. On the VIOS, use mkvopt –name <name> -file <iso file name > to create a new virtual optical disk.

      $ mkvopt -name "myvopt" -file RHEL-7.2-20151030.0-Server-ppc64-dvd1.iso

    6. On your management console, view the list of logical partitions and identify the LPAR created by step 3. For example, on PowerVM NovaLink, use pvmctl lpar list to show the list of logical partitions.

      $ pvmctl lpar list

    7. On the VIOS, use lsmap –all, then get the vhost from the output.

      For our example, the LPAR ID is 5 (see step e). The Client Partition ID is the LPAR ID in hex, so we are interested in Client Partition ID 0x00000005, which is vhost0.

    8. On the VIOS, use mkvdev –fbo -vadapter <vhost of your lpar> to return the VTD name.

    9. On the VIOS, use loadopt –disk < vopt name> -vtd <vtd> to load the virtual DVD into the virtual DVD drive.

    10. Install the operating system.

      1. Restart the virtual machine. On NovaLink for example, restart the NovaLink partition by running pvmctl vm restart –i id=<LPAR ID>.

      2. Launch the console to the virtual machine usingmkvterm --id 5, then install an operating system.

      3. In the mkvterm console session, press ctrl+c to go to the SMS menu and use the following menu option choices to boot to a RHEL OS install image.

    Note: Input the following information when prompted by the install:

    5-Select Boot Options

    1-Select Install/Boot Device



    1-Under “Select media adapter”, select the SCSI CD-ROM that matches the selection above.

    2-Normal Boot Mode


    You will see this once you’ve successfully booted the RHEL virtual machine:

  5. Install cloud-init and prepare your virtual machine for capture. See the appropriate topic for instructions:

    Installing and configuring cloud-init on Linux

    Installing and configuring cloud-init on AIX

    Installing and configuring cloud-init on IBM i

    Preparing for Capture

  6. Log on to the PowerVC user interface, stop the virtual machine, and capture it.

  7. Once the initial virtual machine is captured, you may delete this virtual machine as well as the initial image created if you will not be repeating the steps to create additional installs.

Congratulations! Your image is ready for deployment!  If you have any questions, post them below.  And don’t forget to follow us on LinkedIn, Facebook, and Twitter!