It says here: https://learn.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-faq
That I can join a virtual machine scale set to an Azure AD domain, but I dont understand how you implement the JSON extension they state to use, I cant work out where I put it.
I have created the VMSS but cannot see an Extensions bit on it.
You can use script\dsc extensión as you normally would on a regular VM.
Sample DSC extensión:
{
"name": "Microsoft.Powershell.DSC",
"properties": {
"publisher": "Microsoft.Powershell",
"type": "DSC",
"typeHandlerVersion": "2.19",
"autoUpgradeMinorVersion": true,
"settings": {
"configuration": {
"url": "url_goes_here.ps1",
"script": "script.ps1",
"function": "function"
},
"configurationArguments": {
"domainName": "domain.name"
}
},
"protectedSettings": {
"configurationArguments": {
"adminCreds": {
"userName": "User",
"password": "Password"
}
}
}
}
}
Related
I am trying to get instanceview objects(VirtualMachineScaleSetInstanceViewInner) of all Azure's VirtualMachineScaleSets under a Subscription and this requires both ResourceGroup Name and Vmss name together.
azureResourceManager.virtualMachines().manager().serviceClient().getVirtualMachineScaleSets().getInstanceView(resourceGroupName, virtualMachineScaleSet.name(), Context.NONE);
How do I get specific VirtualMachineScaleSets under a ResourceGroup? I only see AzureResourceManager.ResourceGroups() and AzureResourceManager.virtualMachineScaleSets(), but nothing that gets virtualMachineScaleSets under a ResourceGroup.
Thanks
I have tried to get the VMSS instance in a Resource group by using the below RestApi:
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}?api-version=2022-08-01
output:
Body:
{
"name": "rajtestVMSS",
"id": "/subscriptions/*********/resourceGroups/abcaaaa/providers/Microsoft.Compute/virtualMachineScaleSets/rajtestVMSS",
"type": "Microsoft.Compute/virtualMachineScaleSets",
"location": "westus2",
"tags": {
"azsecpack": "nonprod",
"platformsettings.host_environment.service.platform_optedin_for_rootcerts": "true"
},
"sku": {
"name": "Standard_D2s_v3",
"tier": "Standard",
"capacity": 2
},
"properties": {
"singlePlacementGroup": false,
"upgradePolicy": {
"mode": "Manual"
},
"scaleInPolicy": {
"rules": [
"Default"
]
},
"virtualMachineProfile": {
"osProfile": {
"computerNamePrefix": "rajtestvm",
"adminUsername": "rajtest",
"windowsConfiguration": {
"provisionVMAgent": true,
"enableAutomaticUpdates": true,
"enableVMAgentPlatformUpdates": false
------------------
------------------
------------------
You can use the below java code to get the VirtualMachine ScaleSet instanceview for a ResourceGroup.
import com.azure.core.util.Context;
public final class Main {
public static void getAVirtualMachineScaleSet(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.virtualMachines()
.manager()
.serviceClient()
.getVirtualMachineScaleSets()
.getByResourceGroupWithResponse("myResourceGroup", "myVirtualMachineScaleSet", null, Context.NONE);
}
}
Thanks to #XiaofeiCao for the github link to know more about Azure Resource Manager client library for Java.
I was successfully able to connect to my local machine using File System Linked Service. But now, when I am trying to access a folder from a network drive using a similar approach, I am unable to proceed. Please can anyone tell me where am I going wrong ?
The below is the working version when connected from my local machine.
{
"name": "Test_FileSystem",
"type": "Microsoft.DataFactory/factories/linkedservices",
"properties": {
"annotations": [],
"type": "FileServer",
"typeProperties": {
"host": "D:\\AZURE_FS",
"userId": "<xxx#org.com>",
"encryptedCredential": "eyJDcmVkZW50aWFsSWQiOiI0ZDYwMWI1Yi02YmI3LTRlN2YtOTBmYi0xNmIzZjI1MzQ3ZjciLC=="
},
"connectVia": {
"referenceName": "IR-FS-DEV",
"type": "IntegrationRuntimeReference"
}
}
}
However, when I use a similar approach and try connecting to a network drive,my connection is failing.
{
"name": "NetworkDrive_LS",
"type": "Microsoft.DataFactory/factories/linkedservices",
"properties": {
"annotations": [],
"type": "FileServer",
"typeProperties": {
"host": "\\\\<host>:<port>\\SD\\AZURE_FS",
"userId": "<userid>",
"encryptedCredential": "eyJDcmVkZW50aWFsSW=="
},
"connectVia": {
"referenceName": "ServerIR-VM",
"type": "IntegrationRuntimeReference"
}
} }
Also,I am using a Self Hosted IR. Is there something I am doing wrong? My error is as below :
File path \\<host>:<port>\SD\AZURE_FS is not supported. Check the configuration to make sure the path is valid. The given path's format is not supported.
Looks like I found my mistake -
As per the example from the documentation
{
"name": "FileLinkedService",
"properties": {
"type": "FileServer",
"typeProperties": {
"host": "<host>",
"userid": "<domain>\\<user>",
"password": {
"type": "SecureString",
"value": "<password>"
}
},
"connectVia": {
"referenceName": "<name of Integration Runtime>",
"type": "IntegrationRuntimeReference"
}
}
}
I changed to add the domain for the userid and also removed the port number. That solved.
{
"name": "NetworkDrive_LS",
"type": "Microsoft.DataFactory/factories/linkedservices",
"properties": {
"annotations": [],
"type": "FileServer",
"typeProperties": {
"host": "\\\\<host>\\SD\\AZURE_FS",
"userId": "<domain>\\<user>",
"encryptedCredential": "eyJDcmVkZW50aWFsSWQiOiIwY=="
},
"connectVia": {
"referenceName": "ServerIR-VM",
"type": "IntegrationRuntimeReference"
}
}
}
I am trying to pass a user credential to my DSC script via arm template.Its seem template is not passing credential correctly to the dsc.
DSC and MOF
Thanks
Here's whats working for me. Powershell:
Param(
[System.Management.Automation.PSCredential]$Admincreds,
xxx
)
xxx
Arm template:
"properties": {
"publisher": "Microsoft.Powershell",
"type": "DSC",
"typeHandlerVersion": "2.20",
"autoUpgradeMinorVersion": true,
"settings": {
"configuration": {
"url": "https://url.zip",
"script": "file.ps1",
"function": "configuration"
},
"configurationArguments": {
"param": "something"
}
},
"protectedSettings": {
"configurationArguments": {
"adminCreds": {
"userName": "actualusername",
"password": "actualpassword"
}
}
}
}
I'm trying to transfer some data to Azure Search, but for some reason it fails with Invalid linked service reference. Name: AzureSearch1
I have set up an Azure Search Linked Service like this:
{
"name": "AzureSearch1",
"properties": {
"type": "AzureSearch",
"typeProperties": {
"url": "https://xxxxxx.search.windows.net",
"key": {
"type": "AzureKeyVaultSecret",
"store": {
"referenceName": "AzureKeyVault",
"type": "LinkedServiceReference"
},
"secretName": "Search-AdminKey"
}
},
"connectVia": {
"referenceName": "integrationRuntime1",
"type": "IntegrationRuntimeReference"
}
}
}
"Test connection" works fine.
Now, I'm trying to create an Azure Search Indexer like this:
{
"name": "AzureSearchIndex_PriceSheet",
"properties": {
"linkedServiceName": {
"referenceName": "AzureSearch1",
"type": "LinkedServiceReference"
},
"type": "AzureSearchIndex",
"typeProperties": {
"indexName": "pricesheet"
}
}
}
but it fails when I click "Preview Data" or "Import Schema" with this error:
Invalid linked service reference. Name: AzureSearch1. Activity ID:2fa29fe9-ca5d-4308-af62-xxxxxxxxx
The integration pipeline is set to "West Europe" and Azure Search in provisioned in that region too.
Any thoughts?
Thanks!
I tried to reproduce your issue but failed.Please refer to my working configuration:
My Azure Search Linked Service:
{
"name": "AzureSearch1",
"properties": {
"type": "AzureSearch",
"typeProperties": {
"url": "https://***.search.windows.net",
"key": {
"type": "AzureKeyVaultSecret",
"store": {
"referenceName": "AzureKeyVault1",
"type": "LinkedServiceReference"
},
"secretName": "testas"
}
}
},
"type": "Microsoft.DataFactory/factories/linkedservices"
}
My Azure Search Indexer:
{
"name": "AzureSearchIndex1",
"properties": {
"linkedServiceName": {
"referenceName": "AzureSearch1",
"type": "LinkedServiceReference"
},
"folder": {
"name": "azureSearch"
},
"type": "AzureSearchIndex",
"typeProperties": {
"indexName": "documentdb-index"
}
},
"type": "Microsoft.DataFactory/factories/datasets"
}
Perview Data:
I presumed it may because the secret which is stored in AKV has expired,then the link lost connection.I suggest you re-creating secret in AKV(just set default configuration) and try again.
Hope it helps you.Any concern,let me know.
I have an ARM template which deploys multiple Azure VMs with the following images:
"SQL2008R2SP3-WS2008R2SP1",
"SQL2012SP4-WS2012R2",
"SQL2014SP2-WS2012R2",
"SQL2016SP2-WS2016",
"SQL2017-WS2016"
The SQLIaaS VM Extension is not leaving the SQL Server in SQL Authentication mode, and not creating the SQL Authentication account. Otherwise everything else works fine. Here's the snippet for the SQLIaaS part of the ARM template. Any ideas why SQL Auth is not being set up?
{
"apiVersion": "2015-06-15",
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(parameters('virtualMachineName'), copyIndex(1), '/SqlIaasExtension')]",
"location": "[parameters('location')]",
"condition": "[parameters('deploySqlIaasExtension')]",
"tags": {
"displayName": "SQLIaas VM Extension"
},
"dependsOn": [
"[concat(parameters('virtualMachineName'),copyIndex(1))]",
"[concat('Microsoft.Storage/storageAccounts','/', variables('storageNameSQLBackups'))]"
],
"copy": {
"name": "virtualMachineExtensionsGroup",
"count": "[parameters('sqlServerCount')]"
},
"properties": {
"type": "SqlIaaSAgent",
"publisher": "Microsoft.SqlServer.Management",
"typeHandlerVersion": "1.2",
"autoUpgradeMinorVersion": "true",
"settings": {
"AutoTelemetrySettings": {
"Region": "[parameters('location')]"
},
"AutoPatchingSettings": {
"PatchCategory": "WindowsMandatoryUpdates",
"Enable": true,
"DayOfWeek": "Sunday",
"MaintenanceWindowStartingHour": "0",
"MaintenanceWindowDuration": "240"
},
"AutoBackupSettings": {
"Enable": true,
"RetentionPeriod": "[parameters('sqlAutobackupRetentionPeriod')]",
"EnableEncryption": false,
"BackupSystemDbs": "[parameters('backupSystemDbs')]"
},
"ServerConfigurationsManagementSettings": {
"SQLConnectivityUpdateSettings": {
"ConnectivityType": "Public",
"Port": "[parameters('sqlPortNumber')]"
},
"SQLWorkloadTypeUpdateSettings": {
"SQLWorkloadType": "General"
},
"AdditionalFeaturesServerConfigurations": {
"IsRServicesEnabled": "false"
}
},
"protectedSettings": {
"SQLAuthUpdateUserName": "[parameters('sqlAuthenticationLogin')]",
"SQLAuthUpdatePassword": "[parameters('sqlAuthenticationPassword')]"
}
}
}
}
I never got to the bottom of this, but it's working now. Not sure if that helps anyone but I wanted to answer the question.