Renaming an Oracle VM Guest Domain

This post provides simple steps necessary to rename a Oracle VM for SPARC Guest Domain

CAUTION: There is no way to simply rename an LDOM without performing a reboot of the guest domain.

  1. Confirm domain status
    # ldm list pinky
     pinky active -t—- 5000 8 16G 4.1% 12h 08m
  2. Stop the domain (for the purpose of this exercise my domain is named pinky)
    # ldm stop-domain pinky
    LDom pinky stopped
  3. Unbind the domain
    # ldm unbind pinky
  4. Save the guest domain configuration to an xml file
    # ldm list-constraints -x pinky > /var/tmp/pinky.xml
  5. Create a copy of the xml file (for this example our new domain will be named perky)
    # cp /var/tmp/pinky.xml /var/tmp/perky.xml
  6. Edit the new xml file and modify all references from pinky to perky
    <Content xsi:type=”ovf:VirtualSystem_Type” ovf:id="perky">
  7. Destroy the old guest domain
    # ldm destroy pinky

    Note: This will not destroy the file system contents, it simply removes the ldm configuration

  8. Create new perky LDom using the modified xml file
    # ldm add-domain -i /var/tmp/perky.xml
  9. Bind and start the new guest domain
    # ldm bind perky
    # ldm start perky
  10. Check guest domain status
    # ldm list
    NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME
    primary active -n-cv- UART 8 1G 2.6% 19d 7h 48m
    perky active -t—- 5000 8 16G 1.2% 4s
  11. Verify connection to new guest domain console
    primary# telnet localhost 5000
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is ‘^]'.
    
    Connecting to console "perky" in group "perky" ....
    Press ~? for control options ..
    
    {0} ok
    telnet> quit
    Connection to localhost closed.
    primary#

important Place the new LDom xml file in a safe place to avoid any problems when restoring configuration of the LDOM at a later date.