Index: branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Azure/AzureProvider.cs
===================================================================
--- branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Azure/AzureProvider.cs	(revision 7424)
+++ branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Azure/AzureProvider.cs	(revision 7429)
@@ -168,4 +168,11 @@
       return services;
     }
+
+    public string ChangeInstanceCount(Subscription subscription, string serviceName, string deploymentSlot, string roleName, int instanceCount) {
+      if (subscription == null) {
+        throw new ArgumentNullException("Subscription must not be null.", "subscription");
+      }
+      return ServiceManagementOperation.ChangeInstanceCount(subscription.SubscriptionID, subscription.CertificateThumbprint, serviceName, deploymentSlot, roleName, instanceCount);
+    }
   }
 }
Index: branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Azure/IAzureProvider.cs
===================================================================
--- branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Azure/IAzureProvider.cs	(revision 7424)
+++ branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Azure/IAzureProvider.cs	(revision 7429)
@@ -38,4 +38,6 @@
 
     List<HostedService> DiscoverSlaveService(Subscription subscription);
+    string ChangeInstanceCount(Subscription subscription, string serviceName, string deploymentSlot, string roleName, int instanceCount);
+
   }
 }
Index: branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Azure/ServiceManagementOperation.cs
===================================================================
--- branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Azure/ServiceManagementOperation.cs	(revision 7424)
+++ branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Azure/ServiceManagementOperation.cs	(revision 7429)
@@ -232,4 +232,14 @@
     }
 
+    public static string ChangeInstanceCount(string subscriptionId, string thumbprint, string serviceName, string deploymentSlot, string roleName, int instanceCount) {
+      string requestId = string.Empty;
+      XElement configuration = LoadConfiguration(subscriptionId, thumbprint, serviceName, deploymentSlot);
+      if (instanceCount != GetInstanceCount(configuration, roleName)) {
+        SetInstanceCount(configuration, roleName, instanceCount);
+        requestId = SaveConfiguration(subscriptionId, thumbprint, serviceName, deploymentSlot, configuration);
+      }
+      return requestId;
+    }
+
     public static string GetOperationStatus(string subscriptionId, string thumbprint, string requestId) {
       string uri = string.Format(Constants.URIGetOperationStatusFormat, subscriptionId, requestId);
Index: branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Model/Deployment.cs
===================================================================
--- branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Model/Deployment.cs	(revision 7424)
+++ branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Model/Deployment.cs	(revision 7429)
@@ -38,7 +38,9 @@
     public List<Role> RoleList { get; set; }
     public Subscription Subscription { get; set; }
+    public bool Modified { get; set; }
+    public int NewInstanceCount { get; set; }
 
     public Deployment() {
-
+      this.Modified = false;
     }
 
@@ -56,4 +58,6 @@
       this.RoleList = new List<Role>(original.RoleList);
       this.Subscription = cloner.Clone(original.Subscription);
+      this.Modified = original.Modified;
+      this.NewInstanceCount = original.NewInstanceCount;
 
     }
@@ -93,4 +97,6 @@
       this.RoleList = deployment.RoleList;
       this.Subscription = deployment.Subscription;
+      //this.Modified = deployment.Modified;
+      //this.NewInstanceCount = deployment.NewInstanceCount;
     }
   }
Index: branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/AddAzureServiceDialog.Designer.cs
===================================================================
--- branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/AddAzureServiceDialog.Designer.cs	(revision 7424)
+++ branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/AddAzureServiceDialog.Designer.cs	(revision 7429)
@@ -74,5 +74,5 @@
       this.cmbChooseSubscription.Location = new System.Drawing.Point(15, 25);
       this.cmbChooseSubscription.Name = "cmbChooseSubscription";
-      this.cmbChooseSubscription.Size = new System.Drawing.Size(471, 21);
+      this.cmbChooseSubscription.Size = new System.Drawing.Size(486, 21);
       this.cmbChooseSubscription.TabIndex = 2;
       this.cmbChooseSubscription.SelectedValueChanged += new System.EventHandler(this.cmbChooseSubscription_SelectedValueChanged);
@@ -92,5 +92,5 @@
       this.cmbChooseHostedService.Location = new System.Drawing.Point(15, 65);
       this.cmbChooseHostedService.Name = "cmbChooseHostedService";
-      this.cmbChooseHostedService.Size = new System.Drawing.Size(471, 21);
+      this.cmbChooseHostedService.Size = new System.Drawing.Size(486, 21);
       this.cmbChooseHostedService.TabIndex = 6;
       // 
@@ -109,5 +109,5 @@
       this.gbNewHostedService.Location = new System.Drawing.Point(15, 115);
       this.gbNewHostedService.Name = "gbNewHostedService";
-      this.gbNewHostedService.Size = new System.Drawing.Size(469, 145);
+      this.gbNewHostedService.Size = new System.Drawing.Size(486, 145);
       this.gbNewHostedService.TabIndex = 7;
       this.gbNewHostedService.TabStop = false;
