【VMware Cloud Director】仮想マシン検出設定のオーバーライド

以下のように、VCD10.5からはグローバルレベルでの設定をオーバーライドできるようになった。

以前のリリースでは、グローバル レベル、組織レベル、および組織 VDC レベルで VMware Cloud Director での仮想マシン検出を構成できましたが、グローバル レベルは組織レベルよりも優先され、組織レベルは組織 VDC レベルよりも優先されていました。バージョン 10.4.x 以前では、仮想マシンの検出がグローバル レベルで無効になっていると、組織または組織 VDC レベルで有効にすることはできませんでした。VMware Cloud Director 10.5 以降では、組織および組織 VDC レベルでグローバル レベルの仮想マシン検出設定をオーバーライドできます。/api/admin/extension/settings/general API を使用して AllowOverrideOfVmDiscoveryByOrgAndOVDC パラメータを true に設定すると、組織および組織 VDC 仮想マシンの検出の動作で、グローバル レベルの設定をオーバーライドできます。

VMware Cloud Director 10.5 リリース ノート

デフォルトの状態だと有効化できない

・全般設定の取得

GET /admin/extension/settings/general

vCloud API - GET-GeneralSettings-ExtensionView

curl -k --header "Accept: application/*;version=38.0" --header "Authorization: Bearer xxx" --request GET https://172.16.21.20/api/admin/extension/settings/general
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<vmext:GeneralSettings xmlns="http://www.vmware.com/vcloud/v1.5" xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData" xmlns:common="http://schemas.dmtf.org/wbem/wscim/1/common" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:vmw="http://www.vmware.com/schema/ovf" xmlns:ovfenv="http://schemas.dmtf.org/ovf/environment/1" xmlns:ns9="http://www.vmware.com/vcloud/versions" href="https://172.16.21.20/api/admin/extension/settings/general" type="application/vnd.vmware.admin.generalSettings+xml">
    <Link rel="truststore:update" href="https://172.16.21.20/api/admin/extension/settings/general/action/updateVcTrustsore" type="application/vnd.vmware.admin.vcTrustStoreUpdateParams+xml"/>
    <Link rel="truststore:update" href="https://172.16.21.20/api/admin/extension/settings/general/action/updateVcTrustsore" type="application/vnd.vmware.admin.vcTrustStoreUpdateParams+json"/>
    <Link rel="truststore:reset" href="https://172.16.21.20/api/admin/extension/settings/general/action/resetVcTrustsore"/>
    <Link rel="up" href="https://172.16.21.20/api/admin/extension/settings" type="application/vnd.vmware.admin.systemSettings+xml"/>
    <Link rel="up" href="https://172.16.21.20/api/admin/extension/settings" type="application/vnd.vmware.admin.systemSettings+json"/>
    <Link rel="edit" href="https://172.16.21.20/api/admin/extension/settings/general" type="application/vnd.vmware.admin.generalSettings+xml"/>
    <Link rel="edit" href="https://172.16.21.20/api/admin/extension/settings/general" type="application/vnd.vmware.admin.generalSettings+json"/>
    <vmext:AbsoluteSessionTimeoutMinutes>1440</vmext:AbsoluteSessionTimeoutMinutes>
    <vmext:ActivityLogDisplayDays>30</vmext:ActivityLogDisplayDays>
    <vmext:ActivityLogKeepDays>90</vmext:ActivityLogKeepDays>
    <vmext:AllowOverlappingExtNets>false</vmext:AllowOverlappingExtNets>
    <vmext:HostCheckDelayInSeconds>300</vmext:HostCheckDelayInSeconds>
    <vmext:HostCheckTimeoutSeconds>30</vmext:HostCheckTimeoutSeconds>
    <vmext:InstallationId>1</vmext:InstallationId>
    <vmext:IpReservationTimeoutSeconds>0</vmext:IpReservationTimeoutSeconds>
    <vmext:SyslogServerSettings/>
    <vmext:LoginNameOnly>false</vmext:LoginNameOnly>
    <vmext:PrePopDefaultName>true</vmext:PrePopDefaultName>
    <vmext:QuarantineEnabled>false</vmext:QuarantineEnabled>
    <vmext:QuarantineResponseTimeoutSeconds>21600</vmext:QuarantineResponseTimeoutSeconds>
    <vmext:RestApiBaseUri></vmext:RestApiBaseUri>
    <vmext:SessionTimeoutMinutes>300</vmext:SessionTimeoutMinutes>
    <vmext:ShowStackTraces>false</vmext:ShowStackTraces>
    <vmext:SyncEnabled>false</vmext:SyncEnabled>
    <vmext:SyncIntervalInHours>24</vmext:SyncIntervalInHours>
    <vmext:TransferSessionTimeoutSeconds>3600</vmext:TransferSessionTimeoutSeconds>
    <vmext:VerifyVcCertificates>true</vmext:VerifyVcCertificates>
    <vmext:VcTruststoreType>PKCS12</vmext:VcTruststoreType>
    <vmext:ElasticAllocationPool>false</vmext:ElasticAllocationPool>
    <vmext:AdvancedNetworkingEnabled>false</vmext:AdvancedNetworkingEnabled>
    <vmext:SubInterfacesEnabled>false</vmext:SubInterfacesEnabled>
    <vmext:VmDiscoveryEnabled>false</vmext:VmDiscoveryEnabled>
    <vmext:AllowOverrideOfVmDiscoveryByOrgAndOVDC>false</vmext:AllowOverrideOfVmDiscoveryByOrgAndOVDC>
    <vmext:AllowFipsModeForEdgeGateways>false</vmext:AllowFipsModeForEdgeGateways>
