forked from MicrosoftDocs/azure-docs-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvm.pycliyml
More file actions
1649 lines (1649 loc) · 65.7 KB
/
vm.pycliyml
File metadata and controls
1649 lines (1649 loc) · 65.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
commandList:
- name: az vm availability-set
description: Group resources into availability sets for high-availability requirements.
href: vm/availability-set
isGroup: true
- name: az vm availability-set convert
description: Convert an Azure Availability Set to contain VMs with managed disks.
href: vm/availability-set#convert
- name: az vm availability-set create
description: Create an Azure Availability Set.
href: vm/availability-set#create
- name: az vm availability-set delete
description: Delete an availability set.
href: vm/availability-set#delete
- name: az vm availability-set list
description: Lists all availability sets in a resource group.
href: vm/availability-set#list
- name: az vm availability-set list-sizes
description: Lists all available virtual machine sizes that can be used to create a new virtual machine in an existing availability set.
href: vm/availability-set#list-sizes
- name: az vm availability-set show
description: Retrieves information about an availability set.
href: vm/availability-set#show
- name: az vm availability-set update
description: Update an Azure Availability Set.
href: vm/availability-set#update
- name: az vm boot-diagnostics
description: Troubleshoot the start up of an Azure Virtual Machine.
href: vm/boot-diagnostics
isGroup: true
- name: az vm boot-diagnostics disable
description: Disable the boot diagnostics on a VM.
href: vm/boot-diagnostics#disable
- name: az vm boot-diagnostics enable
description: Enable the boot diagnostics on a VM.
href: vm/boot-diagnostics#enable
- name: az vm boot-diagnostics get-boot-log
description: Get the boot diagnostics log from a VM.
href: vm/boot-diagnostics#get-boot-log
- name: az vm capture
description: Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs.
href: vm#capture
- name: az vm convert
description: Convert a VM with unmanaged disks to use managed disks.
href: vm#convert
- name: az vm create
description: Create an Azure Virtual Machine.
href: vm#create
- name: az vm deallocate
description: Shuts down the virtual machine and releases the compute resources.
href: vm#deallocate
- name: az vm delete
description: The operation to delete a virtual machine.
href: vm#delete
- name: az vm diagnostics
description: Configure the Azure Virtual Machine diagnostics extension.
href: vm/diagnostics
isGroup: true
- name: az vm diagnostics get-default-config
description: Show the default config file which defines data to be collected.
href: vm/diagnostics#get-default-config
- name: az vm diagnostics set
description: Configure the Azure VM diagnostics extension.
href: vm/diagnostics#set
- name: az vm disk
description: Manage the managed data disks attached to a VM.
href: vm/disk
isGroup: true
- name: az vm disk attach
description: Attach a managed disk.
href: vm/disk#attach
- name: az vm disk detach
description: ''
href: vm/disk#detach
- name: az vm encryption
description: Manage encryption of VM disks.
href: vm/encryption
isGroup: true
- name: az vm encryption disable
description: Disable disk encryption on OS disk, Data disks, or both.
href: vm/encryption#disable
- name: az vm encryption enable
description: Enable disk encryption on OS disk, Data disks, or both.
href: vm/encryption#enable
- name: az vm encryption show
description: Show the encryption status.
href: vm/encryption#show
- name: az vm extension
description: Extend the functionality of your VMs with extensions.
href: vm/extension
isGroup: true
- name: az vm extension delete
description: The operation to delete the extension.
href: vm/extension#delete
- name: az vm extension image
description: Find the available VM extensions for your subscription and region.
href: vm/extension/image
isGroup: true
- name: az vm extension image list
description: Vm extension image list.
href: vm/extension/image#list
- name: az vm extension image list-names
description: Gets a list of virtual machine extension image types.
href: vm/extension/image#list-names
- name: az vm extension image list-versions
description: Gets a list of virtual machine extension image versions.
href: vm/extension/image#list-versions
- name: az vm extension image show
description: Gets a virtual machine extension image.
href: vm/extension/image#show
- name: az vm extension list
description: List the extensions attached to a VM in a resource group.
href: vm/extension#list
- name: az vm extension set
description: Create/update extensions for a VM in a resource group.
href: vm/extension#set
- name: az vm extension show
description: The operation to get the extension.
href: vm/extension#show
- name: az vm format-secret
description: Format secrets to be used in az vm create --secrets.
href: vm#format-secret
- name: az vm generalize
description: Sets the state of the virtual machine to generalized.
href: vm#generalize
- name: az vm get-instance-view
description: Get information about a VM including instance information (powerState).
href: vm#get-instance-view
- name: az vm image
description: Virtual machine images that are available in the Azure Marketplace.
href: vm/image
isGroup: true
- name: az vm image list
description: List the VM images available in the Azure Marketplace.
href: vm/image#list
- name: az vm image list-offers
description: List the VM image offers available in the Azure Marketplace.
href: vm/image#list-offers
- name: az vm image list-publishers
description: List the VM image publishers available in the Azure Marketplace.
href: vm/image#list-publishers
- name: az vm image list-skus
description: List the VM image skus available in the Azure Marketplace.
href: vm/image#list-skus
- name: az vm image show
description: Show a VM image available in the Azure Marketplace.
href: vm/image#show
- name: az vm list
description: List information about Virtual Machines.
href: vm#list
- name: az vm list-ip-addresses
description: Get IP addresses from one or more Virtual Machines.
href: vm#list-ip-addresses
- name: az vm list-sizes
description: Lists all available virtual machine sizes for a subscription in a location.
href: vm#list-sizes
- name: az vm list-usage
description: Gets, for the specified location, the current compute resource usage information as well as the limits for compute resources under the subscription.
href: vm#list-usage
- name: az vm list-vm-resize-options
description: Lists all available virtual machine sizes to which the specified virtual machine can be resized.
href: vm#list-vm-resize-options
- name: az vm nic
description: Manage network interfaces, see also 'az network nic'.
href: vm/nic
isGroup: true
- name: az vm nic add
description: Add network interface configurations to the virtual machine.
href: vm/nic#add
- name: az vm nic list
description: List network interface configurations attached to a virtual machine.
href: vm/nic#list
- name: az vm nic remove
description: Remove network interface configurations from the virtual machine.
href: vm/nic#remove
- name: az vm nic set
description: Replace existing network interface configurations on the virtual machine.
href: vm/nic#set
- name: az vm nic show
description: Show details of a network interface configuration attached to a virtual machine.
href: vm/nic#show
- name: az vm open-port
description: Opens a VM to inbound traffic on specified ports by adding a security rule to the network security group (NSG) that is attached to the VM's network interface (NIC) or subnet.
href: vm#open-port
- name: az vm redeploy
description: The operation to redeploy a virtual machine.
href: vm#redeploy
- name: az vm resize
description: Update VM size.
href: vm#resize
- name: az vm restart
description: The operation to restart a virtual machine.
href: vm#restart
- name: az vm show
description: Show details of a VM.
href: vm#show
- name: az vm start
description: The operation to start a virtual machine.
href: vm#start
- name: az vm stop
description: The operation to power off (stop) a virtual machine.
href: vm#stop
- name: az vm unmanaged-disk
description: Manage the unmanaged data disks attached to a VM.
href: vm/unmanaged-disk
isGroup: true
- name: az vm unmanaged-disk attach
description: Attach an unmanaged disk.
href: vm/unmanaged-disk#attach
- name: az vm unmanaged-disk detach
description: ''
href: vm/unmanaged-disk#detach
- name: az vm unmanaged-disk list
description: List disks for a Virtual Machine.
href: vm/unmanaged-disk#list
- name: az vm update
description: Update the properties of a VM.
href: vm#update
- name: az vm user
description: Manage a user account on a VM.
href: vm/user
isGroup: true
- name: az vm user delete
description: Remove a user(not supported on Windows VM).
href: vm/user#delete
- name: az vm user reset-ssh
description: Reset the SSH configuration on a VM.
href: vm/user#reset-ssh
- name: az vm user update
description: Update or Add(only on Linux VM) users.
href: vm/user#update
- name: az vm wait
description: Place the CLI in a waiting state until a condition of the VM is met.
href: vm#wait
htmlId: vm
examples: []
source:
remote:
path: src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_help.py
branch: master
repo: https://github.com/Azure/azure-cli.git
children:
- commandList: []
htmlId: capture
examples:
- title: Process to deallocate, generalize, and capture a stopped virtual machine
code: >-
az vm deallocate -g MyResourceGroup -n MyVm
az vm generalize -g MyResourceGroup -n MyVm
az vm capture -g MyResourceGroup -n MyVm --vhd-name-prefix MyPrefix
- title: The process to deallocate, generalize, and capture multiple stopped virtual machines.
code: >-
vms_ids=$(az vm list -g MyResourceGroup --query "[].id" -o tsv)
az vm deallocate --ids ${vms_ids}
az vm generalize --ids ${vms_ids}
az vm capture --ids ${vms_ids} --vhd-name-prefix MyPrefix
parameters:
- name: --name -n
isRequired: True
summary: The name of the Virtual Machine. You can configure the default using az configure --defaults vm=<name>.
description: ''
- name: --resource-group -g
isRequired: True
summary: Name of resource group. You can configure the default group using az configure --defaults group=<name>.
description: ''
- name: --vhd-name-prefix
isRequired: True
summary: The VHD name prefix specify for the VM disks.
description: ''
- name: --overwrite
isRequired: False
summary: Overwrite the existing disk file.
description: ''
defaultValue: True
- name: --storage-container
isRequired: False
summary: The storage account container name to save the disks.
description: ''
defaultValue: vhds
- name: --debug
isRequired: False
summary: Increase logging verbosity to show all debug logs.
description: ''
- name: --help -h
isRequired: False
summary: Show this help message and exit.
description: ''
- name: --output -o
isRequired: False
summary: Output format.
description: ''
defaultValue: json
parameterValueGroup: json, jsonc, table, tsv
- name: --query
isRequired: False
summary: JMESPath query string. See <a href="http://jmespath.org/">http://jmespath.org/</a> for more information and examples.
description: ''
- name: --verbose
isRequired: False
summary: Increase logging verbosity. Use --debug for full debug logs.
description: ''
source:
remote:
path: src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_help.py
branch: master
repo: https://github.com/Azure/azure-cli.git
children: []
uid: az_vm_capture
name: az vm capture
description: For an end-to-end tutorial, see <a href="https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-capture-image">https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-capture-image</a>.
summary: Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs.
Metadata: {}
- commandList: []
htmlId: convert
examples:
- title: Convert a VM with unmanaged disks to use managed disks.
code: az vm convert -g MyResourceGroup -n MyVm
- title: Convert VM with unmanaged disks to managed by Ids
code: az vm convert --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv)
parameters:
- name: --name -n
isRequired: True
summary: The name of the Virtual Machine. You can configure the default using az configure --defaults vm=<name>.
description: ''
- name: --resource-group -g
isRequired: True
summary: Name of resource group. You can configure the default group using az configure --defaults group=<name>.
description: ''
- name: --debug
isRequired: False
summary: Increase logging verbosity to show all debug logs.
description: ''
- name: --help -h
isRequired: False
summary: Show this help message and exit.
description: ''
- name: --output -o
isRequired: False
summary: Output format.
description: ''
defaultValue: json
parameterValueGroup: json, jsonc, table, tsv
- name: --query
isRequired: False
summary: JMESPath query string. See <a href="http://jmespath.org/">http://jmespath.org/</a> for more information and examples.
description: ''
- name: --verbose
isRequired: False
summary: Increase logging verbosity. Use --debug for full debug logs.
description: ''
source:
remote:
path: src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_help.py
branch: master
repo: https://github.com/Azure/azure-cli.git
children: []
uid: az_vm_convert
name: az vm convert
description: ''
summary: Convert a VM with unmanaged disks to use managed disks.
Metadata: {}
- commandList: []
htmlId: create
examples:
- title: Create a simple Ubuntu VM with automatic SSH authentication.
code: az vm create -n MyVm -g MyResourceGroup --image UbuntuLTS
- title: Create a simple Windows Server VM with a private IP address.
code: >-
az vm create -n MyVm -g MyResourceGroup
--public-ip-address "" --image Win2012R2Datacenter
- title: Create a VM from a custom managed image (see `az image create` for generation information).
code: az vm create -g MyResourceGroup -n MyVm --image MyImage
- title: Create a VM by attaching to a specialized managed operating system disk.
code: az vm create -g MyResourceGroup -n MyVm --attach-os-disk MyOsDisk --os-type linux
- title: Create an Ubuntu Linux VM and provide a cloud-init script (https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init).
code: az vm create -g MyResourceGroup -n MyVm --image debian --custom_data MyCloudInitScript.yml
- title: Create a Linux VM with SSH key authentication, add a public DNS entry, and then add it to an existing virtual network and availability set.
code: az vm create -n MyVm -g MyResourceGroup --image <linux image from 'az vm image list'> --vnet-name MyVnet --subnet subnet1 --availability-set MyAvailabilitySet --public-ip-address-dns-name MyUniqueDnsName --ssh-key-value "<ssh-rsa-key, key-file-path or not specified for default-key-path>"
- title: Create a simple Ubuntu Linux VM with a public IP address, DNS entry, 2 data disk(10GB, 20GB), and then generate ssh key pairs under ~/.ssh.
code: az vm create -n MyVm -g MyResourceGroup --public-ip-address-dns-name MyUniqueDnsName --image ubuntults --data-disk-sizes-gb 10 20 --size Standard_DS2_v2 --generate-ssh-keys
- title: Create an Debian VM and with Key Vault secrets. The secrets are placed in /var/lib/waagent and each certificate file is named with the hex thumbprint.
code: "az keyvault certificate create --vault-name vaultname -n cert1 -p \"$(az keyvault certificate get-default-policy)\"\n \n secrets=$(az keyvault secret list-versions --vault-name vaultname -n cert1 --query \"[?attributes.enabled].id\" -o tsv)\n \n vm_secrets=$(az vm format-secret -s \"$secrets\") \n \n az vm create -g group-name -n vm-name --admin-username deploy --image debian --secrets \"$vm_secrets\""
parameters:
- name: --name -n
isRequired: True
summary: Name of the virtual machine.
description: ''
- name: --resource-group -g
isRequired: True
summary: Name of resource group. You can configure the default group using az configure --defaults group=<name>.
description: ''
- name: --attach-os-disk
isRequired: False
summary: Attach an existing OS disk to the VM. Can use the name or ID of a managed disk or the URI to an unmanaged disk VHD.
description: ''
- name: --availability-set
isRequired: False
summary: Name or ID of an existing availability set to add the VM to. None by default.
description: ''
- name: --custom-data
isRequired: False
summary: Custom init script file or text (cloud-init, cloud-config, etc..).
description: ''
- name: --image
isRequired: False
summary: The name of the operating system image (URN alias, URN, Custom Image name or ID, or VHD Blob URI). In many cases, this parameter is required, but can be replaced by others (for example, --attach-os-disk).
description: >-
URN aliases: CentOS, CoreOS, Debian, openSUSE, RHEL, SLES, UbuntuLTS, Win2008R2SP1, Win2012Datacenter, Win2012R2Datacenter.
Example URN: MicrosoftWindowsServer:WindowsServer:2012-R2-Datacenter:latest
Example Custom Image Resource ID or Name: /subscriptions/subscription-id/resourceGroups/MyResourceGroup/providers/Microsoft.Compute/images/MyImage
Example URI: http://<storageAccount>.blob.core.windows.net/vhds/osdiskimage.vhd.
valueFrom: az vm image list, az vm image show
- name: --license-type
isRequired: False
summary: License type if the Windows image or disk used was licensed on-premises.
description: ''
parameterValueGroup: Windows_Client, Windows_Server
- name: --location -l
isRequired: False
summary: Location in which to create VM and related resources. If default location is not configured, will default to the resource group's location.
description: ''
- name: --no-wait
isRequired: False
summary: Do not wait for the long running operation to finish.
description: ''
- name: --secrets
isRequired: False
summary: 'One or many Key Vault secrets as JSON strings or files via @<file path> containing [{ "sourceVault": { "id": "value" }, "vaultCertificates": [{ "certificateUrl": "value", "certificateStore": "cert store name (only on windows)"}] }].'
description: ''
- name: --size
isRequired: False
summary: The VM size to be created. See <a href="https://azure.microsoft.com/en-us/pricing/details/virtual-machines/">https://azure.microsoft.com/en-us/pricing/details/virtual-machines/</a> for size info.
description: ''
defaultValue: Standard_DS1_v2
- name: --tags
isRequired: False
summary: Space separated tags in 'key[=value]' format. Use "" to clear existing tags.
description: ''
- name: --validate
isRequired: False
summary: Generate and validate the ARM template without creating any resources.
description: ''
- name: --admin-password
isRequired: False
summary: Password for the VM if authentication type is 'Password'.
description: ''
- name: --admin-username
isRequired: False
summary: Username for the VM.
description: ''
defaultValue: appveyor
- name: --authentication-type
isRequired: False
summary: Type of authentication to use with the VM. Defaults to password for Windows and SSH public key for Linux.
description: ''
parameterValueGroup: password, ssh
- name: --generate-ssh-keys
isRequired: False
summary: Generate SSH public and private key files if missing.
description: ''
- name: --ssh-dest-key-path
isRequired: False
summary: Destination file path on the VM for the SSH key.
description: ''
- name: --ssh-key-value
isRequired: False
summary: The SSH public key or public key file path.
description: ''
- name: --nics
isRequired: False
summary: Names or IDs of existing NICs to attach to the VM. The first NIC will be designated as primary. If omitted, a new NIC will be created. If an existing NIC is specified, do not specify subnet, vnet, public IP or NSG.
description: ''
- name: --nsg
isRequired: False
summary: The name to use when creating a new Network Security Group (default) or referencing an existing one. Can also reference an existing NSG by ID or specify "" for none.
description: ''
- name: --nsg-rule
isRequired: False
summary: NSG rule to create when creating a new NSG. Defaults to open ports for allowing RDP on Windows and allowing SSH on Linux.
description: ''
parameterValueGroup: RDP, SSH
- name: --private-ip-address
isRequired: False
summary: Static private IP address (e.g. 10.0.0.5).
description: ''
- name: --public-ip-address
isRequired: False
summary: Name of the public IP address when creating one (default) or referencing an existing one. Can also reference an existing public IP by ID or specify "" for None.
description: ''
- name: --public-ip-address-allocation
isRequired: False
summary: ''
description: ''
defaultValue: dynamic
parameterValueGroup: dynamic, static
- name: --public-ip-address-dns-name
isRequired: False
summary: Globally unique DNS name for a newly created Public IP.
description: ''
- name: --subnet
isRequired: False
summary: The name of the subnet when creating a new VNet or referencing an existing one. Can also reference an existing subnet by ID. If omitted, an appropriate VNet and subnet will be selected automatically, or a new one will be created.
description: ''
- name: --subnet-address-prefix
isRequired: False
summary: The subnet IP address prefix to use when creating a new VNet in CIDR format.
description: ''
defaultValue: 10.0.0.0/24
- name: --vnet-address-prefix
isRequired: False
summary: The IP address prefix to use when creating a new VNet in CIDR format.
description: ''
defaultValue: 10.0.0.0/16
- name: --vnet-name
isRequired: False
summary: Name of the virtual network when creating a new one or referencing an existing one.
description: ''
- name: --data-disk-caching
isRequired: False
summary: Storage caching type for the VM data disk(s).
description: ''
parameterValueGroup: None, ReadOnly, ReadWrite
- name: --data-disk-sizes-gb
isRequired: False
summary: Space separated empty managed data disk sizes in GB to create.
description: ''
- name: --os-disk-caching --storage-caching
isRequired: False
summary: Storage caching type for the VM OS disk.
description: ''
parameterValueGroup: ReadOnly, ReadWrite
- name: --os-disk-name
isRequired: False
summary: The name of the new VM OS disk.
description: ''
- name: --os-type
isRequired: False
summary: Type of OS installed on a custom VHD. Do not use when specifying an URN or URN alias.
description: ''
parameterValueGroup: linux, windows
- name: --storage-account
isRequired: False
summary: Only applicable when use with '--use-unmanaged-disk'. The name to use when creating a new storage account or referencing an existing one. If omitted, an appropriate storage account in the same resource group and location will be used, or a new one will be created.
description: ''
- name: --storage-container-name
isRequired: False
summary: 'Only applicable when use with ''--use-unmanaged-disk''. Name of the storage container for the VM OS disk. Default: vhds.'
description: ''
- name: --storage-sku
isRequired: False
summary: The sku of storage account to persist VM. By default, only Standard_LRS and Premium_LRS are allowed. Using with --use-unmanaged-disk, all are available.
description: ''
parameterValueGroup: Premium_LRS, Standard_GRS, Standard_LRS, Standard_RAGRS, Standard_ZRS
- name: --use-unmanaged-disk
isRequired: False
summary: Do not use managed disk to persist VM.
description: ''
- name: --debug
isRequired: False
summary: Increase logging verbosity to show all debug logs.
description: ''
- name: --help -h
isRequired: False
summary: Show this help message and exit.
description: ''
- name: --output -o
isRequired: False
summary: Output format.
description: ''
defaultValue: json
parameterValueGroup: json, jsonc, table, tsv
- name: --query
isRequired: False
summary: JMESPath query string. See <a href="http://jmespath.org/">http://jmespath.org/</a> for more information and examples.
description: ''
- name: --verbose
isRequired: False
summary: Increase logging verbosity. Use --debug for full debug logs.
description: ''
source:
remote:
path: src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_help.py
branch: master
repo: https://github.com/Azure/azure-cli.git
children: []
uid: az_vm_create
name: az vm create
description: For an end-to-end tutorial, see <a href="https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-quick-create-cli">https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-quick-create-cli</a>.
summary: Create an Azure Virtual Machine.
Metadata: {}
- commandList: []
htmlId: deallocate
examples:
- title: Process to deallocate, generalize, and capture a stopped virtual machine
code: >-
az vm deallocate -g MyResourceGroup -n MyVm
az vm generalize -g MyResourceGroup -n MyVm
az vm capture -g MyResourceGroup -n MyVm --vhd-name-prefix MyPrefix
- title: The process to deallocate, generalize, and capture multiple stopped virtual machines.
code: >-
vms_ids=$(az vm list -g MyResourceGroup --query "[].id" -o tsv)
az vm deallocate --ids ${vms_ids}
az vm generalize --ids ${vms_ids}
az vm capture --ids ${vms_ids} --vhd-name-prefix MyPrefix
parameters:
- name: --name -n
isRequired: True
summary: The name of the Virtual Machine. You can configure the default using az configure --defaults vm=<name>.
description: ''
- name: --resource-group -g
isRequired: True
summary: Name of resource group. You can configure the default group using az configure --defaults group=<name>.
description: ''
- name: --no-wait
isRequired: False
summary: Do not wait for the long running operation to finish.
description: ''
- name: --debug
isRequired: False
summary: Increase logging verbosity to show all debug logs.
description: ''
- name: --help -h
isRequired: False
summary: Show this help message and exit.
description: ''
- name: --output -o
isRequired: False
summary: Output format.
description: ''
defaultValue: json
parameterValueGroup: json, jsonc, table, tsv
- name: --query
isRequired: False
summary: JMESPath query string. See <a href="http://jmespath.org/">http://jmespath.org/</a> for more information and examples.
description: ''
- name: --verbose
isRequired: False
summary: Increase logging verbosity. Use --debug for full debug logs.
description: ''
source:
remote:
path: src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_help.py
branch: master
repo: https://github.com/Azure/azure-cli.git
children: []
uid: az_vm_deallocate
name: az vm deallocate
description: For an end-to-end tutorial, see <a href="https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-capture-image">https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-capture-image</a>.
summary: Shuts down the virtual machine and releases the compute resources.
Metadata: {}
- commandList: []
htmlId: delete
examples:
- title: Delete a VM without a prompt for confirmation.
code: az vm delete -g MyResourceGroup -n MyVm --yes
- title: Delete a virtual machine by Ids
code: az vm delete --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv)
parameters:
- name: --name -n
isRequired: True
summary: The name of the Virtual Machine. You can configure the default using az configure --defaults vm=<name>.
description: ''
- name: --resource-group -g
isRequired: True
summary: Name of resource group. You can configure the default group using az configure --defaults group=<name>.
description: ''
- name: --no-wait
isRequired: False
summary: Do not wait for the long running operation to finish.
description: ''
- name: --yes -y
isRequired: False
summary: Do not prompt for confirmation.
description: ''
- name: --debug
isRequired: False
summary: Increase logging verbosity to show all debug logs.
description: ''
- name: --help -h
isRequired: False
summary: Show this help message and exit.
description: ''
- name: --output -o
isRequired: False
summary: Output format.
description: ''
defaultValue: json
parameterValueGroup: json, jsonc, table, tsv
- name: --query
isRequired: False
summary: JMESPath query string. See <a href="http://jmespath.org/">http://jmespath.org/</a> for more information and examples.
description: ''
- name: --verbose
isRequired: False
summary: Increase logging verbosity. Use --debug for full debug logs.
description: ''
source:
remote:
path: src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_help.py
branch: master
repo: https://github.com/Azure/azure-cli.git
children: []
uid: az_vm_delete
name: az vm delete
description: ''
summary: The operation to delete a virtual machine.
Metadata: {}
- commandList: []
htmlId: format-secret
examples:
- title: Create a self-signed certificate with a the default policy and add to a virtual machine
code: "az keyvault certificate create --vault-name vaultname -n cert1 -p \"$(az keyvault certificate get-default-policy)\"\n \n secrets=$(az keyvault secret list-versions --vault-name vaultname -n cert1 --query \"[?attributes.enabled].id\" -o tsv)\n \n vm_secrets=$(az vm format-secret -s \"$secrets\") \n \n az vm create -g group-name -n vm-name --admin-username deploy --image debian --secrets \"$vm_secrets\""
parameters:
- name: --secrets -s
isRequired: True
summary: Space separated list of Key Vault secret URIs. Perhaps, produced by 'az keyvault secret list-versions --vault-name vaultname -n cert1 --query "[?attributes.enabled].id" -o tsv'.
description: ''
- name: --certificate-store
isRequired: False
summary: Certificate store the secret will be applied (Windows only).
description: ''
- name: --debug
isRequired: False
summary: Increase logging verbosity to show all debug logs.
description: ''
- name: --help -h
isRequired: False
summary: Show this help message and exit.
description: ''
- name: --output -o
isRequired: False
summary: Output format.
description: ''
defaultValue: json
parameterValueGroup: json, jsonc, table, tsv
- name: --query
isRequired: False
summary: JMESPath query string. See <a href="http://jmespath.org/">http://jmespath.org/</a> for more information and examples.
description: ''
- name: --verbose
isRequired: False
summary: Increase logging verbosity. Use --debug for full debug logs.
description: ''
source:
remote:
path: src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_help.py
branch: master
repo: https://github.com/Azure/azure-cli.git
children: []
uid: az_vm_format-secret
name: az vm format-secret
description: Transform secrets into a form consumed by VMs and VMSS create via --secrets.
summary: Format secrets to be used in az vm create --secrets.
Metadata: {}
- commandList: []
htmlId: generalize
examples:
- title: Process to deallocate, generalize, and capture a stopped virtual machine
code: >-
az vm deallocate -g MyResourceGroup -n MyVm
az vm generalize -g MyResourceGroup -n MyVm
az vm capture -g MyResourceGroup -n MyVm --vhd-name-prefix MyPrefix
- title: The process to deallocate, generalize, and capture multiple stopped virtual machines.
code: >-
vms_ids=$(az vm list -g MyResourceGroup --query "[].id" -o tsv)
az vm deallocate --ids ${vms_ids}
az vm generalize --ids ${vms_ids}
az vm capture --ids ${vms_ids} --vhd-name-prefix MyPrefix
parameters:
- name: --name -n
isRequired: True
summary: The name of the Virtual Machine. You can configure the default using az configure --defaults vm=<name>.
description: ''
- name: --resource-group -g
isRequired: True
summary: Name of resource group. You can configure the default group using az configure --defaults group=<name>.
description: ''
- name: --no-wait
isRequired: False
summary: Do not wait for the long running operation to finish.
description: ''
- name: --debug
isRequired: False
summary: Increase logging verbosity to show all debug logs.
description: ''
- name: --help -h
isRequired: False
summary: Show this help message and exit.
description: ''
- name: --output -o
isRequired: False
summary: Output format.
description: ''
defaultValue: json
parameterValueGroup: json, jsonc, table, tsv
- name: --query
isRequired: False
summary: JMESPath query string. See <a href="http://jmespath.org/">http://jmespath.org/</a> for more information and examples.
description: ''
- name: --verbose
isRequired: False
summary: Increase logging verbosity. Use --debug for full debug logs.
description: ''
source:
remote:
path: src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_help.py
branch: master
repo: https://github.com/Azure/azure-cli.git
children: []
uid: az_vm_generalize
name: az vm generalize
description: For an end-to-end tutorial, see <a href="https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-capture-image">https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-capture-image</a>.
summary: Sets the state of the virtual machine to generalized.
Metadata: {}
- commandList: []
htmlId: get-instance-view
examples:
- title: Use resource group and name to get instance view information of a VM.
code: az vm get-instance-view -g MyResourceGroup -n MyVm
- title: Get instance view by Ids
code: az vm get-instance-view --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv)
parameters:
- name: --name -n
isRequired: True
summary: The name of the Virtual Machine. You can configure the default using az configure --defaults vm=<name>.
description: ''
- name: --resource-group -g
isRequired: True
summary: Name of resource group. You can configure the default group using az configure --defaults group=<name>.
description: ''
- name: --debug
isRequired: False
summary: Increase logging verbosity to show all debug logs.
description: ''
- name: --help -h
isRequired: False
summary: Show this help message and exit.
description: ''
- name: --output -o
isRequired: False
summary: Output format.
description: ''
defaultValue: json
parameterValueGroup: json, jsonc, table, tsv
- name: --query
isRequired: False
summary: JMESPath query string. See <a href="http://jmespath.org/">http://jmespath.org/</a> for more information and examples.
description: ''
- name: --verbose
isRequired: False
summary: Increase logging verbosity. Use --debug for full debug logs.
description: ''
source:
remote:
path: src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_help.py
branch: master
repo: https://github.com/Azure/azure-cli.git
children: []
uid: az_vm_get-instance-view
name: az vm get-instance-view
description: ''
summary: Get information about a VM including instance information (powerState).
Metadata: {}
- commandList: []
htmlId: list
examples:
- title: List all VMs.
code: az vm list
- title: List all VMs by resource group.
code: az vm list -g MyResourceGroup
- title: List all VMs by resource group with details.
code: az vm list -g MyResourceGroup -d
parameters:
- name: --resource-group -g
isRequired: False
summary: Name of resource group. You can configure the default group using az configure --defaults group=<name>.
description: ''
- name: --show-details -d
isRequired: False
summary: Show public ip address, FQDN, and power states. command will run slow.
description: ''
- name: --debug
isRequired: False
summary: Increase logging verbosity to show all debug logs.
description: ''
- name: --help -h
isRequired: False
summary: Show this help message and exit.
description: ''
- name: --output -o
isRequired: False
summary: Output format.
description: ''
defaultValue: json
parameterValueGroup: json, jsonc, table, tsv
- name: --query
isRequired: False
summary: JMESPath query string. See <a href="http://jmespath.org/">http://jmespath.org/</a> for more information and examples.
description: ''
- name: --verbose
isRequired: False
summary: Increase logging verbosity. Use --debug for full debug logs.
description: ''
source:
remote:
path: src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_help.py
branch: master
repo: https://github.com/Azure/azure-cli.git
children: []
uid: az_vm_list
name: az vm list
description: For more information on querying information about Virtual Machines, see <a href="https://docs.microsoft.com/en-us/cli/azure/query-az-cli2">https://docs.microsoft.com/en-us/cli/azure/query-az-cli2</a>.
summary: List information about Virtual Machines.
Metadata: {}
- commandList: []
htmlId: list-ip-addresses
examples:
- title: Get the IP addresses for a VM.
code: az vm list-ip-addresses -g MyResourceGroup -n MyVm
- title: Get IP addresses for VMs by Ids
code: az vm list-ip-addresses --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv)
parameters:
- name: --name -n
isRequired: False
summary: The name of the Virtual Machine. You can configure the default using az configure --defaults vm=<name>.
description: ''
- name: --resource-group -g
isRequired: False
summary: Name of resource group. You can configure the default group using az configure --defaults group=<name>.
description: ''
- name: --debug
isRequired: False
summary: Increase logging verbosity to show all debug logs.
description: ''
- name: --help -h
isRequired: False
summary: Show this help message and exit.
description: ''
- name: --output -o
isRequired: False
summary: Output format.
description: ''
defaultValue: json
parameterValueGroup: json, jsonc, table, tsv
- name: --query
isRequired: False
summary: JMESPath query string. See <a href="http://jmespath.org/">http://jmespath.org/</a> for more information and examples.
description: ''
- name: --verbose
isRequired: False
summary: Increase logging verbosity. Use --debug for full debug logs.
description: ''
source:
remote:
path: src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_help.py
branch: master
repo: https://github.com/Azure/azure-cli.git
children: []
uid: az_vm_list-ip-addresses
name: az vm list-ip-addresses
description: ''
summary: Get IP addresses from one or more Virtual Machines.
Metadata: {}
- commandList: []
htmlId: list-sizes
examples:
- title: List the available VM sizes in West US.
code: az vm list-sizes -l westus
parameters:
- name: --location -l
isRequired: True
summary: Location. You can configure the default location using az configure --defaults location=<location>.
description: ''
- name: --debug
isRequired: False
summary: Increase logging verbosity to show all debug logs.
description: ''
- name: --help -h
isRequired: False
summary: Show this help message and exit.
description: ''
- name: --output -o
isRequired: False
summary: Output format.
description: ''
defaultValue: json
parameterValueGroup: json, jsonc, table, tsv
- name: --query
isRequired: False
summary: JMESPath query string. See <a href="http://jmespath.org/">http://jmespath.org/</a> for more information and examples.
description: ''
- name: --verbose
isRequired: False
summary: Increase logging verbosity. Use --debug for full debug logs.
description: ''
source:
remote:
path: src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_help.py
branch: master
repo: https://github.com/Azure/azure-cli.git