Boot virtual machine by using vOPT

You can boot a virtual machine by using a virtual target device (vOPT) that is created within the VIOS and is mapped to a specific ISO image in the repository.

Perform the following steps to boot a virtual machine with an ISO image by using vOPT.

  1. Create the initial image in PowerVC.
  2. Deploy a blank virtual machine with the required capacity.
  3. Download the ISO image on the local machine by using the following command:
    wget   <iso downable link> 
  4. Use the Secure Copy Protocol (SCP) to transfer the ISO image to the VIOS.
  5. Perform the following steps on NovaLink or HMC to check the LPAR ID and to open the console page:
    NovaLink
    1. List the logical partitions (LPARs) on the system by using the following command:
      pvmctl lpar list 

      Note the ID (lpar_id) that is displayed for the required LPAR.

    2. Open a virtual terminal session for the required LPAR by using the following command:
      mkvterm --id <lpar_id> 
    HMC
    1. Login to HMC.
    2. Get the LPAR ID and the IP address of the VIOS by using the following commands:
      lssyscfg -r sys -F name ======> to get the machine name 
      
      lssyscfg -r lpar -m "<MANAGEMENT_HOST_NAME>" -F lpar_id,name,state,rmc_ipaddr,rmc_state ==========> to get the lpar_id
    3. Open a virtual terminal session by using the following command:
      vtmenu
    4. Select the server in the displayed screen.
    5. Select the LPAR for the selected server in the displayed screen.

    The LPAR ID is a hexadecimal number in NovaLink or HMC.

  6. Login to VIOS and run the following VIOS commands:
    1. Create a virtual media repository of required capacity that is used to store the ISO image by using the following command:
      mkrep -sp rootvg -size <CAPACITY>
      This command creates a repository with rootvg as the storage pool.
      Note: It is not required to create a virtual media repository if another virtual media repository is available to be used to download the ISO image.
    2. List the images that are available in the repository by using the following command:
      lsrep
    3. Check information about the loaded images in the virtual media repository by using the following command:
      lsvopt
    4. If required, increase the capacity of the virtual media repository by using the following command:
      chrep -size <increased_capacity>
    5. Initiate the Original Equipment Manufacturer (OEM) setup and installation environment by using the following command:
      oem_setup_env
    6. Copy the downloaded ISO image in the home directory of VIOS.
    7. Validate the message digest for the ISO image with the MD5 algorithm by using the following command:
      csum -h MD5 <ISO_FILE_NAME> 
    8. Create a virtual optical media named <POWERVC_ISO> where the specified ISO file is copied:
      mkvopt -name "POWERVC_ISO" -file <ISO_FILE_NAME> -ro 
    9. Display the server virtual adapter name and the client partition ID for all the virtual devices by using the following command:
      lsmap -all -field SVSA clientid
    10. Create a virtual optical device, which is mapped to the specified virtual host by using the following command:
      mkvdev -fbo -vadapter <VHOST_OF_LPAR>
    11. Load the ISO image into the virtual optical device that is created in the previous step by using the following command:
      loadopt -disk  <POWERVC_ISO> -vtd <VOPT_ID>
    12. Display the mapping of the virtual host by using the following command:
      lsmap -vadapter <VHOST_OF_LPAR>
      Note: Make a note of the LUN ID. The LUN ID is used to boot the virtual machine.
    13. Repeat the steps from 6.i to 6.l for all the controllers for PowerVC ISO.
  7. Reboot the virtual machine. In the System Management Services (SMS) menu, select Select Install/Boot Device > CD/DVD > SCSI > Select LAN to boot the virtual machine.

Remove the virtual media disks and repositories

After the virtual machine is booted with the ISO image, the virtual media disks and repositories that were used for the boot operation must be removed.

Perform the following steps to remove the virtual media disks and repositories:
  1. Unload the virtual media disk by using the following command:
    unloadopt -vtd <VOPT_ID> 
    
    or
    
    unloadopt -vtd <VOPT_ID> -release
  2. Perform the following steps to remove the virtual machine library
    1. Unmap the virtual media disk from the virtual hosts by using the following command:
      rmvdev -vtd <VOPT_ID>
    2. Remove the virtual media disks from the virtual media repository by using the following command:
      rmvopt -name <VOPT_ID>
Note: The default username is pvcroot and the default password is abcd1234.

Configure network of the booted virtual machine

You must use the chpvc network add command to configure the network of the booted virtual machine. For more information, see chpvc Command.

Add the configured Domain Name System (DNS) by using the chpvc network_dns command. Set the Fully Qualified Domain Name (FQDN) or the short host name by using the chpvc hostname modify command.

Create an inventory by using the powervc-opsmgr inventory command. For more information, see Create inventory and configure the virtual machine. For more information about the powervc-opsmgr inventory command, see powervc-opsmgr inventory Command.

Configure PowerVC operations manager utility by using the powervc-opsmgr configure command. For more information, see powervc-opsmgr configure Command.