Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cmd/kola/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func init() {
sv(&kola.AzureOptions.Sku, "azure-sku", "alpha", "Azure image sku/channel (default \"alpha\"")
sv(&kola.AzureOptions.Version, "azure-version", "", "Azure image version")
sv(&kola.AzureOptions.Location, "azure-location", "westus", "Azure location (default \"westus\"")
sv(&kola.AzureOptions.Size, "azure-size", "Standard_DS2_v2", "Azure machine size (default \"Standard_DS2_v2\")")
sv(&kola.AzureOptions.Size, "azure-size", "Standard_D2s_v5", "Azure machine size")
sv(&kola.AzureOptions.HyperVGeneration, "azure-hyper-v-generation", "V1", "Azure Hyper-V Generation (\"V1\" or \"V2\")")
sv(&kola.AzureOptions.VnetSubnetName, "azure-vnet-subnet-name", "", "Use a pre-existing virtual network for created instances. Specify as vnet-name/subnet-name. If subnet name is omitted then \"default\" is assumed")
bv(&kola.AzureOptions.UseGallery, "azure-use-gallery", false, "Use gallery image instead of managed image")
Expand All @@ -129,6 +129,7 @@ func init() {
sv(&kola.AzureOptions.ResourceGroupBasename, "azure-resource-group-basename", "kola-cluster", "Prefix used for creating new resource groups")
sv(&kola.AzureOptions.AvailabilitySet, "azure-availability-set", "", "Deploy instances with an existing availibity set")
sv(&kola.AzureOptions.KolaVnet, "azure-kola-vnet", "", "Pass the vnet/subnet that kola is being ran from to restrict network access to created storage accounts")
bv(&kola.AzureOptions.EnableTPM, "azure-enable-tpm", true, "Enable the vTPM feature for test VMs. Can be \"true\" or \"false\".")
sv(&kola.AzureOptions.VMIdentity, "azure-vm-identity", "", "Assign a managed identity to the VM by name (will be looked up for its ID)")

// do-specific options
Expand Down
12 changes: 6 additions & 6 deletions kola/tests/misc/tpm.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ func init() {
register.Register(&register.Test{
Run: runRootTPMCryptenroll,
ClusterSize: 0,
Platforms: []string{"qemu"},
Platforms: []string{"qemu", "azure"},
Name: "cl.tpm.root-cryptenroll",
Distros: []string{"cl"},
MinVersion: semver.Version{Major: 3913, Minor: 0, Patch: 1},
Expand All @@ -261,7 +261,7 @@ func init() {
register.Register(&register.Test{
Run: runRootTPMCryptenrollPcrNoUpdate,
ClusterSize: 0,
Platforms: []string{"qemu"},
Platforms: []string{"qemu", "azure"},
Name: "cl.tpm.root-cryptenroll-pcr-noupdate",
Distros: []string{"cl"},
MinVersion: semver.Version{Major: 3913, Minor: 0, Patch: 1},
Expand All @@ -272,7 +272,7 @@ func init() {
register.Register(&register.Test{
Run: runRootTPMCryptenrollPcrWithUpdate,
ClusterSize: 0,
Platforms: []string{"qemu"},
Platforms: []string{"qemu", "azure"},
Name: "cl.tpm.root-cryptenroll-pcr-withupdate",
Distros: []string{"cl"},
MinVersion: semver.Version{Major: 3913, Minor: 0, Patch: 1},
Expand All @@ -284,7 +284,7 @@ func init() {
register.Register(&register.Test{
Run: runRootTPM,
ClusterSize: 0,
Platforms: []string{"qemu"},
Platforms: []string{"qemu", "azure"},
Name: "cl.tpm.root",
Distros: []string{"cl"},
MinVersion: semver.Version{Major: 3913, Minor: 0, Patch: 1},
Expand All @@ -296,7 +296,7 @@ func init() {
register.Register(&register.Test{
Run: runNonRootTPM,
ClusterSize: 0,
Platforms: []string{"qemu"},
Platforms: []string{"qemu", "azure"},
Name: "cl.tpm.nonroot",
Distros: []string{"cl"},
MinVersion: semver.Version{Major: 3913, Minor: 0, Patch: 1},
Expand All @@ -305,7 +305,7 @@ func init() {
register.Register(&register.Test{
Run: eventLogTest,
ClusterSize: 0,
Platforms: []string{"qemu"},
Platforms: []string{"qemu", "azure"},
Name: "cl.tpm.eventlog",
Distros: []string{"cl"},
MinVersion: semver.Version{Major: 4082},
Expand Down
5 changes: 5 additions & 0 deletions platform/api/azure/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@ func (a *API) getVMParameters(name, sshkey string, userdata *conf.Conf, ip *armn
},
},
},
SecurityProfile: &armcompute.SecurityProfile{
UefiSettings: &armcompute.UefiSettings{
VTpmEnabled: &a.Opts.EnableTPM,
},
},
DiagnosticsProfile: &armcompute.DiagnosticsProfile{
BootDiagnostics: &armcompute.BootDiagnostics{
Enabled: to.Ptr(true),
Expand Down
3 changes: 3 additions & 0 deletions platform/api/azure/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ type Options struct {
ResourceGroupBasename string
// AvailabilitySet is an existing availability set to deploy the instance in.
AvailabilitySet string
// Enable vTPM feature for TPM / SecureBoot / Trusted Boot related tests.
// The field name mirrors the QEMU config.
EnableTPM bool
// VMIdentity is the name of a managed identity to assign to the VM.
VMIdentity string
}
Loading