You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Migrate/Migrate.Autorest/custom/Helper/AzLocalCommonSettings.ps1
+10-4Lines changed: 10 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -101,7 +101,7 @@ $VMwareToolsStatus = @{
101
101
NotInstalled="NotInstalled";
102
102
}
103
103
104
-
$OsType=@{
104
+
$OsTypes=@{
105
105
LinuxGuest="linuxguest";
106
106
WindowsGuest="windowsguest";
107
107
OtherGuestFamily="otherguestfamily";
@@ -111,8 +111,14 @@ $VmReplicationValidationMessage = "Replication could not be initiated. Please en
111
111
$VmReplicationValidationMessages=@{
112
112
VmPoweredOff="The VM is currently powered off. $VmReplicationValidationMessage";
113
113
AlreadyInReplication="The VM is already in replication. $VmReplicationValidationMessage";
114
-
VmWareToolsNotInstalled="VMware tools not installed on VM. $VmReplicationValidationMessage";
115
-
VmWareToolsNotRunning="VMware tools not running on VM. $VmReplicationValidationMessage";
116
114
VmNotHighlyAvailable="VM not highly available. $VmReplicationValidationMessage";
117
-
OsTypeNotFound="Hyper-V Integration Services not running on VM. $VmReplicationValidationMessage";
115
+
HyperVIntegrationServicesNotRunning="Hyper-V Integration Services are not running on VM. $VmReplicationValidationMessage";
116
+
VmWareToolsNotInstalled="VMware Tools are not installed on the VM. To preserve static IPs during migration, install VMware Tools and wait up to 30 minutes for the system to detect the changes.";
117
+
VmWareToolsNotRunning="VMware Tools are not running on the VM. To preserve static IPs during migration, ensure VMware Tools are running and wait up to 30 minutes for the system to detect the changes.";
118
+
OsTypeNotSupported="The VM OS type could not be identified. For custom Windows or Linux builds, run: `Set-AzMigrateLocalServerReplication -TargetObjectID <ProtectedItemId> -OsType <OsType>` to specify the OS type before migration.";
119
+
}
120
+
121
+
$ArcResourceBridgeValidationMessages=@{
122
+
NotRunning="Arc Resource Bridge is offline. To continue, bring the Arc Resource Bridge online. Wait a few minutes for the status to update and retry.";
123
+
NoClusters="There are no Azure Local clusters found in the selected resource group."
-ErrorMessage "VMware vCenter '$vCenterName' not found in resource group '$vCenterResourceGroupName' and site '$vCenterSiteName'."
315
+
316
+
$runAsAccountId=$vmwareVCenter.RunAsAccountId
317
+
}
318
+
}
319
+
else
320
+
{
321
+
throw"Unsupported site type '$SiteType'. Only Hyper-V and VMware sites are supported."
322
+
}
323
+
324
+
if ([string]::IsNullOrEmpty($runAsAccountId)) {
325
+
throw"Unable to determine RunAsAccount for site '$SiteName' from machine '$MachineName'. Please verify your appliance setup."
238
326
}
239
327
240
328
# Validate the VM
@@ -266,6 +354,9 @@ function New-AzMigrateLocalServerReplication {
266
354
"Name"=$replicationVaultName
267
355
} `
268
356
-ErrorMessage "No Replication Vault '$replicationVaultName' found in Resource Group '$ResourceGroupName'. Please verify your Azure Migrate project setup."
357
+
if ($replicationVault.Property.ProvisioningState-ne [ProvisioningState]::Succeeded) {
358
+
throw"The Replication Vault '$replicationVaultName' is not in a valid state. The provisioning state is '$($replicationVault.Property.ProvisioningState)'. Please verify your Azure Migrate project setup."
@@ -420,38 +511,17 @@ function New-AzMigrateLocalServerReplication {
420
511
throw"The replication extension '$replicationExtensionName' is not in a valid state. The provisioning state is '$($replicationExtension.Property.ProvisioningState)'. Re-run the Initialize-AzMigrateLocalReplicationInfrastructure command."
0 commit comments