</vmext:GeneralSettings>

<vmext:AllowOverrideOfVmDiscoveryByOrgAndOVDC>false</vmext:AllowOverrideOfVmDiscoveryByOrgAndOVDC>と、falseになっている

・全般設定の変更

PUT /admin/extension/settings/general

vCloud API - PUT-GeneralSettings-ExtensionView

curl -k --header "Content-Type: application/vnd.vmware.admin.generalSettings+xml" --header "Accept: application/*;version=38.0" --header "Authorization: Bearer xxx" --request PUT https://172.16.21.20/api/admin/extension/settings/general -d '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<vmext:GeneralSettings xmlns="http://www.vmware.com/vcloud/v1.5" xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData" xmlns:common="http://schemas.dmtf.org/wbem/wscim/1/common" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:vmw="http://www.vmware.com/schema/ovf" xmlns:ovfenv="http://schemas.dmtf.org/ovf/environment/1" xmlns:ns9="http://www.vmware.com/vcloud/versions" href="https://172.16.21.20/api/admin/extension/settings/general" type="application/vnd.vmware.admin.generalSettings+xml">
    <vmext:AbsoluteSessionTimeoutMinutes>1440</vmext:AbsoluteSessionTimeoutMinutes>
    <vmext:ActivityLogDisplayDays>30</vmext:ActivityLogDisplayDays>
    <vmext:ActivityLogKeepDays>90</vmext:ActivityLogKeepDays>
    <vmext:AllowOverlappingExtNets>false</vmext:AllowOverlappingExtNets>
    <vmext:HostCheckDelayInSeconds>300</vmext:HostCheckDelayInSeconds>
    <vmext:HostCheckTimeoutSeconds>30</vmext:HostCheckTimeoutSeconds>
    <vmext:InstallationId>1</vmext:InstallationId>
    <vmext:IpReservationTimeoutSeconds>0</vmext:IpReservationTimeoutSeconds>
    <vmext:SyslogServerSettings/>
    <vmext:LoginNameOnly>false</vmext:LoginNameOnly>
    <vmext:PrePopDefaultName>true</vmext:PrePopDefaultName>
    <vmext:QuarantineEnabled>false</vmext:QuarantineEnabled>
    <vmext:QuarantineResponseTimeoutSeconds>21600</vmext:QuarantineResponseTimeoutSeconds>
    <vmext:RestApiBaseUri></vmext:RestApiBaseUri>
    <vmext:SessionTimeoutMinutes>300</vmext:SessionTimeoutMinutes>
    <vmext:ShowStackTraces>false</vmext:ShowStackTraces>
    <vmext:SyncEnabled>false</vmext:SyncEnabled>
    <vmext:SyncIntervalInHours>24</vmext:SyncIntervalInHours>
    <vmext:TransferSessionTimeoutSeconds>3600</vmext:TransferSessionTimeoutSeconds>
    <vmext:VerifyVcCertificates>true</vmext:VerifyVcCertificates>
    <vmext:VcTruststoreType>PKCS12</vmext:VcTruststoreType>
    <vmext:ElasticAllocationPool>false</vmext:ElasticAllocationPool>
    <vmext:AdvancedNetworkingEnabled>false</vmext:AdvancedNetworkingEnabled>
    <vmext:SubInterfacesEnabled>false</vmext:SubInterfacesEnabled>
    <vmext:VmDiscoveryEnabled>false</vmext:VmDiscoveryEnabled>
    <vmext:AllowOverrideOfVmDiscoveryByOrgAndOVDC>true</vmext:AllowOverrideOfVmDiscoveryByOrgAndOVDC>
    <vmext:AllowFipsModeForEdgeGateways>false</vmext:AllowFipsModeForEdgeGateways>
</vmext:GeneralSettings>'

・組織設定の取得

GET /admin/org/{id}/settings/general

vCloud API - GET-GeneralSettings