@@ -277,11 +277,12 @@
       this.tbInstanceCount.Location = new System.Drawing.Point(13, 378);
       this.tbInstanceCount.Name = "tbInstanceCount";
-      this.tbInstanceCount.Size = new System.Drawing.Size(469, 20);
+      this.tbInstanceCount.Size = new System.Drawing.Size(488, 20);
       this.tbInstanceCount.TabIndex = 13;
+      this.tbInstanceCount.Validating += new System.ComponentModel.CancelEventHandler(this.tbInstanceCount_Validating);
       // 
       // lblCores
       // 
       this.lblCores.AutoSize = true;
-      this.lblCores.Location = new System.Drawing.Point(452, 361);
+      this.lblCores.Location = new System.Drawing.Point(471, 361);
       this.lblCores.Name = "lblCores";
       this.lblCores.Size = new System.Drawing.Size(30, 13);
@@ -292,5 +293,5 @@
       // 
       this.label10.AutoSize = true;
-      this.label10.Location = new System.Drawing.Point(417, 361);
+      this.label10.Location = new System.Drawing.Point(436, 361);
       this.label10.Name = "label10";
       this.label10.Size = new System.Drawing.Size(40, 13);
@@ -303,5 +304,5 @@
       this.progressBar.MarqueeAnimationSpeed = 10;
       this.progressBar.Name = "progressBar";
-      this.progressBar.Size = new System.Drawing.Size(307, 23);
+      this.progressBar.Size = new System.Drawing.Size(326, 23);
       this.progressBar.Style = System.Windows.Forms.ProgressBarStyle.Marquee;
       this.progressBar.TabIndex = 16;
@@ -309,5 +310,5 @@
       // btnOk
       // 
-      this.btnOk.Location = new System.Drawing.Point(326, 404);
+      this.btnOk.Location = new System.Drawing.Point(345, 404);
       this.btnOk.Name = "btnOk";
       this.btnOk.Size = new System.Drawing.Size(75, 23);
@@ -319,5 +320,5 @@
       // btnCancel
       // 
-      this.btnCancel.Location = new System.Drawing.Point(407, 404);
+      this.btnCancel.Location = new System.Drawing.Point(426, 404);
       this.btnCancel.Name = "btnCancel";
       this.btnCancel.Size = new System.Drawing.Size(75, 23);
@@ -344,5 +345,5 @@
       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
       this.AutoValidate = System.Windows.Forms.AutoValidate.EnableAllowFocusChange;
-      this.ClientSize = new System.Drawing.Size(496, 436);
+      this.ClientSize = new System.Drawing.Size(517, 436);
       this.Controls.Add(this.lblCertificateFile);
       this.Controls.Add(this.lblCores);
Index: branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/AddAzureServiceDialog.cs
===================================================================
--- branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/AddAzureServiceDialog.cs	(revision 7424)
+++ branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/AddAzureServiceDialog.cs	(revision 7429)
@@ -306,7 +306,7 @@
           e.Cancel = true;
         } else if (!isValidHostedServiceUrl(url)) {
-          errorProvider.SetError(tbLabel, "A hosted service name must be between 1 and 63 " +
-                                          "characters long, and be composed of letters, numbers " +
-                                          "and hyphens. Hyphens shouldn't be first or last letter.");
+          errorProvider.SetError(tbServiceName, "A hosted service name must be between 1 and 63 " +
+                                                "characters long, and be composed of letters, numbers " +
+                                                "and hyphens. Hyphens shouldn't be first or last letter.");
           e.Cancel = true;
         } else {
@@ -336,4 +336,31 @@
       }
     }
+
+    private void tbInstanceCount_Validating(object sender, CancelEventArgs e) {
+      if (!isValidInstanceCount(tbInstanceCount.Text)) {
+        errorProvider.SetError(tbInstanceCount, "Instance count must be a number greater than 0 and " +
+                                                 "less or equal than the difference between maximum and available cores.");
+        e.Cancel = true;
+      } else {
+        int instanceCount = Convert.ToInt32(tbInstanceCount.Text);
+        Subscription subscription = (Subscription)cmbChooseSubscription.SelectedItem;
+        if (instanceCount > subscription.MaxCoreCount - subscription.CurrentCoreCount) {
+          errorProvider.SetError(tbInstanceCount, "Instance count must be less or equal than the difference between maximum and available cores.");
+        } else {
+          e.Cancel = true;
+          errorProvider.SetError(tbInstanceCount, "");
+        }
+      }
+    }
+
+    private bool isValidInstanceCount(string text) {
+      string regexString = @"[1-9]+[0-9-]*";  //TODO
+      Regex regex = new Regex(regexString);
+      if (regex.IsMatch(text)) {
+        return true;
+      } else {
+        return false;
+      }
+    }
   }
 }
