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.
- Confirm domain status
# ldm list pinky pinky active -t—- 5000 8 16G 4.1% 12h 08m
- Stop the domain (for the purpose of this exercise my domain is named pinky)
# ldm stop-domain pinky LDom pinky stopped
- Unbind the domain
# ldm unbind pinky
- Save the guest domain configuration to an xml file
# ldm list-constraints -x pinky > /var/tmp/pinky.xml
- 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
- Edit the new xml file and modify all references from pinky to perky
<Content xsi:type=”ovf:VirtualSystem_Type” ovf:id="perky">
- Destroy the old guest domain
# ldm destroy pinky
Note: This will not destroy the file system contents, it simply removes the ldm configuration
- Create new perky LDom using the modified xml file
# ldm add-domain -i /var/tmp/perky.xml
- Bind and start the new guest domain
# ldm bind perky # ldm start perky
- 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
- 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.