Show Table of Contents
1.3. .rhevmshellrc 配置
.rhevmshellrc 是用户首次链接到 ovirt-shell 时自动创建和填充的配置文件 。它允许用户配置用来连接到 Red Hat Virtualization 环境的选项。默认情况下,.rhevmshellrc 文件位于 /home/[user name]/.rhevmshellrc。
.rhevmshellrc 文件配置信息包括在两个部分中,即 [cli] 和 [ovirt-shell]。解析该配置文件需要这两个部分。
表 1.1. [cli] 参数
| 名称 | 类型 | 描述 |
|---|---|---|
autoconnect
|
布尔值
|
是否自动连接到 ovirt-shell 部分。该状态可以是
True 或者 False。
|
autopage
|
布尔值
|
指定在 shell 中是否分页。它的值是
True 或 False。
|
表 1.2. [ovirt-shell] 参数
| 名称 | 类型 | 描述 |
|---|---|---|
username
|
字符串
|
登录用户的用户名。
|
timeout
|
整数
|
指定请求超时的时间。默认值为 -1。
|
extended_prompt
|
布尔值
|
切换扩展的提示选项,使用该选项可在 shell 命令提示符后显示主机名。
|
url
|
字符串
|
Red Hat Virtualization 环境的地址。
|
insecure
|
布尔值
|
指定是否需要 CA 证书。它的值是
True 或 False。
|
renew_session
|
布尔值
|
会话过期后是否自动续订。它的值可以是
True 或者 False。
|
filter
|
布尔值
|
指定是否需要进行对象过滤。对象过滤允许用户根据对象的权限获取相关的对象。只有具有 admin 角色的用户才可以设置这个选项。它的值是
True 或 False。
|
session_timeout
|
整数
|
以分钟为单位指定认证会话的超时时间。必须是一个正数。
|
ca_file
|
字符串
|
指定要使用的 CA 证书。
|
dont_validate_cert_chain
|
布尔值
|
是否验证服务器 CA 证书。它的值可以是
True 或 False。
|
key_file
|
字符串
|
指定客户端 PEM key-file。
|
password
|
字符串
|
登录用户所使用的密码。
|
cert_file
|
字符串
|
指定客户端 PEM cert-file。
|

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.