Skip to content

Commit 9c488b1

Browse files
authored
System VM access instructions and security details
Updated instructions for accessing System VMs via SSH and Web Console, including details for enabling randomized passwords for the SysVMs.
1 parent 31baeb8 commit 9c488b1

File tree

1 file changed

+78
-15
lines changed

1 file changed

+78
-15
lines changed

source/adminguide/systemvm.rst

Lines changed: 78 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -147,51 +147,114 @@ Accessing System VMs
147147

148148
It may sometimes be necessary to access System VMs for diagnostics of certain
149149
issues, for example if you are experiencing SSVM (Secondary Storage VM)
150-
connection issues. Use the steps below in order to connect to the SSH console
151-
of a running System VM.
150+
connection issues. Use the methods below in order to connect to any running
151+
System VM, including VR (Virtual Router) and CPVM (ConsoleProxyVM).
152+
153+
Option A: Accessing via SSH
154+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
152155

153156
Accessing System VMs over the network requires the use of private keys and
154-
connecting to System VMs SSH Daemon on port 3922. XenServer/KVM Hypervisors
155-
store this key at /root/.ssh/id_rsa.cloud on each CloudStack agent. To access
157+
connecting to System VMs SSH Daemon on port **3922**. XenServer/KVM Hypervisors
158+
store this key at ``/root/.ssh/id_rsa.cloud`` on each CloudStack agent. To access
156159
System VMs running on ESXi, the key is stored on the management server at
157-
~cloud/.ssh/id_rsa.
160+
``~cloud/.ssh/id_rsa``.
158161

159162

160163
#. Find the details of the System VM
161164

162-
#. Log in with admin privileges to the CloudStack UI.
165+
#. Log in with Root Admin privileges to the **CloudStack UI**.
163166

164-
#. Click Infrastructure, then System VMs, and then click the name of a
167+
#. Click **Infrastructure > System VMs**, and then click the name of a
165168
running VM.
166169

167170
#. Take a note of the 'Host', 'Private IP Address' and 'Link Local IP
168171
Address' of the System VM you wish to access.
169172

170-
#. XenServer/KVM Hypervisors
173+
#. For XenServer/KVM Hypervisors
171174

172-
#. Connect to the Host of which the System VM is running.
175+
#. Connect via SSH as `root` to the Host of which the System VM is running.
173176

174177
#. SSH to the 'Link Local IP Address' of the System VM from the Host on
175178
which the VM is running.
176179

177-
Format: ssh -i <path-to-private-key> <link-local-ip> -p 3922
180+
Format: ``ssh -i <path-to-private-key> <link-local-ip> -p 3922``
178181

179-
Example: root@kvm01:~# ssh -i /root/.ssh/id_rsa.cloud 169.254.3.93 -p 3922
182+
Example: ``root@kvm01:~# ssh -i /root/.ssh/id_rsa.cloud 169.254.3.93 -p 3922``
180183

181-
#. ESXi Hypervisors
184+
#. For ESXi Hypervisors
182185

183186
#. Connect to your CloudStack Management Server.
184187

185188
#. ESXi users should SSH to the private IP address of the System VM.
186189

187-
Format: ssh -i <path-to-private-key> <vm-private-ip> -p 3922
190+
Format: ``ssh -i <path-to-private-key> <vm-private-ip> -p 3922``
191+
192+
Example: ``root@management:~# ssh -i ~cloud/.ssh/id_rsa 172.16.0.250 -p 3922``
193+
194+
195+
Option B: Accessing via the Web Console
196+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
197+
198+
If network access is restricted or the SSH daemon is unresponsive, administrators can
199+
access the System VM directly through the CloudStack UI.
200+
201+
#. For any hypervisor, using the default password.
202+
203+
#. Log in with Root Admin privileges to the **CloudStack UI**.
204+
205+
#. Click **Infrastructure > System VMs**, and then click the name of a
206+
running VM.
207+
208+
#. Click the **View Console** button (screen icon) in the top right toolbar.
209+
210+
#. Default Username: ``root``
211+
212+
#. Default Password: ``password``
213+
214+
#. For any hypervisor, if ``system.vm.random.password`` is enabled (recommended).
215+
216+
#. Log in with Root Admin privileges to the **CloudStack UI**.
217+
218+
#. Click **Infrastructure > System VMs**, and then click the name of a
219+
running VM.
220+
221+
#. Click the **View Console** button (screen icon) in the top right toolbar.
222+
223+
#. Default Username: ``root``
224+
225+
#. The decrypted password can be found under the ``system.vm.password`` global parameter.
226+
227+
228+
How to Enable System VM Random Password
229+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
230+
231+
To step up the security of the environment, by configuring the ``system.vm.random.password`` parameter to **True**, and restart the Management Server, a random password is generated and stored encrypted in the database. The decrypted password found under the ``system.vm.password`` global parameter, or by calling the ``listConfigurations`` API, still need to be decrypted to reveal the usable password.
232+
233+
#. Find the encrypted password and encryption key
234+
235+
#. Log in with Root Admin privileges to the **CloudStack UI**.
236+
237+
#. Click **Configuration > Global Settings**, and search for ``system.vm.password``.
238+
239+
Or using CloudMonkey: ``cmk listconfigurations name=system.vm.password``
240+
241+
#. On the Management Server, read the content of the file ``/etc/cloudstack/management/key`` to obtain
242+
the encryption/decryption key.
243+
244+
#. Decrypt the password with the obtained key from the Management Server.
245+
246+
Format: ``java -classpath /usr/share/cloudstack-common/lib/cloudstack-utils.jar \
247+
com.cloud.utils.crypt.EncryptionCLI -p <encryption-key> -i <encrypted-password> -d -e V2``
248+
249+
Example: ``root@management:~# java -classpath /usr/share/cloudstack-common/lib/cloudstack-utils.jar \
250+
com.cloud.utils.crypt.EncryptionCLI -p `cat /etc/cloudstack/management/key` -i `cmk listconfigurations \
251+
name=system.vm.password | jq -r '.configuration[0].value'` -d -e V2``
188252

189-
Example: root@management:~# ssh -i ~cloud/.ssh/id_rsa 172.16.0.250 -p 3922
190253

191254
Multiple System VM Support for VMware
192255
-------------------------------------
193256

194-
Every CloudStack zone has single System VM for Template processing tasks
257+
Every CloudStack zone has a single System VM for Template processing tasks
195258
such as downloading Templates, uploading Templates, and uploading ISOs.
196259
In a zone where VMware is being used, additional System VMs can be
197260
launched to process VMware-specific tasks such as taking Snapshots and

0 commit comments

Comments
 (0)