Subscribe to our blog

by Rob Locke (Red Hat)

One of the new features introduced in version 3.1 of Red Hat Enterprise Virtualization is a command line interface (CLI) to connect to the manager. The CLI also contains a scripting system, which helps system administrators perform periodic maintenance or repetitive tasks on their virtualization environment.

Communication with the RHEV Manager is secured through the use of a certificate that needs to be downloaded from the manager:

$ wget http://rhevm.pod0.example.com/ca.crt

Connect to the RHEV Manager using the rhevm-shell command (referring to the downloaded certificate):

$ rhevm-shell -l https://rhevm.pod0.example.com/api \
-u rhevadmin@example.com -A ca.crt -c
Password: redhat
... output omitted ...
[RHEVM shell (connected)]#

There are numerous subcommands that can be specified at the rhevm-shell prompt. Use help for a list of subcommands, then help subcommand to see what can be done:

[RHEVM shell (connected)]# help
... output omitted ...
[RHEVM shell (connected)]# help action
... output omitted ...

Those rhevm-shell subcommands can be entered interactively from the prompt above or embedded in a text file for automation from a standard shell prompt:

$ cat /tmp/rhel0.shutdown
action vm rhel0 shutdown
exit
$ rhevm-shell -l https://rhevm.pod0.example.com/api \
-u rhevadmin@example.com -A ca.crt -f /tmp/rhel0.shutdown -c
Password: redhat

Learn more about rhevm-shell and other methods of automation in our updated Red Hat Enterprise Virtualization (RH318) course.

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.


Über den Autor

Nach Thema durchsuchen

automation icon

Automatisierung

Erfahren Sie das Neueste von der Automatisierungsplattform, die Technologien, Teams und Umgebungen verbindet

AI icon

Künstliche Intelligenz

Erfahren Sie das Neueste von den Plattformen, die es Kunden ermöglichen, KI-Workloads beliebig auszuführen

cloud services icon

Cloud Services

Mehr erfahren über Managed Cloud Services

security icon

Sicherheit

Erfahren Sie, wie wir Risiken in verschiedenen Umgebungen und Technologien reduzieren

edge icon

Edge Computing

Erfahren Sie das Neueste von den Plattformen, die die Operations am Edge vereinfachen

Infrastructure icon

Infrastruktur

Erfahren Sie das Neueste von der weltweit führenden Linux-Plattform für Unternehmen

application development icon

Anwendungen

Entdecken Sie unsere Lösungen für komplexe Anwendungsherausforderungen

Original series icon

Original Shows

Interessantes von den Experten, die die Technologien in Unternehmen mitgestalten