sigs.k8s.io/cluster-api-provider-azure@v1.14.3/docs/book/src/topics/vm-diagnostics.md (about) 1 # VM Diagnostics 2 3 This document describes how configure the VM Diagnostics options in Azure. 4 5 The VM Diagnostics allow you to configure options for troubleshooting the startup of an Azure Virtual Machine. 6 You can use this feature to investigate boot failures for custom or platform images. 7 8 For more information on this feature, see [here](https://learn.microsoft.com/azure/virtual-machines/boot-diagnostics#boot-diagnostics-view). 9 10 ## Configuring Diagnostics 11 12 Boot Diagnostics for the VM can enabled, disabled, and configured based on user preference to be either managed by Azure or managed independently by the user. 13 Here is a description of the feature's fields and the available configuration options for them: 14 ```yaml 15 kind: AzureMachineTemplate 16 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 17 metadata: 18 name: "${CLUSTER_NAME}-control-plane" 19 spec: 20 template: 21 spec: 22 [...] 23 diagnostics: # defines a diagnostics configuration block 24 boot: # defines a boot diagnostics configuration block 25 storageAccountType: Managed | UserManaged | Disabled # defaults to Managed for backwards compatibility 26 userManaged: # This is only valid to be set when the account type is UserManaged. 27 storageAccountURI: "<your-storage-URI>" 28 ``` 29 30 ## Example 31 32 The below example shows how to enable boot diagnostics and configure a Managed (by Azure) storage for them. 33 34 ```yaml 35 kind: AzureMachineTemplate 36 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 37 metadata: 38 name: "${CLUSTER_NAME}-control-plane" 39 spec: 40 template: 41 spec: 42 [...] 43 diagnostics: 44 boot: 45 storageAccountType: Managed # defaults to Managed for backwards compatibility 46 ``` 47 48 The below example shows how to enable boot diagnostics and configure user-managed storage (with a custom Storage URI) for them. 49 ```yaml 50 kind: AzureMachineTemplate 51 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 52 metadata: 53 name: "${CLUSTER_NAME}-control-plane" 54 spec: 55 template: 56 spec: 57 [...] 58 diagnostics: 59 boot: 60 storageAccountType: UserManaged 61 userManaged: 62 storageAccountURI: "<your-storage-URI>" 63 ``` 64 65 The below example shows how to disable boot diagnostics. 66 ```yaml 67 kind: AzureMachineTemplate 68 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 69 metadata: 70 name: "${CLUSTER_NAME}-control-plane" 71 spec: 72 template: 73 spec: 74 [...] 75 diagnostics: 76 boot: 77 storageAccountType: Disabled 78 ```