Hello! I'm using azure-native's `VirtualMachineRun...
# azure
a
Hello! I'm using azure-native's
VirtualMachineRunCommandByVirtualMachine
and get this error:
Copy code
Code="OperationNotAllowed" Message="The property 'runCommands' is not valid because the 'Microsoft.Compute/RunCommandPreview' feature is not enabled for this subscription."
b
can you open a github issue in the provider repo for this? https://github.com/pulumi/pulumi-azure-native/
we generate our SDK directly from the upstream APIs so if it's outdated, it'd be a surprise 😄
t
Based on https://github.com/Azure/azure-sdk-for-go/issues/14493
Microsoft confirmed, that the Microsoft.Compute/RunCommandPreview feature is no longer used/available.
This resource uses
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}
defined in the API version 2021-03-01
Is Microsoft suggesting this API is outdated?
a
The relevant part of Microsoft's response was:
You shared with me the following error:
"error: autorest/azure: Service returned an error. Status=nil
Code='OperationNotAllowed' Message='The property 'runCommands' is not valid because the 'Microsoft.Compute/RunCommandPreview' feature is not enabled for this subscription.'".
 
This error suggests that this job is looking for the Run Command feature under the Preview features for the subscription, however it is now out of public preview.
Since this Job is being ran using the Pulumi third party software, it is possible the job is outdated regarding the state of the Run Command Feature, since Pulumi itself is not supported by Microsoft support I suggested opening a request with their support.
t
Do you have a relevant ARM template or something like that with a “supported” tool?
a
No, not currently using ARM templates
Would ARM template be a workaround for this?
t
If you find a working ARM template, I’ll figure out how to translate it to Pulumi
t
And does it work? I think it’s exactly the same resource that you’ve been trying….
a
No clue. Nobody in our org has experience writing and deploying ARM templates. That's one of the reasons we hoped to use Pulumi. Is running powershell commands on Windows VMs not that common via Pulumi?