I have create a new cloud service in Azure called "website" and now i'm trying to add multiple VMs in it via the Azure CLI client. Here are the steps I've followed:
**1) Create the cloud service:**
azure service create --affinitygroup testazure myapptest
**2) Create the first web server without any issues:**
azure vm create --ssh 22 --virtual-network-name test3 --subnet-names "Subnet-1" --vm-size medium --custom-data startup-default --vm-name www01 myapptest "b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu-13_10-amd64-server-20140507-en-us-30GB" "admin" [PASSWORD]
**3) Create the second web server:**
azure vm create --ssh 22 --virtual-network-name test3 --subnet-names "Subnet-1" --vm-size medium --custom-data startup-default --vm-name www02 myapptest "b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu-13_10-amd64-server-20140507-en-us-30GB" "admin" [PASSWORD]
**Although I get the following error:**
error: A VM with dns prefix "myapptest" already exists
error: vm create command failed
I'm aware that the command format is as follows:
vm create [options] [dns-name] [image] [user-name] [password]
Essentially I'm trying to create multiple servers in the "**mytestapp**" cloud service, so I figured I would have to specify "mytestapp" for the "**dns-name**" parameter although apparently I'm wrong. I can easily create this VM via the website within the "mytestapp" cloud service so I'm unsure why this doesn't work.
I would really appreciate any clarification on this matter.
Thanks!
**1) Create the cloud service:**
azure service create --affinitygroup testazure myapptest
**2) Create the first web server without any issues:**
azure vm create --ssh 22 --virtual-network-name test3 --subnet-names "Subnet-1" --vm-size medium --custom-data startup-default --vm-name www01 myapptest "b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu-13_10-amd64-server-20140507-en-us-30GB" "admin" [PASSWORD]
**3) Create the second web server:**
azure vm create --ssh 22 --virtual-network-name test3 --subnet-names "Subnet-1" --vm-size medium --custom-data startup-default --vm-name www02 myapptest "b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu-13_10-amd64-server-20140507-en-us-30GB" "admin" [PASSWORD]
**Although I get the following error:**
error: A VM with dns prefix "myapptest" already exists
error: vm create command failed
I'm aware that the command format is as follows:
vm create [options] [dns-name] [image] [user-name] [password]
Essentially I'm trying to create multiple servers in the "**mytestapp**" cloud service, so I figured I would have to specify "mytestapp" for the "**dns-name**" parameter although apparently I'm wrong. I can easily create this VM via the website within the "mytestapp" cloud service so I'm unsure why this doesn't work.
I would really appreciate any clarification on this matter.
Thanks!