はじめに
この記事はNutanix Advent Calendar 2020の12月15日分として執筆しました。
こんにちは!Nutanix Advent Calendar初参加です!今回はPythonを使ってNutanixクラスタ上にイメージをアップロードする手順のご紹介です。
Nutanixのクラスタへイメージのアップロード
Nutanix環境を使っていると、繰り返し行う作業をまとめて1回で実行したいシーンありますよね? 例えば、仮想マシンのベースイメージやISOファイルをまとめて、Image Congigurationにアップロードしたい! 私の場合、Foundation後に同じイメージをアップロードするケースが多々あるので、Pythonで少しだけ楽をしたいと思います。 そのような悩みをお持ちの皆様の助けになれば幸いです。
NutanixのREST APIの仕様確認
NutanixのサイトからREST APIの仕様を確認します。 今回は、API V2を利用します。以下、リンクより仕様の確認が可能です。
Nutanix RESTAPI V2また、PrismからもAPIの仕様を確認することができます。 これは、超便利!!Prismの右上のユーザーをクリックすると表示されます。
Nutanix API V2
ImageをPOSTするには、Bodyに下記のパラメーターを埋め込む必要があります。
"name": "イメージの名前"
"annotation": ""
"image_type": "DISK_IMAGE or ISOイメージ"
"image_import_spec": {
"storage_container_uuid": コンテナのUUID
"url": ”HTTP or NFS Target”
}
では、上記内容を元にコードの作り込みに入っていきたいと思います。
環境準備
今回実行した環境は以下の通りです。
・python 3.7
・Hypervisor AHV(20170830.453)
・AOS(5.15.3)
・Webサーバー(NFSも可)
コードの作成
必要なパラメータの中で、Foundation後に毎回変わるパラメータが、コンテナのUUIDになります。 今回は、defaultで作成されるコンテナに、VMイメージをアップロードしますので、そのUUIDを取得する必要があります。 コンテナのUUIDの取得方法については、一番簡単な、ncliから取得する形で実装しました。 REST APIから、取得する方法もありますが、コマンドで実装されている部分は、コマンドで取得した方が楽かなと思ったので、、、ここの選択には好みもあるかなーと。 コマンドの出力をjsonにて出力するため、オプションを追加します。
ncli container list --json=true
sshのアクセス方法として、paramikoモジュールを使いました。 では、コンテナのUUIDを取得してみます。 コードについては、下記の通りです。
import paramiko,json #パラメーター user = "admin" new_password = "xxxxxxx" IP = "172.29.161.60" def exec_command(ip, user, password, command): client = paramiko.SSHClient() client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) client.connect(ip, username=user, password=password, timeout=3.0) (stdin, stdout, stderr) = client.exec_command(command) output = stdout.read().decode() client.close() return output #ncliをjsonで出力 container = exec_command(IP, user, new_password,"source /etc/profile; ncli container list --json=true") containerdict = json.loads(container) containernames = containerdict["data"] for i in containernames: if "default" in i["name"]: container_name = i["name"] container_uuid = i["containerUuid"] print(container_uuid)
無事UUIDゲットできましたー!
[root@localhost ~]#python3 Image_Post_v3.py 513cc828-3868-4eea-8349-xxxxxxxxxxxxx
次に、イメージをUploadする方法です。 パラメータはコード内に組み込みました。 別ファイルに保存して読み込む形もありです。 urlには、イメージがdownload可能なURLを指定します。
import json,requests,urllib3 from urllib3.exceptions import InsecureRequestWarning urllib3.disable_warnings(InsecureRequestWarning) #パラメーター user = "admin" new_password = "xxxxxxxxxxx" IP = "172.29.161.60" centvm = "http://172.29.30.11/iso/centos7-1.qcow2" #ImagePost_Body centvm_dict = { "name": "CentOS7", "annotation": "", "image_type": "DISK_IMAGE", "image_import_spec": { "storage_container_uuid": container_uuid, ←取得したコンテナのUUID "url": centvm,←VMイメージがダウンロード可能なURL } } #make session session = requests.Session() session.auth = (user, new_password) session.verify = False session.headers.update({'Content-Type': 'application/json; charset=utf-8'}) response = session.post('https://172.29.161.60:9440/api/nutanix/v2.0/images/',data=json.dumps(centvm_dict, indent=2)) if response.ok: print("centos7 Upload is ok") else: print("centos7 Upload is fault")
以上で、VMののアップロードができました!
[root@localhost ~]#python3 Image_Post_v3.py centos7 Upload is ok
GUIでも確認してみると、ちゃんとアップされていることが確認取れました。
手動でイメージをアップロードする際は、パラメータを複数入力する必要があるため、 同じようなイメージを何度も入れる場合は、是非こちらを使ってみてください。以上です! 最後まで、読んで頂きありがとうございました。
admin@NTNX-SGH010TH1Q-A-CVM:172.29.161.61:~$ ncli
Welcome, admin
You're now connected to 0005b4d4-5120-e489-5297-08f1ea7e5200 (DXCluster) at 127.0.0.1
<ncli> help
Command Formats:
<ncli> <entity> <action> [ <name> = <value> ]...
<ncli> help [detailed=true|false]
<ncli> <entity> help [detailed=true|false]
<ncli> <entity> <action> help [detailed=true|false]
Entities and their corresponding Actions:
data-at-rest-encryption-certificate
get-csr-information
update-csr-information
list-ca-certificates | ls-ca-certificates
upload-ca-certificate
remove-ca-certificate | rm-ca-certificate
download-csrs
upload-cvm-certificates
replace-cvm-certificate
remove-cvm-certificate | rm-cvm-certificate
rackable-unit | ru
list | ls
edit | update
remove | rm
datastore
list | ls
create | add
delete | remove | rm
storagepool | sp
list | ls
list-stats | ls-stats
create | add
edit | update
virtualmachine | vm
list | ls
list-stats | ls-stats
list-snapshots | ls-snaps
list-attached-flr-snapshots
attach-flr-disk
detach-flr-disk
list-flr-snapshots | ls-flr-snaps
update-fingerprint-on-write
update-on-disk-dedup
storagetier | tier
list-supported-types | ls-supported-types
list | ls
remove | rm
get-default-io-priority-order | get-def-io-pri
set-default-io-priority-order | set-def-io-pri
smb-server
enable-kerberos
disable-kerberos
get-kerberos-status
disk
list | ls
list-stats | ls-stats
list-free | ls-free
remove-start | rm-start | delete
get-remove-status | get-rm-status
cluster
generate-csr-for-discovered-node
remove-start | rm-start | delete
get-remove-status | get-rm-status
discover-nodes
configure-node
version
get-params | info
edit-params | edit-info
get-remote-support-status
start-remote-support
stop-remote-support
get-nfs-whitelist
add-to-nfs-whitelist
remove-from-nfs-whitelist
get-ntp-servers
add-to-ntp-servers
remove-from-ntp-servers
get-name-servers
add-to-name-servers
remove-from-name-servers
set-smtp-server
get-smtp-server
clear-smtp-server
send-test-email
remove-all-public-keys | rm-all-public-keys
list-public-keys | ls-public-keys
add-public-key
remove-public-key | rm-public-key
set-external-ip-address
set-timezone
clear-external-ip-address
get-redundancy-state
set-redundancy-state
get-domain-fault-tolerance-status | get-dm-ft-stat
status
join-domain
set-dvm-configuration
get-ipmi-monitoring-status
start-la-jolla-deployment
get-la-jolla-azure-info
set-ipmi-monitoring-status
add-witness
edit-cvm-security-params
list-witness
edit-hypervisor-security-params
update-witness
get-cvm-security-config
remove-witness
get-hypervisor-security-config
edit-hypervisor-lldp-params
get-hypervisor-lldp-config
events | event
list | ls
history
acknowledge | ack
container | ctr | storage-container
list | ls
list-stats | ls-stats
create | add
edit | update
remove | rm
get-down-migrate-times | get-dm-times
set-down-migrate-times | set-dm-times
add-to-nfs-whitelist
remove-from-nfs-whitelist
health-check | check
list | ls
edit | update
multicluster
get-cluster-state
register-to-prism-central
ssl-certificate
import
generate
change-pfx-file-password
snapshot | snap
list | ls
list-stats | ls-stats
create | add
clone
remove | rm
pulse-config
list | ls
edit | update
license
apply-license
get-license
get-allowances
generate-cluster-info
download-cluster-info
snmp
get-status
set-status
list-users | ls-users
add-user
edit-user | update-user
remove-user | delete-user
list-traps | ls-traps
add-trap
edit-trap | update-trap
remove-trap | delete-trap
list-transports | ls-transports
add-transport
remove-transport | delete-transport
cloud
add-credentials
remove-credentials
ls-credentials
set-default-credentials
ls-cvm-images
deploy-remote-site
ls-cvms
ls-subnets
clear-all-credentials
destroy-remote-site
vstore
list | ls
protect
unprotect
volume-group
attach-to-vm
close | detach-external
create
delete
delete-disk
detach-from-vm
list | ls
list-unprotected
open | attach-external
update
clone-disk
create-disk
get
update-disk
data-at-rest-encryption
get-status
password
test-configuration
rekey-disks
get-recent-certificate-test-results
http-proxy | proxy
list | ls
add
edit | update
remove | rm
get-whitelist
add-to-whitelist
delete-from-whitelist
virtual-disk
list | ls
failover-cluster
list
create
join-nodes
remove-node
vdisk
list | ls
list-stats | ls-stats
create | add
edit | update
remove | rm
snapshot | snap
clone
list-snapshots | ls-snaps
remove-reservation
alerts | alert
list | ls
history
acknowledge | ack
resolve
get-alert-config
edit-alert-config | update-alert-config
remote-site | rs
create | add
list | ls
edit | update
remove | rm
list-snapshots | ls-snaps
rm-snapshot | rm-snap
retrieve-snapshot
add-bandwidth-schedule
list-bandwidth-schedules
remove-bandwidth-schedule
add-network-mapping
list-network-mapping
remove-network-mapping
list-networks
protection-domain | pd
create | add
remove | rm
list | ls
activate
rollback-pd
migrate
list-snapshots | ls-snaps
add-minutely-schedule
add-hourly-schedule
add-daily-schedule
add-weekly-schedule
add-monthly-schedule
remove-from-schedules
clear-schedules
ls-schedules
set-retention-policy
clear-retention-policy
ls-pending-one-time-snapshots
add-one-time-snapshot | create-one-time-snapshot
rm-one-time-schedules
restore-snapshot
protect
unprotect
rm-snapshot | rm-snap
list-replication-status | ls-repl-status
retain-snapshot | retain-snap
pause-replication | pause-repl
resume-replication | resume-repl
abort-replication | abort-repl
ls-pending-actions
metro-avail-enable
metro-avail-disable
update-failure-handling
promote-to-active
suspend-schedules
resume-schedules
status
managementserver | ms
list-management-server-info
register
unregister
list | ls
add
edit | update
remove | rm
software
list | ls
download
upload
remove | rm | delete
pause
automatic-download
user
list | ls
edit | update
create | add
delete | remove | rm
enable
disable
change-password
reset-password
grant-user-admin-role
revoke-user-admin-role
grant-cluster-admin-role
revoke-cluster-admin-role
show-profile
get-logged-in-users | get-logged-in-users
get-logged-in-user | get-logged-in-user
progress-monitor
list | ls
delete | remove
authconfig
list | ls
edit | update
remove | rm
list-directory | ls-directory
create-directory | add-directory
edit-directory | update-directory
remove-directory | rm-directory
list-role-mappings | ls-role-mappings
delete-role-mapping
add-role-mapping
add-to-role-mapping-values
remove-from-role-mapping-values
get-directory-values-by-type
test-ldap-connection
update-client-authentication
delete-ca-chain-certificate | delete-ca-chain-cert
get-client-authentication-config
update-service-account
set-certificate-revocation
file-server | fs
add-admin-user
add-dns
add-icap-server
add-quota-policy
add-snapshot-policy
add-virus-scan-policy
delete | remove | rm
delete-admin-user
delete-icap-server
delete-infected-files
delete-quota-policy
delete-share
delete-snapshot-policy
delete-user
delete-virus-scan-policy
get
get-admin-user
get-builtin-groups
get-file-servers-usage
get-icap-server
get-infected-file
get-quota-policy
get-share | show-share
get-snapshot
get-virus-scan-policy
list | ls
list-admin-users
list-all-fs-shares
list-dns
list-icap-servers
list-infected-files
list-quota-policies
list-shares | list-shares
list-snapshot-policies
list-snapshots
list-user
protect
quarantine-infected-files
remove-dns
rescan-infected-files
reset-infected-files
test-icap-connection
unquarantine-infected-files
update-admin-user
update-icap-server
update-quota-policy
update-share | edit-share
update-snapshot-policy
update-user
update-virus-scan-policy
verify-dns
activate | activate
add-share
add-user | add-user
add-user-mapping | add-user-mapping
clone | clone
configure-name-services | configure-name-services
create | add
edit | update
get-principal-type | get-principal-type
get-user-mapping | get-user-mapping
join-domain | join-domain
leave-domain | leave-domain
load-balance
search-user-mapping
update-network
update-user-mapping
upgrade | upgrade
key-management-server
get
list | ls
add
update
remove | rm
host
generate-csr-for-discovered-node
remove-start | rm-start | delete
get-remove-status | get-rm-status
discover-nodes
configure-node
list | ls
list-stats | ls-stats
edit | update
set-monitoring
enable-metadata-store
get-certificate-information
set-default-vm-vhd-location
reset-default-vm-vhd-location
join-domain
nutanix-guest-tools | ngt
get
list
enable
disable
enable-applications
disable-applications
mount
unmount
list-applications
delete
rsyslog-config
list | ls
list-servers | ls-servers
create-server | add-server
edit-server | update-server
delete-server | remove-server
list-modules | ls-modules
create-module | add-module
delete-module | remove-module
get-status
set-status
network | net
add-switch-config
edit-switch-config
delete-switch-config
list-switch
list-switch-ports
get-switch-collector-config
edit-switch-collector-config
list-host-nics
list-snmp-profile
list-vm-nics
add-snmp-profile
list-host-vnics
edit-snmp-profile
delete-snmp-profile
task
get
list | ls
wait-for-task
share
-- No Actions Available --
tag
-- No Actions Available --
'<name> = <value> ' arguments are specific to each operation
<ncli> container list Id : 0005b4d4-5120-e489-5297-08f1ea7e5200::10 Uuid : f51d6241-622e-4e7c-b7f0-f84177ca3669 Name : default-container-21884572020437 Storage Pool Id : 0005b4d4-5120-e489-5297-08f1ea7e5200::9 Storage Pool Uuid : 750cfb48-3f81-4727-8758-3683319fa58f Free Space (Logical) : 8.86 TiB (9,736,481,760,870 bytes) Used Space (Logical) : 11 GiB (11,806,736,384 bytes) Allowed Max Capacity : 8.87 TiB (9,748,288,497,254 bytes) Used by other Containers : 63 MiB (66,060,288 bytes) Explicit Reservation : 0 bytes Thick Provisioned : 0 bytes Replication Factor : 2 Oplog Replication Factor : 2 NFS Whitelist Inherited : true Container NFS Whitelist : VStore Name(s) : default-container-21884572020437 Random I/O Pri Order : SSD-PCIe, SSD-SATA, DAS-SATA Sequential I/O Pri Order : SSD-PCIe, SSD-SATA, DAS-SATA Compression : off Fingerprint On Write : off On-Disk Dedup : off Erasure Code : off Software Encryption : off Id : 0005b4d4-5120-e489-5297-08f1ea7e5200::11 Uuid : 8c61fbdd-2a3d-44b2-af9c-509d0d8a979c Name : NutanixManagementShare Storage Pool Id : 0005b4d4-5120-e489-5297-08f1ea7e5200::9 Storage Pool Uuid : 750cfb48-3f81-4727-8758-3683319fa58f Free Space (Logical) : 8.86 TiB (9,736,481,760,870 bytes) Used Space (Logical) : 63 MiB (66,060,288 bytes) Allowed Max Capacity : 8.86 TiB (9,736,547,821,158 bytes) Used by other Containers : 11 GiB (11,806,736,384 bytes) Explicit Reservation : 0 bytes Thick Provisioned : 0 bytes Replication Factor : 2 Oplog Replication Factor : 2 NFS Whitelist Inherited : true Container NFS Whitelist : VStore Name(s) : NutanixManagementShare Random I/O Pri Order : SSD-PCIe, SSD-SATA, DAS-SATA Sequential I/O Pri Order : SSD-PCIe, SSD-SATA, DAS-SATA Compression : on Fingerprint On Write : off On-Disk Dedup : off Erasure Code : off Software Encryption : off Id : 0005b4d4-5120-e489-5297-08f1ea7e5200::625 Uuid : 2c47416f-aa7a-4535-8586-0556556888fc Name : SelfServiceContainer Storage Pool Id : 0005b4d4-5120-e489-5297-08f1ea7e5200::9 Storage Pool Uuid : 750cfb48-3f81-4727-8758-3683319fa58f Free Space (Logical) : 8.86 TiB (9,736,481,760,870 bytes) Used Space (Logical) : 0 bytes Allowed Max Capacity : 8.86 TiB (9,736,481,760,870 bytes) Used by other Containers : 11.06 GiB (11,872,796,672 bytes) Explicit Reservation : 0 bytes Thick Provisioned : 0 bytes Replication Factor : 2 Oplog Replication Factor : 2 NFS Whitelist Inherited : true Container NFS Whitelist : VStore Name(s) : SelfServiceContainer Random I/O Pri Order : SSD-PCIe, SSD-SATA, DAS-SATA Sequential I/O Pri Order : SSD-PCIe, SSD-SATA, DAS-SATA Compression : off Fingerprint On Write : off On-Disk Dedup : off Erasure Code : off Software Encryption : off
admin@NTNX-SGH010TH1Q-A-CVM:172.29.161.61:~$ ncli container list Id : 0005b4d4-5120-e489-5297-08f1ea7e5200::10 Uuid : f51d6241-622e-4e7c-b7f0-f84177ca3669 Name : default-container-21884572020437 Storage Pool Id : 0005b4d4-5120-e489-5297-08f1ea7e5200::9 Storage Pool Uuid : 750cfb48-3f81-4727-8758-3683319fa58f Free Space (Logical) : 8.86 TiB (9,736,480,712,294 bytes) Used Space (Logical) : 11 GiB (11,806,736,384 bytes) Allowed Max Capacity : 8.87 TiB (9,748,287,448,678 bytes) Used by other Containers : 64 MiB (67,108,864 bytes) Explicit Reservation : 0 bytes Thick Provisioned : 0 bytes Replication Factor : 2 Oplog Replication Factor : 2 NFS Whitelist Inherited : true Container NFS Whitelist : VStore Name(s) : default-container-21884572020437 Random I/O Pri Order : SSD-PCIe, SSD-SATA, DAS-SATA Sequential I/O Pri Order : SSD-PCIe, SSD-SATA, DAS-SATA Compression : off Fingerprint On Write : off On-Disk Dedup : off Erasure Code : off Software Encryption : off Id : 0005b4d4-5120-e489-5297-08f1ea7e5200::11 Uuid : 8c61fbdd-2a3d-44b2-af9c-509d0d8a979c Name : NutanixManagementShare Storage Pool Id : 0005b4d4-5120-e489-5297-08f1ea7e5200::9 Storage Pool Uuid : 750cfb48-3f81-4727-8758-3683319fa58f Free Space (Logical) : 8.86 TiB (9,736,480,712,294 bytes) Used Space (Logical) : 64 MiB (67,108,864 bytes) Allowed Max Capacity : 8.86 TiB (9,736,547,821,158 bytes) Used by other Containers : 11 GiB (11,806,736,384 bytes) Explicit Reservation : 0 bytes Thick Provisioned : 0 bytes Replication Factor : 2 Oplog Replication Factor : 2 NFS Whitelist Inherited : true Container NFS Whitelist : VStore Name(s) : NutanixManagementShare Random I/O Pri Order : SSD-PCIe, SSD-SATA, DAS-SATA Sequential I/O Pri Order : SSD-PCIe, SSD-SATA, DAS-SATA Compression : on Fingerprint On Write : off On-Disk Dedup : off Erasure Code : off Software Encryption : off Id : 0005b4d4-5120-e489-5297-08f1ea7e5200::625 Uuid : 2c47416f-aa7a-4535-8586-0556556888fc Name : SelfServiceContainer Storage Pool Id : 0005b4d4-5120-e489-5297-08f1ea7e5200::9 Storage Pool Uuid : 750cfb48-3f81-4727-8758-3683319fa58f Free Space (Logical) : 8.86 TiB (9,736,480,712,294 bytes) Used Space (Logical) : 0 bytes Allowed Max Capacity : 8.86 TiB (9,736,480,712,294 bytes) Used by other Containers : 11.06 GiB (11,873,845,248 bytes) Explicit Reservation : 0 bytes Thick Provisioned : 0 bytes Replication Factor : 2 Oplog Replication Factor : 2 NFS Whitelist Inherited : true Container NFS Whitelist : VStore Name(s) : SelfServiceContainer Random I/O Pri Order : SSD-PCIe, SSD-SATA, DAS-SATA Sequential I/O Pri Order : SSD-PCIe, SSD-SATA, DAS-SATA Compression : off Fingerprint On Write : off On-Disk Dedup : off Erasure Code : off Software Encryption : off
Nutanixのメリットは、Prismから直感的に操作が可能で、簡単であること!です。シンプルなUI、そして、ユーザーに意識させないインフラを提供するのがNutanixです。
しかーーし、運用を始めると、複数のVMを同時に作成したい、プログラムによる自動化したい。 そんな時に必要になるのがCLIです。
今回は、そのCLIの利用方法について説明します。
Nutanixでは、「acli」と「ncli」の2つのCLIが利用可能です。
AOS CLI (ACLI) は、Nutanix製品のAOS部分を管理するためのCLIです。本機能は、AOS 4.1.2以降のリリースで利用できます。
Nutanix Command Line Interface (NCLI)は、Nutanixのクラスタ関連を操作する際に利用する際に利用します。
では、acliの利用方法について記載します。
■CVMへSSH接続
PC:~ xxxx$ ssh admin@172.29.161.60
Nutanix Controller VM
admin@172.29.161.60's password:
Last login: Thu Nov 12 21:07:19 2020 from 172.22.198.40
|| warning ||
Please be aware of any changes done would have cluster wide impact !
admin@NTNX-SGH010TH1N-A-CVM:172.29.161.62:~$
admin@NTNX-SGH010TH1N-A-CVM:172.29.161.62:~$ acli <acropolis> help Namespaces: ads core ha host image iscsi_client microseg net nf parcel snapshot uhura vg vm vm_group Aliases: exit get help quit set
<acropolis>net.list Network name Network UUID Type Identifier Subnet 1161_DHCP a2e55aa0-cb02-4916-b980-80b9df8fe26d kBridged 1161 172.29.161.0/24 Guest VM Network 1161 57c00cc6-1a20-4b0b-bc16-b9adea05e9ef kBridged 1161 vLAN_1071 56e4f999-bb57-4aa5-b66e-9e170830c92c kBridged 1071 vLAN_1072 c93f13ef-1d0c-40a3-8f57-dbfd8f791f0f kBridged 1072 vLAN_1073 43606e8e-b08e-43ca-b9ad-606ef9ac5371 kBridged 1073 vLAN_1075 fc190fab-aa94-464c-bb7b-b1f9c49a64ff kBridged 1075 vLAN_1076 fe09fecc-471b-4129-86a7-c13aeaf3965e kBridged 1076 vLAN_1080 59483a22-f90d-4586-87c0-c8204d928661 kBridged 1080 vLAN_1081 e148ed7e-fbb1-4075-ab03-f17a73239f49 kBridged 1081 vLAN_1083 9d1b485d-3907-4e16-a94c-8d63c60b997b kBridged 1083
admin@NTNX-SGH010TH1N-A-CVM:172.29.161.62:~$ acli net.list Network name Network UUID Type Identifier Subnet 1161_DHCP a2e55aa0-cb02-4916-b980-80b9df8fe26d kBridged 1161 172.29.161.0/24 Guest VM Network 1161 57c00cc6-1a20-4b0b-bc16-b9adea05e9ef kBridged 1161 vLAN_1071 56e4f999-bb57-4aa5-b66e-9e170830c92c kBridged 1071 vLAN_1072 c93f13ef-1d0c-40a3-8f57-dbfd8f791f0f kBridged 1072 vLAN_1073 43606e8e-b08e-43ca-b9ad-606ef9ac5371 kBridged 1073 vLAN_1075 fc190fab-aa94-464c-bb7b-b1f9c49a64ff kBridged 1075 vLAN_1076 fe09fecc-471b-4129-86a7-c13aeaf3965e kBridged 1076 vLAN_1080 59483a22-f90d-4586-87c0-c8204d928661 kBridged 1080 vLAN_1081 e148ed7e-fbb1-4075-ab03-f17a73239f49 kBridged 1081 vLAN_1083 9d1b485d-3907-4e16-a94c-8d63c60b997b kBridged 1083
admin@NTNX-SGH010TH1N-A-CVM:172.29.161.62:~$ acli -o json net.list {"status": 0, "data": [{"id": 1161, "subnet": "172.29.161.0/24", "type": "kBridged", "name": "1161_DHCP", "uuid": "a2e55aa0-cb02-4916-b980-80b9df8fe26d"}, {"id": 1161, "subnet": null, "type": "kBridged", "name": "Guest VM Network 1161", "uuid": "57c00cc6-1a20-4b0b-bc16-b9adea05e9ef"}, {"id": 1071, "subnet": null, "type": "kBridged", "name": "vLAN_1071", "uuid": "56e4f999-bb57-4aa5-b66e-9e170830c92c"}, {"id": 1072, "subnet": null, "type": "kBridged", "name": "vLAN_1072", "uuid": "c93f13ef-1d0c-40a3-8f57-dbfd8f791f0f"}, {"id": 1073, "subnet": null, "type": "kBridged", "name": "vLAN_1073", "uuid": "43606e8e-b08e-43ca-b9ad-606ef9ac5371"}, {"id": 1075, "subnet": null, "type": "kBridged", "name": "vLAN_1075", "uuid": "fc190fab-aa94-464c-bb7b-b1f9c49a64ff"}, {"id": 1076, "subnet": null, "type": "kBridged", "name": "vLAN_1076", "uuid": "fe09fecc-471b-4129-86a7-c13aeaf3965e"}, {"id": 1080, "subnet": null, "type": "kBridged", "name": "vLAN_1080", "uuid": "59483a22-f90d-4586-87c0-c8204d928661"}, {"id": 1081, "subnet": null, "type": "kBridged", "name": "vLAN_1081", "uuid": "e148ed7e-fbb1-4075-ab03-f17a73239f49"}, {"id": 1083, "subnet": null, "type": "kBridged", "name": "vLAN_1083", "uuid": "9d1b485d-3907-4e16-a94c-8d63c60b997b"}], "error": null}以上、acliの使い方でした。