在没有Azure门户的情况下启动Azure虚拟机 [英] Start azure virtual machine without azure portal

查看:68
本文介绍了在没有Azure门户的情况下启动Azure虚拟机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想授予某人访问Azure上的虚拟机(带有RDP连接文件)的权限,并允许他启动/停止VM,但不授予他访问Azure门户帐户的权限.

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.

是否有一种(简单的)方法可以在Azure上启动/停止虚拟机而无需访问门户?简单"是指您无需运行任何行代码,就像打开RDP文件一样简单.

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 ?

推荐答案

对于您的要求,我认为最好的方法是使用具有虚拟机贡献者角色的Service主体.它只允许用户管理VM,但不能访问VM,也没有访问Azure门户的权限.

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.

然后,您可以使用此服务主体来执行Azure CLI,Azure PowerShell命令或REST API来启动/停止Azure VM,这无需花费任何费用.

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.

这篇关于在没有Azure门户的情况下启动Azure虚拟机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