exam questions

Exam 70-486 All Questions

View all questions & answers for the 70-486 exam

Exam 70-486 topic 1 question 131 discussion

Actual exam question from Microsoft's 70-486
Question #: 131
Topic #: 1
[All 70-486 Questions]

You define a startup task in the ServiceDefinition.csdef file. The task consists of a batch file that runs a Windows PowerShell script. The script places configuration files in local storage for use in a worker role. The worker role needs this information before starting.
The worker role does not start after the startup task runs.
You need to ensure that the worker role starts.
What should you do?

  • A. Use environment variables based on members of the RoleEnvironment class instead of static environment variables.
  • B. Configure the task to use the directory specified by the TEMP environment variable.
  • C. Ensure the task completes with an errorlevel of 0.
  • D. Change the task from simple to foreground.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️
Startup tasks must end with an errorlevel (or exit code) of zero for the startup process to complete. If a startup task ends with a non-zero errorlevel, the role will not start.
Note: Startup tasks are actions that are taken before your roles begin and are defined in the ServiceDefinition.csdef file by using the Task element within the
Startup element. Frequently startup tasks are batch files, but they can also be console applications, or batch files that start PowerShell scripts.
Reference:
https://docs.microsoft.com/en-us/azure/cloud-services/cloud-services-startup-tasks

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
arohh
4 years, 8 months ago
Answer is: error level 0
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 ...