Go to main content

Oracle® OpenBoot 4.x Administration Guide

Exit Print View

Updated: June 2020

Create a Device Alias

Virtual machines have predefined device aliases for the most commonly used devices, however, you can create, modify, and examine aliases with the devalias command. User-defined aliases are lost after a reset or power cycle, but you can create a persistent alias by storing the devalias command in the NVRAMRC script. You can enter the devalias command in the script either manually, or by using the nvalias command. For more details, see Customizing Start-Up with NVRAMRC.

This procedure uses the nvalias command.

Displays current aliases.
devalias alias
Displays the device path name that corresponds to the alias.
devalias alias device-path
Defines an alias representing device-path. If an alias with the same name already exists, the new value supersedes the old.

Note -  The alias is lost upon the next reset or power cycle. Use the nvalias command to create a persistent device alias.

nvalias alias device-path
Creates a nonvolatile device alias by adding the devalias command line into the NVRAMRC script. For details, see NVRAMRC Editor Commands.

Note -  The use-nvramrc? variable is automatically set to true when the nvalias command is used.

  1. Access the OpenBoot CLI.

    See Accessing the OpenBoot CLI and Getting Help.

  2. View the current device aliases.
    {0} ok devalias
    screen                   /pci@300/pci@4/display@0
    fallback-miniroot        /pci@300/pci@2/usb@0/hub@3/storage@1/disk@0
    rcdrom                   /pci@300/pci@2/usb@0/hub@3/storage@1/disk@0
    primary-vds0             /virtual-devices@100/channel-devices@200/virtual-disk-server@0
    primary-vsw0             /virtual-devices@100/channel-devices@200/virtual-network-switch@0
    primary-vcc0             /virtual-devices@100/channel-devices@200/virtual-console-concentrator@0
    net3                     /pci@300/pci@3/network@0,1
    net2                     /pci@300/pci@3/network@0
    cdrom                    /pci@300/pci@2/usb@0/hub@8/device@1/storage@0/disk@0
    net1                     /pci@300/pci@1/network@0,1
    net                      /pci@300/pci@1/network@0
    net0                     /pci@300/pci@1/network@0
    scsi                     /pci@301/pci@2/scsi@0
    scsi0                    /pci@301/pci@2/scsi@0
    disk7                    /pci@301/pci@2/scsi@0/disk@p7
    disk6                    /pci@301/pci@2/scsi@0/disk@p6
    disk5                    /pci@301/pci@2/scsi@0/disk@p5
    disk4                    /pci@301/pci@2/scsi@0/disk@p4
    disk3                    /pci@301/pci@2/scsi@0/disk@p3
    disk2                    /pci@301/pci@2/scsi@0/disk@p2
    disk1                    /pci@301/pci@2/scsi@0/disk@p1
  3. Create the device alias.

    This example uses the nvalias command to create a persistent device alias.

    {0} ok nvalias my_device /pci@301/pci@2/scsi@0/disk@w5000cca123456789,0:a

    If the NVRAMRC script was successfully modified, but use-nvramrc? is false, the command sets use-nvramrc? to true.

  4. Verify the device alias.

    For example:

    {0} ok devalias my_device
    my_device                /pci@301/pci@2/scsi@0/disk@w5000cca123456789,0:a
  5. Verify that the use-nvramrc? variable is set to true.

    For example:

    {0} ok printenv use-nvramrc?
    use-nvramrc? =          true

Related Information