Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 176760

USVM (Guest Introspection) ログの採取方法

$
0
0

本記事では、USVM(Guest Introspection)のログ採取手順をご案内します。

 

※本記事の手順は以下のVMware KBより抜粋、および改変したものです。

最新の情報については以下のKBをご参照ください

How to collect logs in NSX for vSphere 6.x Guest Introspection (2144624)

 

 

### ログ取得手順 ###

 

1. ホスト MOID を特定します。

a. Web ブラウザを開き、https://<vcenter_IP>/mob/ を参照します。

b. vCenter Server の管理者認証情報(vCenter SSO)を使用してログインします。

c. [content]をクリックして、[group-d1] をクリックします。

d. childEntity で、ESXi ホストがあるデータセンターの [datacenter-##] をクリックします。

e. hostFolder で [group-h##] をクリックします。

f. childEntity で、ESXi ホストがあるクラスタの [domain-c##] をクリックします。

   ホスト セクションに、すべてのホスト MOID のリストが表示されます。

   以下のように表示されますので、host-##の部分を記録してください。

 

0.png

 

※ 手順中 ##の部分には環境に応じた数字が入ります。

VxRail 4.0 & 組み込み型vcsaの場合は通常は以下の数字の組み合わせになります

[group-d1]  > [datacenter-2] > [group-h4] > [domain-c7]

 

VxRail 4.5 & 組み込み型vcsaの場合は通常は以下の数字の組み合わせになります

[group-d1]  > [datacenter-2] > [group-h4] > [domain-c8]

 

 

2. ログを生成するには、次のコマンドを実行します。コマンド中、host-##の部分には手順1で取得したMOIDを代入してください。

    また、コマンド中<>の部分には、それぞれNSX ManagerのAdminユーザのパスワード、NSX ManagerのIPアドレスを代入してください。

 

vcsa:~# curl -D - -k -u 'admin:<NSXMGRのpassword>' -L -X GET https://<NSXMGRのIP>/api/1.0/hosts/host-##/techsupportlogs -o host-##-usvm.log.gz

 

※ -D - -k の部分は入力ミスではありませんのでそのままご入力下さい

※生成されたログをそのままDell EMCにご提供ください

※USVM(Guest Introspection VM)が稼働するすべてのホストに対してご取得ください

※本コマンドはcurlコマンドを実行できるLinuxホストから実施できます。

   VCSA上でコマンドを実行し、作成したログをSCPでダウンロードする際に正常にアクセスができない場合は下記をご参照ください。

   WinSCP を使用してファイルを vCenter Server Appliance にアップロードするとエラーが発生する (2107727)

 

 

■GIのログ採取APIの成功例(curlのHTTPステータスコードとファイルサイズで判断)

$ curl -D - -k -u 'admin:Passw0rd!' -L -X GET https://192.168.0.1/api/1.0/hosts/host-10/techsupportlogs -o host-10-usvm.log.gz

HTTP/1.1 303 See Other

...

 

HTTP/1.1 200 OK

...

 

$ ls -l host-10-usvm.log.gz

-rw-rw-r-- 1 administrator administrator 8967  9月 27 04:10 host-10-usvm.log.gz

 

■GIのログ採取APIの失敗例

$ curl -D - -k -u 'admin:Passw0rd!' -L -X GET https://192.168.0.1/api/1.0/hosts/host-10/techsupportlogs -o host-10-usvm.log.gz

HTTP/1.1 400 Bad Request

...

 

$ ls -l host-10-usvm.log.gz

-rw-rw-r-- 1 administrator administrator 160  9月 27 04:23 host-10-usvm.log.gz

 

$ cat host-10-usvm.log.gz

<?xml version="1.0" encoding="UTF-8"?>

<error><details>RPC request timed out.</details><errorCode>2502</errorCode><moduleName>core-services</moduleName></error>

 

■ 失敗例:SSL Unknown Protocol

$ curl -D - -k -u 'admin:Passw0rd!' -L -X GET https://192.168.0.1/api/1.0/hosts/host-10/techsupportlogs -o host-10-usvm.log.gz

* About to connect() to 192.168.0.1 port 443 (#0)

*   Trying 192.168.0.1... connected

* Connected to 192.168.0.1 (192.168.0.1) port 443 (#0)

* successfully set certificate verify locations:

*   CAfile: none

CApath: /etc/ssl/certs/

* TLSv1.0, TLS handshake, Client hello (1):

* error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol

* Closing connection #0

curl: (35) error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol

※上記はcurl コマンドが使用するopensslのVersionが古いことに由来しています。

openssl 1.0以降を利用している端末から実施してください。


Viewing all articles
Browse latest Browse all 176760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>