Repository: cloudstack
Updated Branches:
  refs/heads/master 1aef5cba6 -> e427d0004


CLOUDSTACK-7253: For LXC Vms, show unsupported error for console access


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d6fdb7c6
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d6fdb7c6
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d6fdb7c6

Branch: refs/heads/master
Commit: d6fdb7c6bc9d370769f2581e0258c809650fed9a
Parents: 1aef5cb
Author: Kishan Kavala <kis...@apache.org>
Authored: Thu Oct 23 19:20:36 2014 +0530
Committer: Kishan Kavala <kis...@apache.org>
Committed: Mon Nov 3 17:19:15 2014 +0530

----------------------------------------------------------------------
 server/src/com/cloud/servlet/ConsoleProxyServlet.java | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d6fdb7c6/server/src/com/cloud/servlet/ConsoleProxyServlet.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/servlet/ConsoleProxyServlet.java 
b/server/src/com/cloud/servlet/ConsoleProxyServlet.java
index bf021ea..8cbe82b 100644
--- a/server/src/com/cloud/servlet/ConsoleProxyServlet.java
+++ b/server/src/com/cloud/servlet/ConsoleProxyServlet.java
@@ -47,6 +47,7 @@ import 
org.apache.cloudstack.framework.security.keys.KeysManager;
 
 import com.cloud.exception.PermissionDeniedException;
 import com.cloud.host.HostVO;
+import com.cloud.hypervisor.Hypervisor;
 import com.cloud.server.ManagementServer;
 import com.cloud.storage.GuestOSVO;
 import com.cloud.user.Account;
@@ -262,6 +263,11 @@ public class ConsoleProxyServlet extends HttpServlet {
             return;
         }
 
+        if (Hypervisor.HypervisorType.LXC.equals(vm.getHypervisorType())){
+            sendResponse(resp, "<html><body><p>Console access is not supported 
for LXC</p></body></html>");
+            return;
+        }
+
         String rootUrl = _ms.getConsoleAccessUrlRoot(vmId);
         if (rootUrl == null) {
             sendResponse(resp, "<html><body><p>Console access will be ready in 
a few minutes. Please try it again later.</p></body></html>");

Reply via email to