Recreating a deleted OVM Server guest
By Owen Allen-Oracle on Jan 17, 2013
I got a question from an Ops Center user:
"I created an OVM Server (aka LDOM) guest through the Ops Center UI, but it got deleted by accident. It's been recreated by hand with the same configuration, vdsdev, vnic, vdisk names, everything. Is there a way to 'import' it into Ops Center, so that it can be migrateable within a server pool, without reprovisioning it again?"
As long as the control domain is healthy, you can do this.
First, you run a deployment plan to re-create just the OVM Server Container, using all of the same properties (disk, network, etc.) as when it was first created. A normal guest deployment uses a deployment plan to set up the container and an OS profile to complete the guest; in this case you're just doing the first half of that process. Make sure that the guest doesn't exist and that no vdiskdev has been created. Once you've created the container, it will be in the 'installing' state, ready for provisioning.
Next, you do the following on the control domain, in order to boot the OS in the new container:
# ldm set-var boot-device=disk:a <guest name>
# ldm set-var boot-command=boot <guest name>
# ldm stop <guest name>
# ldm start <guest name>
Finally, you have to unconfigure and reconfigure the Agent in the guest. You can do this manually, or using the Add Asset option in the UI. Once you've done that, the OS will be running in the new container, and will be fully migrateable.