Virtual Machine Template
The VirtualMachineTemplates resource definition. Uses Azure REST API version 2023-04-01-preview. In version 2.x of the Azure Native provider, it used API version 2022-05-21-preview. Other available API versions: 2022-05-21-preview, 2023-10-07, 2024-06-01. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native scvmm [ApiVersion]
. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.
Example Usage
CreateVirtualMachineTemplate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineTemplate = new AzureNative.ScVmm.VirtualMachineTemplate("virtualMachineTemplate", new()
{
ExtendedLocation = new AzureNative.ScVmm.Inputs.ExtendedLocationArgs
{
Name = "/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.Arc/customLocations/contoso",
Type = "customLocation",
},
Location = "East US",
ResourceGroupName = "testrg",
Uuid = "aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
VirtualMachineTemplateName = "HRVirtualMachineTemplate",
VmmServerId = "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.SCVMM/VMMServers/ContosoVMMServer",
});
});
package main
import (
scvmm "github.com/pulumi/pulumi-azure-native-sdk/scvmm/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := scvmm.NewVirtualMachineTemplate(ctx, "virtualMachineTemplate", &scvmm.VirtualMachineTemplateArgs{
ExtendedLocation: &scvmm.ExtendedLocationArgs{
Name: pulumi.String("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.Arc/customLocations/contoso"),
Type: pulumi.String("customLocation"),
},
Location: pulumi.String("East US"),
ResourceGroupName: pulumi.String("testrg"),
Uuid: pulumi.String("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
VirtualMachineTemplateName: pulumi.String("HRVirtualMachineTemplate"),
VmmServerId: pulumi.String("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.SCVMM/VMMServers/ContosoVMMServer"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.scvmm.VirtualMachineTemplate;
import com.pulumi.azurenative.scvmm.VirtualMachineTemplateArgs;
import com.pulumi.azurenative.scvmm.inputs.ExtendedLocationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var virtualMachineTemplate = new VirtualMachineTemplate("virtualMachineTemplate", VirtualMachineTemplateArgs.builder()
.extendedLocation(ExtendedLocationArgs.builder()
.name("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.Arc/customLocations/contoso")
.type("customLocation")
.build())
.location("East US")
.resourceGroupName("testrg")
.uuid("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee")
.virtualMachineTemplateName("HRVirtualMachineTemplate")
.vmmServerId("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.SCVMM/VMMServers/ContosoVMMServer")
.build());
}
}
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:scvmm:VirtualMachineTemplate HRVirtualMachineTemplate /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}
Properties
The Azure API version of the resource.
Gets or sets computer name.
Gets or sets the disks of the template.
Gets or sets a value indicating whether to enable dynamic memory or not.
Gets or sets the max dynamic memory for the vm.
Gets or sets the min dynamic memory for the vm.
The extended location.
Gets or sets the generation for the vm.
Gets or sets the inventory Item ID for the resource.
Gets or sets a value indicating whether the vm template is customizable or not.
Gets highly available property.
Gets or sets a value indicating whether to enable processor compatibility mode for live migration of VMs.
Gets or sets the network interfaces of the template.
Gets or sets the provisioning state.
The system data.
ARM Id of the vmmServer resource in which this resource resides.