Go to main content

マニュアルページ セクション 8: システム管理コマンド

印刷ビューの終了

更新: 2022年7月27日
 
 

virtinfo(8)

名前

virtinfo - 仮想環境情報

形式

virtinfo [-acdptsu]
virtinfo [-c {<class>[,...] | all}] [<subcommand>] 
  list [[-H] -o <field>[,...]] [<environment>] ... 
  get  [[-H] -o <field>[,...]] {all | <property>[,...]}
     [<environment>] ...

説明

virtinfo ユーティリティーは、現在の環境、親環境、およびサポートされる環境のリストに関して libv12n(3LIB) によって返される仮想化情報を提供します。If no options are specified, virtinfo performs the equivalent of virtinfo list.

オプション

virtinfo コマンドは次のオプションをサポートしています。

–a

SPARC only: Execute with all flags.

–c

SPARC only: Report if a control domain.

–d

SPARC only: Report domain name.

–p

SPARC only: Parsable format.

–t

SPARC only: Report domain role.

–s

SPARC only: Report chassis serial number.

–u

SPARC only: Report UUID.

–c

Choose from available virtual environment classes: current, parent, supported, or unsupported.

Without the –c option, all classes are assumed.

サブコマンド

virtinfo コマンドは次のサブコマンドをサポートしています。

list [[–H] –o < field>[,...]] [<environment>] ...

Lists all virtual environments from chosen environment classes.このリストは、興味のある環境の一覧表示によって制限できます。各環境について、次のフィールドが表示されます。

name

環境名

class

Environment class.It can be current, parent, supported, or unsupported.

–H

スクリプティングモードで使用します。このオプションはヘッダーを出力せず、フィールドを任意のスペースではなく単一のタブで区切ります。

–o field

フィールドのコンマ区切りリストを表示します。

get [[–H] –o < field>[,...]] {all | <property>[,...]}
[<environment>] ...

環境のプロパティーを取得します。プロパティーは環境およびクラス固有です。たとえば、LDoms サポート済み環境は、LDoms の現在の環境に対して別のプロパティーをサポートできます。問い合わせる環境リストは、興味のある環境の一覧表示によって制限できます。

プロパティーごとに、次のフィールドが表示されます。

name

環境名

class

環境クラス

property

プロパティーの名前。

value

プロパティー値

–H

スクリプティングモードで使用します。このオプションはヘッダーを出力せず、フィールドを任意のスペースではなく単一のタブで区切ります。

–o field

フィールドのコンマ区切りリストを表示します。

If the subcommand is used to print selected properties (i.e. all is not used), all possible combinations of chosen classes and virtual environments, and selected properties are assumed and virtinfo errors out on the first invalid combination it iterates through.No partial output consisting of remaining valid combinations of a class, virtual environment, and property is printed in such a situation.

終了ステータス

次の終了ステータスが返されます。

0

正常終了。

>0

エラーが発生しました。

使用例 1 Viewing Default Information

次の例に、デフォルトの出力を示します。

$ virtinfo
NAME            CLASS      
logical-domain  current    
logical-domain  parent     
non-global-zone supported  
kernel-zone     supported  
logical-domain  unsupported

現在のドメインは LDoms ゲストドメインです。非大域ゾーンとカーネルゾーンの両方がゲストとしてサポートされます。非制御論理ドメインには常に logical-domain が親として表示されます。LDoms ゲストはゲストとして作成できません。

使用例 2 Getting All Properties for all Classes and Virtual Environments from within a Kernel Zone Virtual Environment

By providing all properties, the following example shows that the kernel-zone virtual environment is not supported from within Kernel Zones, and its status property provides the reason why not.It also shows that the solaris branded Zones are supported.As this example is run on bare metal x86 architecture, there is no parent class virtual environment.

$ virtinfo get all
NAME            CLASS       PROPERTY VALUE
kernel-zone     current     zonename bumblebee
non-global-zone supported   -        -
kernel-zone     unsupported status   not supported in kernel-zone
使用例 3 カーネルゾーンがサポートされているかどうかの確認

次の例は、現在の環境がカーネルゾーンのサポートに対応しているかどうかを確認する方法を示しています。

$ virtinfo -c supported list kernel-zone
NAME          CLASS
kernel-zone   supported
使用例 4 解析可能な形式でのすべての LDoms プロパティーの表示

次の例では、解析可能な形式で、LDoms 環境に関するすべての使用可能な情報を示しています。

$ virtinfo -c current get -H -o property,value all logical-domain
control-role    true
io-role true
root-role       true
service-role    true
domain-name     primary
uuid    da64f9b8-3e37-688e-cc3f-e90a59db1ad
control-name    leftarrow
chassis-serial-number   1228BDY5D4
使用例 5 Selecting a Property not Supported in Every Combination of a Class and Virtual Environment

The following example fails because the non-global-zone virtual environment in the supported class has no zonename property.As explained in the get subcommand section, if specific properties are queried, virtinfo errors out on the first invalid combination of a class, environment, and property.

$ virtinfo get zonename
virtual environment 'non-global-zone' in class 'supported' does not
support property: zonename

However, because the zonename property is supported for the kernel-zone environment in the current class if queried from within a Kernel Zone, we can narrow down the query.Note that you can always use get all to print only valid combinations of chosen classes and virtual environments with all available properties.

$ virtinfo -c current get zonename kernel-zone
NAME        CLASS   PROPERTY VALUE
kernel-zone current zonename kz1
使用例 6 From Within a Kernel Zone, Only Print the Current Virtual Environment zonename Property Value

This command prints the Kernel Zone name as used in the host.

$ virtinfo -c current get -H -o value zonename kernel-zone
kz1

属性

属性についての詳細は、マニュアルページの attributes(7) を参照してください。

属性タイプ
属性値
使用条件
system/library/libv12n
インタフェースの安定性
不確実

関連項目

libuuid(3LIB), libv12n(3LIB)