Rocky Pulley
Rocky Pulley

Reputation: 23321

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. I just now added a cloud service, now how can i get my VM associated with that cloud service? The reason i'm doing this is so that i can get my public IP assigned to that VM.

Upvotes: 0

Views: 1726

Answers (2)

Aatif Akhter
Aatif Akhter

Reputation: 2206

Cloud service is the wrapper of VM. There are two options while you create a VM-

  1. VM is created in already existing cloud service if explicitly chosen
  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 .

The concept of cloud service is, it wraps the VM. Also, a public IP is automatically assigned for the cloud service so that the VM can be accessed over internet.

Upvotes: 0

viperguynaz
viperguynaz

Reputation: 12174

Azure VMs are always associated with a cloud service. If you look in the old portal, the DNS name for the VM is the cloud service the VM is associated with, i.e. {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:

  • 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
  • On step 3, select an existing cloud service (must be empty)

Upvotes: 1

Related Questions