Details
diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-domain-clustered.cli b/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-domain-clustered.cli
index d75dd70..21fe61b 100644
--- a/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-domain-clustered.cli
+++ b/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-domain-clustered.cli
@@ -440,10 +440,10 @@ if (outcome == failed) of /profile=$clusteredProfile/subsystem=keycloak-server/s
end-if
# Migrate from 4.2.0 to 4.3.0
-if (outcome == failed) of /subsystem=keycloak-server/spi=hostname/:read-resource
+if (outcome == failed) of /profile=$clusteredProfile/subsystem=keycloak-server/spi=hostname/:read-resource
echo Adding spi=hostname...
- /subsystem=keycloak-server/spi=hostname/:add(default-provider=request)
- /subsystem=keycloak-server/spi=hostname/provider=fixed/:add(properties={hostname => "localhost",httpPort => "-1",httpsPort => "-1"},enabled=true)
+ /profile=$clusteredProfile/subsystem=keycloak-server/spi=hostname/:add(default-provider=request)
+ /profile=$clusteredProfile/subsystem=keycloak-server/spi=hostname/provider=fixed/:add(properties={hostname => "localhost",httpPort => "-1",httpsPort => "-1"},enabled=true)
echo
end-if
diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-domain-standalone.cli b/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-domain-standalone.cli
index d0af97a..56b676c 100644
--- a/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-domain-standalone.cli
+++ b/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-domain-standalone.cli
@@ -397,10 +397,10 @@ if (outcome == failed) of /profile=$standaloneProfile/subsystem=keycloak-server/
end-if
# Migrate from 4.2.0 to 4.3.0
-if (outcome == failed) of /subsystem=keycloak-server/spi=hostname/:read-resource
+if (outcome == failed) of /profile=$standaloneProfile/subsystem=keycloak-server/spi=hostname/:read-resource
echo Adding spi=hostname...
- /subsystem=keycloak-server/spi=hostname/:add(default-provider=request)
- /subsystem=keycloak-server/spi=hostname/provider=fixed/:add(properties={hostname => "localhost",httpPort => "-1",httpsPort => "-1"},enabled=true)
+ /profile=$standaloneProfile/subsystem=keycloak-server/spi=hostname/:add(default-provider=request)
+ /profile=$standaloneProfile/subsystem=keycloak-server/spi=hostname/provider=fixed/:add(properties={hostname => "localhost",httpPort => "-1",httpsPort => "-1"},enabled=true)
echo
end-if