简体   繁体   English

如何将Azure VM与云服务相关联?

[英]How do I associate Azure VM with a cloud service?

I have a VM in Azure, but it is not associated to a cloud service. 我在Azure中有一个VM,但是它没有与云服务关联。 I just now added a cloud service, now how can i get my VM associated with that cloud service? 我刚刚添加了云服务,现在如何使我的VM与该云服务相关联? The reason i'm doing this is so that i can get my public IP assigned to that VM. 我这样做的原因是为了可以将我的公共IP分配给该VM。

Azure VMs are always associated with a cloud service. Azure VM始终与云服务关联。 If you look in the old portal, the DNS name for the VM is the cloud service the VM is associated with, ie {yourVM}.cloudapp.net. 如果查看旧门户,则VM的DNS名称是与VM关联的云服务,即{yourVM} .cloudapp.net。 If you want to move the VM to an existing cloud service, know that you can only move the VM to an existing cloud service that is empty. 如果要将虚拟机移至现有的云服务,请知道您只能将虚拟机移至现有的空云服务。

To move the VM: 要移动VM:

  • delete the VM, retain the hard drive and note its name - NOTE this takes a while 删除虚拟机,保留硬盘驱动器并记下其名称-注意这需要一段时间
  • create a new VM by choosing "My Disks" when choosing an image and select the disk name from the previous VM to reattaching the existing hard drive 通过在选择映像时选择“我的磁盘”来创建新的VM,并从先前的VM中选择磁盘名称以重新连接现有的硬盘驱动器
  • On step 3, select an existing cloud service (must be empty) 在步骤3中,选择一个现有的云服务(必须为空)

Cloud service is the wrapper of VM. 云服务是VM的包装。 There are two options while you create a VM- 创建VM时有两个选项-

  1. VM is created in already existing cloud service if explicitly chosen 如果明确选择,则在已存在的云服务中创建VM
  2. Cloud service is automatically created with the same name as VM Name if explicitly existing cloud service is not chosen while creating a vm . 如果在创建vm时未选择显式存在的云服务,则会使用与VM名称相同的名称自动创建云服务。

The concept of cloud service is, it wraps the VM. 云服务的概念是,它包装了VM。 Also, a public IP is automatically assigned for the cloud service so that the VM can be accessed over internet. 另外,会为云服务自动分配一个公共IP,以便可以通过Internet访问VM。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用WAR文件将Java应用程序部署到Azure云服务(不是VM或App Service)? - How do I deploy my Java Application to Azure Cloud Service(not VM or App Service) using a WAR file? 如何安全地从Cloud Service and Availability Set中的另一个Azure VM访问一个Azure VM - How do I safely access one Azure VM from another within a Cloud Service and Availability Set 如何在特定的云服务中创建Azure虚拟机? - how can i create a azure VM in a specific cloud service? 如何让云服务与 Azure 中的 VM 通信? - How can I get a Cloud Service to communicate to a VM in Azure? Azure:如何将保留的IP与现有的应用程序服务(不是VM)相关联 - Azure: how to associate a reserved IP to an existing App Service (Not a VM) 如何使用Azure PowerShell将VM规模集与负载均衡器关联 - How do I associate a VM scale set with a load balancer using Azure PowerShell 在Azure中更改VM的云服务 - Changing Cloud Service of a VM in Azure 将Azure VM转换为Cloud Service - Convert Azure VM to Cloud Service 如何将WCF服务提升为Azure云服务? - How do I promote WCF Service to Azure Cloud Service? 如何以编程方式更改Azure云服务或VM的IP地址? - How can I programmatically change the IP address of an Azure Cloud Service or VM?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM