<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % BOOK_ENTITIES SYSTEM "cloudstack.ent">
%BOOK_ENTITIES;
]>

<!-- Licensed to the Apache Software Foundation (ASF) under one
 or more contributor license agreements.  See the NOTICE file
 distributed with this work for additional information
 regarding copyright ownership.  The ASF licenses this file
 to you under the Apache License, Version 2.0 (the
 "License"); you may not use this file except in compliance
 with the License.  You may obtain a copy of the License at
 
   http://www.apache.org/licenses/LICENSE-2.0
 
 Unless required by applicable law or agreed to in writing,
 software distributed under the License is distributed on an
 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
-->

<section id="accessing-system-vms">
    <title>Accessing System VMs</title>
    <para>It may sometimes be necessary to access  System VMs for diagnostics of certain issues, for example if you are experiencing SSVM (Secondary Storage VM) connection issues. Use the steps below in order to connect to the SSH console of a running System VM.</para>
    <para>
    Accessing System VMs over the network requires the use of private keys and connecting to System VMs SSH Daemon on port 3922.
    XenServer/KVM Hypervisors store this key at /root/.ssh/id_rsa.cloud on each &PRODUCT; agent.
    To access System VMs running on ESXi, the key is stored on the management server at /var/lib/cloudstack/management/.ssh/id_rsa.
    </para>
    <orderedlist>
      <listitem>
        <para>Find the details of the System VM</para>
        <orderedlist numeration="loweralpha">
          <listitem><para>Log in with admin privileges to the &PRODUCT; UI.</para></listitem>
          <listitem><para>Click Infrastructure, then System VMs, and then click the name of a running VM.</para></listitem>
          <listitem><para>Take a note of the 'Host', 'Private IP Address' and 'Link Local IP Address' of the System VM you wish to access.</para></listitem>
        </orderedlist>
        <para><inlinegraphic format="PNG" fileref="images/view-systemvm-details.png"/></para>
      </listitem>
      <listitem>
        <para>XenServer/KVM Hypervisors</para>
        <orderedlist numeration="loweralpha">
          <listitem><para>Connect to the Host of which the System VM is running.</para></listitem>
          <listitem><para>SSH the 'Link Local IP Address' of the System VM from the Host on which the VM is running.</para></listitem>
          <listitem><para>Format: ssh -i &lt;path-to-private-key&gt; &lt;link-local-ip&gt; -p 3922</para></listitem>
          <listitem><para>Example: root@faith:~# ssh -i /root/.ssh/id_rsa.cloud 169.254.3.93 -p 3922</para></listitem>          
        </orderedlist>
      </listitem>
      <listitem>
        <para>ESXi Hypervisors</para>
        <orderedlist numeration="loweralpha">
          <listitem><para>Connect to your &PRODUCT; Management Server.</para></listitem>
          <listitem><para>ESXi users should SSH to the private IP address of the System VM.</para></listitem>
          <listitem><para>Format: ssh -i &lt;path-to-private-key&gt; &lt;vm-private-ip&gt; -p 3922</para></listitem>
          <listitem><para>Example: root@management:~# ssh -i /var/lib/cloudstack/management/.ssh/id_rsa 172.16.0.250 -p 3922</para></listitem>
        </orderedlist>
       </listitem>
    </orderedlist>
    
    
    
    
</section>
