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.
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
About the author
Browse by channel
Automation
The latest on IT automation that spans tech, teams, and environments
Artificial intelligence
Explore the platforms and partners building a faster path for AI
Open hybrid cloud
Explore how we build a more flexible future with hybrid cloud
Security
Explore how we reduce risks across environments and technologies
Edge computing
Updates on the solutions that simplify infrastructure at the edge
Infrastructure
Stay up to date on the world’s leading enterprise Linux platform
Applications
The latest on our solutions to the toughest application challenges
Original shows
Entertaining stories from the makers and leaders in enterprise tech
Products
- Red Hat Enterprise Linux
- Red Hat OpenShift
- Red Hat Ansible Automation Platform
- Cloud services
- See all products
Tools
- Training and certification
- My account
- Developer resources
- Customer support
- Red Hat value calculator
- Red Hat Ecosystem Catalog
- Find a partner
Try, buy, & sell
Communicate
About Red Hat
We’re the world’s leading provider of enterprise open source solutions—including Linux, cloud, container, and Kubernetes. We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.
Select a language
Red Hat legal and privacy links
- About Red Hat
- Jobs
- Events
- Locations
- Contact Red Hat
- Red Hat Blog
- Diversity, equity, and inclusion
- Cool Stuff Store
- Red Hat Summit