exam questions

Exam AZ-303 All Questions

View all questions & answers for the AZ-303 exam

Exam AZ-303 topic 5 question 88 discussion

Actual exam question from Microsoft's AZ-303
Question #: 88
Topic #: 5
[All AZ-303 Questions]

DRAG DROP -
You have an Azure virtual machine named VM1 that runs Windows Server 2016.
You install a line-to-business application on VM1.
You need to create an Azure virtual machine by using VM1 as a custom image.
Which three actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:
Step 1: Run sysprep.exe on VM1.
If a template, or system image is used, System administrators must run the Sysprep tool to clear the SID information. The Sysprep tool is usually one of the last tasks performed by a system administrator when building a server image/template, that way each clone of the template will generalize a new unique SID for every server image copied from the template and will prepare the server for a first time boot.
The end result is a System template that functions as a new unique build every time it is deployed.
Step 2: From Azure CLI, deallocate VM1 and mark VM1 as generalized
To create an image, the VM needs to be deallocated. Deallocate the VM with Stop-AzVm. Then, set the state of the VM as generalized with Set-AzVm so that the
Azure platform knows the VM is ready for use a custom image
Step 3: Create a virtual machine scale set
Now create a scale set with New-AzVmss that uses the -ImageName parameter to define the custom VM image created in the previous step.
References:
https://thesolving.com/server-room/when-and-how-to-use-sysprep/ https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/tutorial-use-custom-image-powershell

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
SAMBIT
Highly Voted 4 years, 1 month ago
1. Run sysprep.exe on VM 2. From Azure CLI, deallocate VM1 and mark VM1 as generalized (3. From the azure CLI run az vm create - but this option isn't available) 3. From Azure CLI, apply a custom script extension
upvoted 19 times
ahorva
3 years, 4 months ago
you cannot apply a custom script extension to a VM that is not running
upvoted 1 times
...
a_r_c
4 years ago
Not sure i understand the context of custom script extension here..
upvoted 4 times
tteesstt
3 years, 8 months ago
You need to create VM not VMSS, the only reasonable answer left is "From Azure CLI, apply a custom script extension"
upvoted 1 times
gizda2
3 years, 7 months ago
True, but it doesn't answer what to do with that "custom script extension" here.
upvoted 2 times
...
ScubaDiver123456
3 years, 5 months ago
@tteesstt. You can create 0, 1 or 1000 VMs with a VMSS so it seems logical to me that you would create a VMSS after and specify the # of VMs desired with the custom image.
upvoted 1 times
...
...
...
...
SnakePlissken
Highly Voted 3 years, 11 months ago
This question is almost repeated in topic 5 question 104, but there you're asked to create a scale set. Then this answer makes sense. Maybe that this question is not correct. https://www.examtopics.com/exams/microsoft/az-303/view/47
upvoted 11 times
gizda2
3 years, 7 months ago
The point is here! The question itself must be mistyped/wrong.
upvoted 1 times
...
...
PJon
Most Recent 3 years, 7 months ago
The given answer looks correct. As the images already had line of business application as part of image, the user of custom script looks redundant (what's the use of image if it's not complete). The question is to create a VM from image and in this scenario the VMSS fits the purpose.
upvoted 2 times
...
Pinto
3 years, 9 months ago
repeat topic 1 Q73
upvoted 3 times
altafpatel1984
3 years, 3 months ago
But in that question had to create scale set, but here have to create virtual machine.
upvoted 1 times
...
...
Mj11Az
3 years, 12 months ago
LB and VMSS doesn't make sense here so 3rd one will be custom script extention. 1. Run sysprep.exe on VM 2. From Azure CLI, deallocate VM1 and mark VM1 as generalized
upvoted 1 times
tita_tovenaar
3 years, 9 months ago
agree with your deduction. Question says clearly "you need to create *an Azure virtual machine* --> no scale set at all. Hence option 2 and 5 are out.
upvoted 3 times
...
...
itsamemario
4 years, 2 months ago
Should be: 1. Run sysprep.exe on VM 2. From Azure CLI, deallocate VM1 and mark VM1 as generalized (3. From the azure CLI run az vm create - but this option isn't available) 3. From Azure CLI, apply a custom script extension See: https://docs.microsoft.com/en-us/learn/modules/deploy-vms-from-vhd-templates/4-exercise-create-image-provision-vm?pivots=windows-cloud
upvoted 5 times
jank
4 years, 2 months ago
Your argument for point 3 is incorrect: In the exercise your are referencing here, the custom extension is only used to update the servername in the webapp of the new VM. It is just a cosmetic thing, and not really needed. I agree "az vm create --image MyVMImage" would be a correct solution, but it is not offered here, so I think scale set is correct.
upvoted 6 times
rdemontis
3 years, 10 months ago
Exactly, even if it is not requested the only possible solution is to create a VMSS. Really you need to create only a VM but there isn't that option. Custom Script Extension is used for post deployment operation so it can't be correct. First you have to create the VM. https://docs.microsoft.com/en-us/azure/virtual-machines/extensions/custom-script-windows
upvoted 2 times
...
...
...
Blimpy
4 years, 4 months ago
I think last step is to customise the name of the web server: az vm extension set \ --name CustomScriptExtension \ --vm-name CUSTOM-NAME\ --publisher Microsoft.Compute \ --settings '{"commandToExecute":"powershell Clear-Content -Path \"C:\\inetpub\\wwwroot\\Default.htm\"; Add-Content -Path \"C:\\inetpub\\wwwroot\\Default.htm\" -Value $(hostname)"}' Exercise here: https://docs.microsoft.com/en-us/learn/modules/deploy-vms-from-vhd-templates/4-exercise-create-image-provision-vm?pivots=windows-cloud
upvoted 4 times
abadal
4 years, 3 months ago
but this is just to show to the person who is doing the exercise that new machine created. not a mandatory steps.
upvoted 3 times
...
...
Stephan99
4 years, 4 months ago
see also https://docs.microsoft.com/en-us/learn/modules/deploy-vms-from-vhd-templates/4-exercise-create-image-provision-vm?pivots=windows-cloud
upvoted 3 times
...
razfallow
4 years, 4 months ago
correct, the VM scale set is created using the custom image
upvoted 3 times
Stevezzc
4 years, 4 months ago
why do we need to create VMSS?
upvoted 9 times
Niro
4 years, 4 months ago
agree. it seems that the question is missing full context
upvoted 7 times
...
ScubaDiver123456
3 years, 5 months ago
@Stevezzc. You can create 0, 1 or 1000 VMs with a VMSS. The problem statement says the solution needs to create one VM from the custom image, so it seems logical to me that you would create a VMSS after and specify the # of VMs desired with the custom image.
upvoted 1 times
...
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago