Exam AZ-104 All QuestionsBrowse all questions from this exam
Question 5

You are planning to deploy an Ubuntu Server virtual machine to your company's Azure subscription.

You are required to implement a custom deployment that includes adding a particular trusted root certification authority (CA).

Which of the following should you use to create the virtual machine?

    Correct Answer: D

    To deploy an Ubuntu Server virtual machine in Azure with a custom deployment that includes adding a particular trusted root certification authority (CA), you should use the 'az vm create' command. This command, part of the Azure CLI (Command-Line Interface), supports various customization options, including the use of cloud-init scripts for configuration, which can handle the installation of a trusted root CA as part of the VM's initialization process. The other cmdlets mentioned either do not exist or do not provide the required level of customization. Using 'az vm create', you can employ the --custom-data parameter to provide your cloud-init script, facilitating the custom deployment.

Discussion
elishlomoOption: D

The az vm create command. you need to create an Ubuntu Linux VM using a cloud-init script for configuration. For example, az vm create -g MyResourceGroup -n MyVm --image debian --custom-data MyCloudInitScript.yml https://docs.microsoft.com/en-us/cli/azure/vm?view=azure-cli-latest https://cloudinit.readthedocs.io/en/latest/topics/examples.html

NaoVazOption: D

In my opinion the correct option is D) "The az vm create command". "New-AzureRmVm" is the legacy way to create Vms using Powershell (https://docs.microsoft.com/en-us/powershell/module/azurerm.compute/new-azurermvm?view=azurermps-6.13.0). "New-AzVM" Is the current way to create VMs using Powershell (https://docs.microsoft.com/en-us/powershell/module/az.compute/new-azvm?view=azps-8.3.0). Using Powershell cmdlets I think that it is not currently supported to create a VM passing custom data, like a cloud-init file to accomplish the requested trust for a Custom CA. "Create-AzVM" Does not seem to exist. Using AZ cli or ARM Templates we can accomplish this: https://docs.microsoft.com/en-us/azure/virtual-machines/custom-data

jecampos2Option: D

I don't understand why Exam Topics don't update the correct answer when the explanations confirm the correcrt answer is D.

KirkD

coz they are interested only in making money and they don't give a shit about people who pay for this :-)

AlbertKwan

because they are busy counting bills.

mattpaulOption: D

D is the correct answer for me Get all questions from me contact me on <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="6b1b0a1e0745060a1f1f030e1c185a525c5b2b041e1f0704040045080406">[email protected]</a>

SunitaMaurya

I have emailed you.

gmbillyeOption: D

The alternative B is definitely another viable option. It may be a bit harder but it's definitely doable with it. I guess what makes option D the correct one, according to Microsoft, would be the possibility of running the command directly from a bash shell - that is, not having to install powershell or having to use a windows machine to run the powershell cmdlets. Alternative A is wrong because AzureRM is deprecated (the command exists, at least). Alternative C represents a cmdlet that doesn't even exist.

santijames07Option: D

Answer: D Create a VM Use the az vm create command to create a new virtual machine running Ubuntu. src: https://learn.microsoft.com/en-us/cli/azure/azure-cli-vm-tutorial-3?tabs=bash

6f80f6cOption: D

Answer is D. Create-AzVM cmdlet not exist !

ITLearnerOption: D

Ans. is D az vm create command: This is the current and recommended way to create VMs in Azure using the Azure CLI. It offers more flexibility and supports custom deployments through cloud-init configuration. By using the az vm create command with the --custom-data parameter, you can specify a cloud-init script that will run during the VM's first boot. This script can then install the desired trusted root CA certificate and configure the system accordingly.

60ac493Option: D

Answer D is correct. Answer C is incorrect which is leading confusion. Can we expect the answer corrected?

tsummeyOption: D

The az vm create command offers a level of customization that the other options don't have including the cloud-init script to customize a Linux VM deployment and add the specific trusted root CA.

3c5adceOption: D

In summary: B. The New-AzVM cmdlet is the correct PowerShell command. D. The az vm create command is the correct Azure CLI command. Based on highest voted I'll go with D

fabiofrancOption: D

Create the Virtual Machine the following code: az vm create \ --resource-group MyResourceGroup \ --name MyVM \ --admin-username azureuser \ --image Ubuntu2204

mayureshpawashe3036Option: D

ans is D

MCLC2021Option: D

Correct answer D ( The az vm create command). A/C: the command does not exist. B: the command "New-AzVM cmdlet" will create a new storage account for boot diagnostics if one does not already exist. If you use the Azure CLI to create your VM with the "az vm create" command, you can optionally generate SSH public and private key files using the "--generate-ssh-keys" option. If you use the Azure PowerShell to create your VM with the "New-AzVM" command, you can optionally generate SSH public and private key files using the "GenerateSshKey" option. https://learn.microsoft.com/en-us/azure/virtual-machines/linux/mac-create-ssh-keys https://learn.microsoft.com/en-us/azure/virtual-machines/linux/ssh-from-windows

digix98487Option: B

B: The New-AzVM cmdlet is used to create a new virtual machine (VM) in Azure using Azure PowerShell. This cmdlet allows for the creation of a VM with various custom configurations, including specifying the operating system, hardware resources, networking settings, and additional configurations like trusted root certification authorities. When deploying a custom VM that requires specific configurations such as adding a particular trusted root certification authority (CA), the New-AzVM cmdlet provides the flexibility to include these configurations as part of the deployment process. This allows you to tailor the VM to meet your specific requirements, ensuring that it meets your organization's security and operational needs. Therefore, when you need to implement a custom deployment that includes adding a particular trusted root certification authority (CA), using the New-AzVM cmdlet is the appropriate choice for creating the virtual machine in your company's Azure subscription.

Amir1909Option: D

D is correct

PringlesuckaOption: D

Az VM create is correct answer.