First of all don't arbitrarilly change the zonepath to the zone name when creating zones. Most of the tools assume the uuid is being used. But if you do ignore everyones advice and do it. This is how you can correct it.
- Shutdown the zone:
vmadm stop <zone_uuid>
- Backup and clone the file system
zfs snapshot -r zones@pre_restore zfs clone zones/<old_name>@pre_restore zones/<zone_uuid> zfs clone -o mountpoint=/zones/<zone_uuid>/cores zones/cores/<old_name>@pre_restore zones/cores/<zone_uuid>
- Backup the files in /etc/zones/
- Fix the contents in /etc/zones/<old_name></old_name>.xml and copy them to new file <zone_uuid></zone_uuid>.xml
- Edit the /etc/zones/index file. Replace the instances of <old_name></old_name> with <zone_uuid></zone_uuid>
- Checks
vmadm get 3dc016bc-eff3-4e0b-9357-0a62b7ac1e57 | json zonename zonepath zfs_filesystem prstat -Z zlogin <zone_uuid></zone_uuid> vmadm create-snapshot \<zone_uuid\></zone_uuid\> post_zonepath_change
- Reboot Server