You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ra...@apache.org on 2014/05/13 08:04:29 UTC
git commit: updated refs/heads/4.4-forward to 260e06d
Repository: cloudstack
Updated Branches:
refs/heads/4.4-forward 594f66d12 -> 260e06d64
CLOUDSTACK-6519 [Hyper-V] while adding VM to Network it should throw error when it is in running state
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/260e06d6
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/260e06d6
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/260e06d6
Branch: refs/heads/4.4-forward
Commit: 260e06d64c07c6e5f3c133d8bdc2779fad62c672
Parents: 594f66d
Author: Rajesh Battala <ra...@citrix.com>
Authored: Tue May 13 11:39:14 2014 +0530
Committer: Rajesh Battala <ra...@citrix.com>
Committed: Tue May 13 11:39:33 2014 +0530
----------------------------------------------------------------------
.../hypervisor/hyperv/resource/HypervDirectConnectResource.java | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/260e06d6/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/resource/HypervDirectConnectResource.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/resource/HypervDirectConnectResource.java b/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/resource/HypervDirectConnectResource.java
index 1816baf..f29839d 100644
--- a/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/resource/HypervDirectConnectResource.java
+++ b/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/resource/HypervDirectConnectResource.java
@@ -531,6 +531,10 @@ public class HypervDirectConnectResource extends ServerResourceBase implements S
try {
String vmName = cmd.getVmName();
+ if(cmd.getVMType() == VirtualMachine.Type.User) {
+ s_logger.error("Vm in Running state cannot be added to new network.Nic cannot be plugged to VM in running state");
+ return new PlugNicAnswer(cmd, false, "Vm in Running state cannot be added to new network.Nic cannot be plugged to VM in running state");
+ }
NicTO nic = cmd.getNic();
URI broadcastUri = nic.getBroadcastUri();
if (BroadcastDomainType.getSchemeValue(broadcastUri) != BroadcastDomainType.Vlan) {