Renaming an Oracle VM guest domain

A simple post providing the steps necessary to rename a guest domain

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

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

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

  8. Create new aries LDom using the modified xml file
    # ldm add-domain -i /var/tmp/aries.xml
  9. Bind and start the new guest domain
    # ldm bind aries
    # ldm start aries
  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
    aries 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 "aries" in group "aries" ....
    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.