Azure shut down schedule - azure

We have a client who runs Dynamics NAV infrastructure on Azure VM. I am about to configure a schedule in such a way,it matches office hours.
What will happen if service is used at shutdown time and other user interacting with the service running on VM. Is there a way to manage that?
Thank you.

I am about to configure a schedule in such a way,it matches office
hours.
You could use Azure runbook to schedule start or stop your VM, please refer to this blog.
What will happen if service is used at shutdown time and other user
interacting with the service running on VM.
If your VM shutdown, Dynamics NAV could not provide service. If your user need Dynamics NAS service, you need start your VM.

Related

Do my azure account permissions affect my Virtual Machine operation

I have a Virtual Machine in azure that is set to boot up daily, run some scripts via cron, and then shut down.
A week ago my colleague changed my took away my co-adminstrator role within Azure. Since then the scripts have failed to run. I don't even know if the VM has been booting up.
How does the role/permissions associated with my account affect the behaviour of a VM that I have created?
EDIT
I suspect the point of failure is the Automation Task that starts the VM each day.
How does the role/permissions associated with my account affect the
behaviour of a VM that I have created?
To run the automation tasks in a VM, the account which used to authenticate the VM should have the proper role/permissions.
As you are no longer the co-administrator of that Azure Subscription, you should have a proper role to run the automation tasks in a VM with your account.
For example, with the contributor role, you can create and run the automation tasks in your Azure VM

Start azure virtual machine without azure portal

I want to give access to somebody to a virtual machine on Azure (with the RDP connection file) and let him start/stop the VM but without giving him access to the Azure Portal account.
Is there a (simple) way to start/stop virtual machine on Azure without having to access the portal ? By "simple" I mean something that you don't need to run some line code and that can be as easy as opening a RDP file.
Alternatively, is there a way not to be billed of a running (but idle) virtual machine ?
You can use a Powershell script to start/stop the VM.
No you will be billed for the stopped VMs also as long as you have checked them out.
For your requirement, I think the best way is to use the Service principal with the role of Virtual Machine Contributor. It just lets the user manage the VM, but without access to the VM and also do not have the permission to access the Azure portal.
Then you can use this service principal to execute the Azure CLI, Azure PowerShell commands or the REST API to start/stop the Azure VM, it does not cost.
Is there a (simple) way to start/stop virtual machine on Azure without having to access the portal ? By "simple" I mean something that you don't need to run some line code and that can be as easy as opening a RDP file.
There are SDK's available which you can use along with CLI to have programmatic access to the VM - in this manner, you do not require access to the portal.
Alternatively, is there a way not to be billed of running (but idle) virtual machine?
You will be billed for idle VM as this still means that VM is operational. To save costs, terminate the VM and create the VM again when required.

How to add a vm to multiple azure automation hybrid worker group

We have one azure vm (jump server) which is already part of our staging hybrid worker group.
Now I want to add it to our prod hybrid worker group which is in different azure subscription. Is there any way to keep both?
Thanks in advance.
Currently in Azure Automation, A hybrid worker can only point to one automation account. There's already a request to the Azure Automation team to support this scenario. I recommend you Upvote the feedback # https://feedback.azure.com/forums/246290-automation/suggestions/33608410-utilize-the-same-automation-hybrid-runbook-workers

MS Azure: VM auto start/shutdown

Is there any way in which I can automate stopping my VM on a Friday and starting this back up again on the Sunday evening at specified times?
I’m aware this is possible via the VM blade and DevTest labs but their only option is daily, whereas I want this only shut down in the weekends.
Any input will be greatly appreciated. Thanks
Given that you need more precise control over scheduling than is possible in the Azure VM Auto-Shutdown blade or Azure Dev-Test Labs, you can accomplish startup / shutdown on specific days via RunBooks in an Azure Automation Resource.
Create (or choose an existing) Azure Automation Account resource
In the new Automation resource, go to the Runbooks blade
Click "Browse Gallery"
Search for and import "Stop Azure V2 VMs" and "Start Azure V2 VMs" runbooks
Schedule the new runbooks to run as needed
This walkthrough shows how to setup your runbooks with a specific schedule and parameters to target your virtual machine(s).
I would recomment to you, to read this:
http://azurecorner.com/start-stop-windows-azure-vms-according-time-schedule/

Scheduling startup (booting) of a Azure VM

I have a Windows based VM on Azure Cloud. Using the Portal on portal.azure.com I can start/stop the machine.
Is there a way to create a schedule in Azure so that the VM is started (booting) on a specific date/time / schedule? So that the VM's state is changed from Stopped (deallocated) to Running when it is scheduled to do so?
You can schedule any operations with Azure Automation.
This article describes how to run Azure VMs during office hours.

Resources