mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-6519 [Hyper-V] while adding VM to Network it should throw error when it is in running state
This commit is contained in:
parent
a7bf66b9f0
commit
799480cf05
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue