开发测试实验室自动化问题 [英] Dev Test Labs Automation Issues

查看:112
本文介绍了开发测试实验室自动化问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好


我想知道是否有人可以指导正确的道路来构建一些消耗开发测试实验室的CI / CD自动化。我目前正在研究.NET Nuget软件包'Microsoft.Azure.Management.DevTestLabs',我认为它是
DevTestLabs REST API的包装器。


我可以成功连接到实验室并枚举虚拟机,甚至启动和停止虚拟机。我此时的两个问题是


a)无法判断特定虚拟机当前是否正在运行。因此,问题是自动化工具链如何解决这个问题,然后决定是否启动VM。


b)这是一个更大的问题。 REST api确实提供了一个GET(.NET中的LABVirtualMachine对象),它提供有关虚拟机的信息,但网络接口始终为null。虚拟机的fqdn属性也为null。那么
如何连接到这个新的虚拟机并说,复制文件。似乎没有办法在不知道名称的情况下连接到机器。为了在这里提供一些颜色,我们设置了一个私有虚拟网络,扩展了我们的组织网络,并且
这些虚拟机不会通过公共接口公开。


谢谢



解决方案

嗨adhingra,


感谢您的光临!


a):如果你看一下
文档
,你可以看到


展开格式的例子(即属性(


expand = artifacts,computeVm,networkInterface,applicableSchedule)。)


要获取PowerState,您需要扩展计算VM详细信息,如下例所示。 br $>


subscriptions / {subscriptionId} / resourceGroups / {resourceGroupName} /providers/Microsoft.DevTestLab/labs/ {labName} / virtualmachines / {name}?api-version = 2016 -05-15&安培;

Hello

I was wondering if someone can guide to the right path in my quest to build some CI/CD automation consuming the Dev Test Labs. I am currently researching the .NET Nuget package 'Microsoft.Azure.Management.DevTestLabs' which I suppose is a wrapper over the DevTestLabs REST API.

I can successfully connect to the lab and enumerate virtual machines in there and even start and stop a virtual machine. The two issues for me at this time are

a) there is no way to tell whether a particular Virtual machine is currently running or not. Hence the question is how do an automated tool chain figure this out and then decide whether to start the VM or not.

b) This is a bigger one. The REST api does provide a GET (LABVirtualMachine object in .NET) that provides the information about the virtual machine, but the network interface is always null. The fqdn property of the virtual machine is also null. So how does one connect to this new Virtual Machine and say, copy files. There does not appear to be a way to connect to the machine without knowing its name. To provide some color here, we have setup a private virtual network that extends our organization network and these VMs are NOT exposed through the public interface.

Thanks

解决方案

Hi adhingra,

Thank you for reaching out!

a): If you look at the documentation, you can see the example for the


expand format (i.e. properties(


expand=artifacts,computeVm,networkInterface,applicableSchedule)).

To get the PowerState, you need to expand the compute VM details, as in the following example.

subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}?api-version=2016-05-15&


这篇关于开发测试实验室自动化问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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