curl -k --header "Accept: application/*;version=38.0" --header "Authorization: Bearer xxx" --request GET https://172.16.21.20/api/admin/org/3aeed6dd-20bf-444c-a875-2483933e89cf/settings/gene
ral
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<GeneralOrgSettings xmlns="http://www.vmware.com/vcloud/v1.5" xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData" xmlns:common="http://schemas.dmtf.org/wbem/wscim/1/common" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:vmw="http://www.vmware.com/schema/ovf" xmlns:ovfenv="http://schemas.dmtf.org/ovf/environment/1" xmlns:ns9="http://www.vmware.com/vcloud/versions" href="https://172.16.21.20/api/admin/org/3aeed6dd-20bf-444c-a875-2483933e89cf/settings/general" type="application/vnd.vmware.admin.organizationGeneralSettings+xml">
    <Link rel="edit" href="https://172.16.21.20/api/admin/org/3aeed6dd-20bf-444c-a875-2483933e89cf/settings/general" type="application/vnd.vmware.admin.organizationGeneralSettings+xml"/>
    <Link rel="edit" href="https://172.16.21.20/api/admin/org/3aeed6dd-20bf-444c-a875-2483933e89cf/settings/general" type="application/vnd.vmware.admin.organizationGeneralSettings+json"/>
    <CanPublishCatalogs>false</CanPublishCatalogs>
    <CanPublishExternally>false</CanPublishExternally>
    <CanSubscribe>false</CanSubscribe>
    <DeployedVMQuota>0</DeployedVMQuota>
    <StoredVmQuota>0</StoredVmQuota>
    <UseServerBootSequence>false</UseServerBootSequence>
    <DelayAfterPowerOnSeconds>0</DelayAfterPowerOnSeconds>
</GeneralOrgSettings>

・組織設定の変更

PUT /admin/org/{id}/settings/general

vCloud API - PUT-GeneralSettings

curl -k --header "Content-Type: application/vnd.vmware.admin.organizationGeneralSettings+xml" --h
eader "Accept: application/*;version=38.0" --header "Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJhOTNjOWRiO
S03NDcxLTMxOTItOGQwOS1hOGY3ZWVkYTg1ZjlAZWYzOWJjZGUtMThjZS00MTgxLTg4NjctNzE0MjBkYmNlYWVjIiwic3ViIjoiYWRtaW5pc3RyYXRvci
IsImV4cCI6MTY4OTkxODkwMiwidmVyc2lvbiI6InZjbG91ZF8xLjAiLCJqdGkiOiJiN2QzOTNhNDNmMzA0ZjU0ODVlMzQ3YzM2NjQ3MWRiMyJ9.NhZOwC
3Gi5M5g7DGpnkT9Lyvu41bYNElf6tS6F5M3M-RJmzV2VZDHcdih-oUw5_Oiy7tq6Gci1j2bYCnelVogpejuW9jgS4LxAs9tC-G_a1s8CmoissA11Ic_J_
Qeky-CfTdkfNWOWI14jwakUGTl-8JvqIyxmxf7qX9BYW2lBVb2_Q-4Jc9_TrvZkIm4JZMZ5ZSed3G7GKpjV1TmIcc7HGmPMZ84T6jSA8flG0dhf8qSeYa
fa5YBT_j0kElaIL3HJcGP7LiGsK01ndor0gafWFfYV1tlGIF8roL31ZrwIGiodOXC90-TMUPehIqRBrhNNmMeR_TH2wP5fb9xCB7Ug" --request PUT
 https://172.16.21.20/api/admin/org/3aeed6dd-20bf-444c-a875-2483933e89cf/settings/general -d '<?xml version="1.0" enc
oding="UTF-8" standalone="yes"?>
<GeneralOrgSettings xmlns="http://www.vmware.com/vcloud/v1.5" xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.
5" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/C
IM_VirtualSystemSettingData" xmlns:common="http://schemas.dmtf.org/wbem/wscim/1/common" xmlns:rasd="http://schemas.dm
tf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:vmw="http://www.vmware.com/schema/ovf" xmln
s:ovfenv="http://schemas.dmtf.org/ovf/environment/1" xmlns:ns9="http://www.vmware.com/vcloud/versions" href="https://
172.16.21.20/api/admin/org/3aeed6dd-20bf-444c-a875-2483933e89cf/settings/general" type="application/vnd.vmware.admin.
organizationGeneralSettings+xml">
    <CanPublishCatalogs>false</CanPublishCatalogs>
    <CanPublishExternally>false</CanPublishExternally>
    <CanSubscribe>false</CanSubscribe>
    <DeployedVMQuota>0</DeployedVMQuota>
    <StoredVmQuota>0</StoredVmQuota>
    <UseServerBootSequence>false</UseServerBootSequence>
    <DelayAfterPowerOnSeconds>0</DelayAfterPowerOnSeconds>
    <VmDiscoveryEnabled>true</VmDiscoveryEnabled>
</GeneralOrgSettings>'

正常にインポートされた

GUIでも有効表示になった