If we want to rename our guest ldom, we need to do following things :
We can't straight away change our ldom name with a single command, once a ldom is bind and started all its resources are linked with respect to ldom's name.
So to rename a ldom , firstly we need to stop, unbind it and then we need to remove it.
Then using it's constraints file we can add the domain with its new name.
Following are the steps :
1. Take a fresh backup of constraints for your ldom. (It should be a xml file)
ldm ls-constraints -x testldm >> /tmp/testldm.xml (where testldm is old LDom)
2. Replace the ldom name with it's new name in the file.
vi /tmp/testldm.xml (Replace the old Ldom with new Ldom)
3. Stop,unbind and remove the domain.
ldm stop testldm
ldm unbind testldm
ldm remove-domain testldm
4. Remove the disks assigned to this particular ldom.
ldm list-bindings | grep -i testldm| more (Will list all vdisk names)
ldm remove-vdsdev testldm_disk_1EF3@primary-vds0
ldm remove-vdsdev testldm-1323@primary-vds0
ldm remove-vdsdev testldm-1264@primary-vds0
5. Now there is no info related to old ldom, so proceed by adding ldom with new name using our bkp of constraints file.
ldm add-domain -i /tmp/testldm.xml
ldm bind myprod (where myprod is the new LDom)
ldm start myprod
root@RRLT5DVQA:~# ldm ls | grep myprod
myprod active -t---- 5003 16 32G 1.2% 1.6% 6s
Thus we can rename a ldom by following above steps.
################################################################################
We can't straight away change our ldom name with a single command, once a ldom is bind and started all its resources are linked with respect to ldom's name.
So to rename a ldom , firstly we need to stop, unbind it and then we need to remove it.
Then using it's constraints file we can add the domain with its new name.
Following are the steps :
1. Take a fresh backup of constraints for your ldom. (It should be a xml file)
ldm ls-constraints -x testldm >> /tmp/testldm.xml (where testldm is old LDom)
2. Replace the ldom name with it's new name in the file.
vi /tmp/testldm.xml (Replace the old Ldom with new Ldom)
3. Stop,unbind and remove the domain.
ldm stop testldm
ldm unbind testldm
ldm remove-domain testldm
4. Remove the disks assigned to this particular ldom.
ldm list-bindings | grep -i testldm| more (Will list all vdisk names)
ldm remove-vdsdev testldm_disk_1EF3@primary-vds0
ldm remove-vdsdev testldm-1323@primary-vds0
ldm remove-vdsdev testldm-1264@primary-vds0
5. Now there is no info related to old ldom, so proceed by adding ldom with new name using our bkp of constraints file.
ldm add-domain -i /tmp/testldm.xml
ldm bind myprod (where myprod is the new LDom)
ldm start myprod
root@RRLT5DVQA:~# ldm ls | grep myprod
myprod active -t---- 5003 16 32G 1.2% 1.6% 6s
Thus we can rename a ldom by following above steps.
################################################################################
No comments:
Post a Comment