探究Vcenter虚拟化方案中,VirtualMachine庞大结构体中各字段的含义

2023年 9月 22日 74.9k 0

SDK中mo.VirtualMachine结构体定义如下:

type VirtualMachine struct {
	ManagedEntity

	Capability           types.VirtualMachineCapability    `mo:"capability"`
	Config               *types.VirtualMachineConfigInfo   `mo:"config"`
	Layout               *types.VirtualMachineFileLayout   `mo:"layout"`
	LayoutEx             *types.VirtualMachineFileLayoutEx `mo:"layoutEx"`
	Storage              *types.VirtualMachineStorageInfo  `mo:"storage"`
	EnvironmentBrowser   types.ManagedObjectReference      `mo:"environmentBrowser"`
	ResourcePool         *types.ManagedObjectReference     `mo:"resourcePool"`
	ParentVApp           *types.ManagedObjectReference     `mo:"parentVApp"`
	ResourceConfig       *types.ResourceConfigSpec         `mo:"resourceConfig"`
	Runtime              types.VirtualMachineRuntimeInfo   `mo:"runtime"`
	Guest                *types.GuestInfo                  `mo:"guest"`
	Summary              types.VirtualMachineSummary       `mo:"summary"`
	Datastore            []types.ManagedObjectReference    `mo:"datastore"`
	Network              []types.ManagedObjectReference    `mo:"network"`
	Snapshot             *types.VirtualMachineSnapshotInfo `mo:"snapshot"`
	RootSnapshot         []types.ManagedObjectReference    `mo:"rootSnapshot"`
	GuestHeartbeatStatus types.ManagedEntityStatus         `mo:"guestHeartbeatStatus"`
}

使用fmt.Printf("%#v",该结构体的实例),返回值如下:

mo.VirtualMachine{ManagedEntity:mo.ManagedEntity{ExtensibleManagedObject:mo.ExtensibleManagedObject{Self:types.ManagedObjectReference{Type:"VirtualMachine", Value:"vm-60"}, Value:[]types.BaseCustomFieldValue(nil), AvailableField:[]types.CustomFieldDef(nil)}, Parent:(*types.ManagedObjectReference)(0xc0002cd240), CustomValue:[]types.BaseCustomFieldValue(nil), OverallStatus:"green", ConfigStatus:"green", ConfigIssue:[]types.BaseEvent(nil), EffectiveRole:[]int32{-2}, Permission:[]types.Permission(nil), Name:"IDCOMD.192.168.111.207.JumpServer", DisabledMethod:[]string{"MakePrimaryVM_Task", "TerminateFaultTolerantVM_Task", "ResetVM_Task", "UnmountToolsInstaller", "MountToolsInstaller", "MountToolsInstallerImage", "RebootGuest", "StandbyGuest", "ShutdownGuest", "PowerOffVM_Task", "ExtractOvfEnvironment", "SuspendVM_Task", "AcquireMksTicket", "AnswerVM", "UpgradeVM_Task", "UpgradeTools_Task", "UpgradeToolsFromImage_Task", "StartRecording_Task", "StopRecording_Task", "StartReplaying_Task", "StopReplaying_Task", "TurnOffFaultToleranceForVM_Task", "MakePrimaryVM_Task", "TerminateFaultTolerantVM_Task", "DisableSecondaryVM_Task", "EnableSecondaryVM_Task", "CreateSecondaryVM_Task", "CreateSecondaryVMEx_Task", "StopRecording_Task", "StopReplaying_Task", "MarkAsVirtualMachine"}, RecentTask:[]types.ManagedObjectReference(nil), DeclaredAlarmState:[]types.AlarmState{types.AlarmState{DynamicData:types.DynamicData{}, Key:"alarm-10.vm-60", Entity:types.ManagedObjectReference{Type:"VirtualMachine", Value:"vm-60"}, Alarm:types.ManagedObjectReference{Type:"Alarm", Value:"alarm-10"}, OverallStatus:"gray", Time:time.Time{wall:0x20a77770, ext:63700308213, loc:(*time.Location)(nil)}, Acknowledged:(*bool)(0xc0003de040), AcknowledgedByUser:"", AcknowledgedTime:(*time.Time)(nil), EventKey:0}, types.AlarmState{DynamicData:types.DynamicData{}, Key:"alarm-11.vm-60", Entity:types.ManagedObjectReference{Type:"VirtualMachine", Value:"vm-60"}, Alarm:types.ManagedObjectReference{Type:"Alarm", Value:"alarm-11"}, OverallStatus:"gray", Time:time.Time{wall:0x21124b18, ext:63700308213, loc:(*time.Location)(nil)}, Acknowledged:(*bool)(0xc0003de190), AcknowledgedByUser:"", AcknowledgedTime:(*time.Time)(nil), EventKey:0}, types.AlarmState{DynamicData:types.DynamicData{}, Key:"alarm-2.vm-60", Entity:types.ManagedObjectReference{Type:"VirtualMachine", Value:"vm-60"}, Alarm:types.ManagedObjectReference{Type:"Alarm", Value:"alarm-2"}, OverallStatus:"gray", Time:time.Time{wall:0x23562868, ext:63700308213, loc:(*time.Location)(nil)}, Acknowledged:(*bool)(0xc0003de2e0), AcknowledgedByUser:"", AcknowledgedTime:(*time.Time)(nil), EventKey:0}, types.AlarmState{DynamicData:types.DynamicData{}, Key:"alarm-23.vm-60", Entity:types.ManagedObjectReference{Type:"VirtualMachine", Value:"vm-60"}, Alarm:types.ManagedObjectReference{Type:"Alarm", Value:"alarm-23"}, OverallStatus:"gray", Time:time.Time{wall:0x23a273a8, ext:63700308213, loc:(*time.Location)(nil)}, Acknowledged:(*bool)(0xc0003de430), AcknowledgedByUser:"", AcknowledgedTime:(*time.Time)(nil), EventKey:0}, types.AlarmState{DynamicData:types.DynamicData{}, Key:"alarm-26.vm-60", Entity:types.ManagedObjectReference{Type:"VirtualMachine", Value:"vm-60"}, Alarm:types.ManagedObjectReference{Type:"Alarm", Value:"alarm-26"}, OverallStatus:"gray", Time:time.Time{wall:0x23eebee8, ext:63700308213, loc:(*time.Location)(nil)}, Acknowledged:(*bool)(0xc0003de580), AcknowledgedByUser:"", AcknowledgedTime:(*time.Time)(nil), EventKey:0}, types.AlarmState{DynamicData:types.DynamicData{}, Key:"alarm-30.vm-60", Entity:types.ManagedObjectReference{Type:"VirtualMachine", Value:"vm-60"}, Alarm:types.ManagedObjectReference{Type:"Alarm", Value:"alarm-30"}, OverallStatus:"gray", Time:time.Time{wall:0x243b0e10, ext:63700308213, loc:(*time.Location)(nil)}, Acknowledged:(*bool)(0xc0003de6d0), AcknowledgedByUser:"", AcknowledgedTime:(*time.Time)(nil), EventKey:0}, types.AlarmState{DynamicData:types.DynamicData{}, Key:"alarm-49.vm-60", Entity:types.ManagedObjectReference{Type:"VirtualMachine", Value:"vm-60"}, Alarm:types.ManagedObjectReference{Type:"Alarm", Value:"alarm-49"}, OverallStatus:"gray", Time:time.Time{wall:0x251fefd0, ext:63700308213, loc:(*time.Location)(nil)}, Acknowledged:(*bool)(0xc0003de820), AcknowledgedByUser:"", AcknowledgedTime:(*time.Time)(nil), EventKey:0}, types.AlarmState{DynamicData:types.DynamicData{}, Key:"alarm-50.vm-60", Entity:types.ManagedObjectReference{Type:"VirtualMachine", Value:"vm-60"}, Alarm:types.ManagedObjectReference{Type:"Alarm", Value:"alarm-50"}, OverallStatus:"gray", Time:time.Time{wall:0x254dba78, ext:63700308213, loc:(*time.Location)(nil)}, Acknowledged:(*bool)(0xc0003de970), AcknowledgedByUser:"", AcknowledgedTime:(*time.Time)(nil), EventKey:0}, types.AlarmState{DynamicData:types.DynamicData{}, Key:"alarm-51.vm-60", Entity:types.ManagedObjectReference{Type:"VirtualMachine", Value:"vm-60"}, Alarm:types.ManagedObjectReference{Type:"Alarm", Value:"alarm-51"}, OverallStatus:"gray", Time:time.Time{wall:0x257b8138, ext:63700308213, loc:(*time.Location)(nil)}, Acknowledged:(*bool)(0xc0003deac0), AcknowledgedByUser:"", AcknowledgedTime:(*time.Time)(nil), EventKey:0}, types.AlarmState{DynamicData:types.DynamicData{}, Key:"alarm-59.vm-60", Entity:types.ManagedObjectReference{Type:"VirtualMachine", Value:"vm-60"}, Alarm:types.ManagedObjectReference{Type:"Alarm", Value:"alarm-59"}, OverallStatus:"gray", Time:time.Time{wall:0x25d70eb8, ext:63700308213, loc:(*time.Location)(nil)}, Acknowledged:(*bool)(0xc0003dec10), AcknowledgedByUser:"", AcknowledgedTime:(*time.Time)(nil), EventKey:0}, types.AlarmState{DynamicData:types.DynamicData{}, Key:"alarm-6.vm-60", Entity:types.ManagedObjectReference{Type:"VirtualMachine", Value:"vm-60"}, Alarm:types.ManagedObjectReference{Type:"Alarm", Value:"alarm-6"}, OverallStatus:"gray", Time:time.Time{wall:0x2604d578, ext:63700308213, loc:(*time.Location)(nil)}, Acknowledged:(*bool)(0xc0003ded60), AcknowledgedByUser:"", AcknowledgedTime:(*time.Time)(nil), EventKey:0}, types.AlarmState{DynamicData:types.DynamicData{}, Key:"alarm-65.vm-60", Entity:types.ManagedObjectReference{Type:"VirtualMachine", Value:"vm-60"}, Alarm:types.ManagedObjectReference{Type:"Alarm", Value:"alarm-65"}, OverallStatus:"gray", Time:time.Time{wall:0x266066e0, ext:63700308213, loc:(*time.Location)(nil)}, Acknowledged:(*bool)(0xc0003deeb0), AcknowledgedByUser:"", AcknowledgedTime:(*time.Time)(nil), EventKey:0}, types.AlarmState{DynamicData:types.DynamicData{}, Key:"alarm-67.vm-60", Entity:types.ManagedObjectReference{Type:"VirtualMachine", Value:"vm-60"}, Alarm:types.ManagedObjectReference{Type:"Alarm", Value:"alarm-67"}, OverallStatus:"gray", Time:time.Time{wall:0x268e2da0, ext:63700308213, loc:(*time.Location)(nil)}, Acknowledged:(*bool)(0xc0003df000), AcknowledgedByUser:"", AcknowledgedTime:(*time.Time)(nil), EventKey:0}, types.AlarmState{DynamicData:types.DynamicData{}, Key:"alarm-7.vm-60", Entity:types.ManagedObjectReference{Type:"VirtualMachine", Value:"vm-60"}, Alarm:types.ManagedObjectReference{Type:"Alarm", Value:"alarm-7"}, OverallStatus:"gray", Time:time.Time{wall:0x26bbf460, ext:63700308213, loc:(*time.Location)(nil)}, Acknowledged:(*bool)(0xc0003df150), AcknowledgedByUser:"", AcknowledgedTime:(*time.Time)(nil), EventKey:0}, types.AlarmState{DynamicData:types.DynamicData{}, Key:"alarm-95.vm-60", Entity:types.ManagedObjectReference{Type:"VirtualMachine", Value:"vm-60"}, Alarm:types.ManagedObjectReference{Type:"Alarm", Value:"alarm-95"}, OverallStatus:"gray", Time:time.Time{wall:0x27bf5e88, ext:63700308213, loc:(*time.Location)(nil)}, Acknowledged:(*bool)(0xc0003df2a0), AcknowledgedByUser:"", AcknowledgedTime:(*time.Time)(nil), EventKey:0}}, TriggeredAlarmState:[]types.AlarmState(nil), AlarmActionsEnabled:(*bool)(0xc000544dd8), Tag:[]types.Tag(nil)}, Capability:types.VirtualMachineCapability{DynamicData:types.DynamicData{}, SnapshotOperationsSupported:true, MultipleSnapshotsSupported:true, SnapshotConfigSupported:true, PoweredOffSnapshotsSupported:true, MemorySnapshotsSupported:true, RevertToSnapshotSupported:true, QuiescedSnapshotsSupported:true, DisableSnapshotsSupported:false, LockSnapshotsSupported:true, ConsolePreferencesSupported:false, CpuFeatureMaskSupported:true, S1AcpiManagementSupported:true, SettingScreenResolutionSupported:false, ToolsAutoUpdateSupported:false, VmNpivWwnSupported:true, NpivWwnOnNonRdmVmSupported:true, VmNpivWwnDisableSupported:(*bool)(0xc000026e5c), VmNpivWwnUpdateSupported:(*bool)(0xc000026e6c), SwapPlacementSupported:true, ToolsSyncTimeSupported:true, VirtualMmuUsageSupported:true, DiskSharesSupported:true, BootOptionsSupported:true, BootRetryOptionsSupported:(*bool)(0xc000026ecc), SettingVideoRamSizeSupported:true, SettingDisplayTopologySupported:(*bool)(0xc000026eec), RecordReplaySupported:(*bool)(0xc000026efd), ChangeTrackingSupported:(*bool)(0xc000026f0c), MultipleCoresPerSocketSupported:(*bool)(0xc000026f1c), HostBasedReplicationSupported:(*bool)(0xc000026f2c), GuestAutoLockSupported:(*bool)(0xc000026f3c), MemoryReservationLockSupported:(*bool)(0xc000026f4c), FeatureRequirementSupported:(*bool)(0xc000026f5c), PoweredOnMonitorTypeChangeSupported:(*bool)(0xc000026f6c), SeSparseDiskSupported:(*bool)(0xc000026f7c), NestedHVSupported:(*bool)(0xc000026f8c), VPMCSupported:(*bool)(0xc000026f9c), SecureBootSupported:(*bool)(nil), PerVmEvcSupported:(*bool)(nil), VirtualMmuUsageIgnored:(*bool)(nil), VirtualExecUsageIgnored:(*bool)(nil), DiskOnlySnapshotOnSuspendedVMSupported:(*bool)(nil)}, Config:(*types.VirtualMachineConfigInfo)(0xc0005d4000), Layout:(*types.VirtualMachineFileLayout)(0xc00044b260), LayoutEx:(*types.VirtualMachineFileLayoutEx)(0xc0003b6960), Storage:(*types.VirtualMachineStorageInfo)(0xc0005d8000), EnvironmentBrowser:types.ManagedObjectReference{Type:"EnvironmentBrowser", Value:"envbrowser-60"}, ResourcePool:(*types.ManagedObjectReference)(0xc000534020), ParentVApp:(*types.ManagedObjectReference)(nil), ResourceConfig:(*types.ResourceConfigSpec)(0xc0001120e0), Runtime:types.VirtualMachineRuntimeInfo{DynamicData:types.DynamicData{}, Device:[]types.VirtualMachineDeviceRuntimeInfo{types.VirtualMachineDeviceRuntimeInfo{DynamicData:types.DynamicData{}, RuntimeState:(*types.VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeState)(0xc000208c80), Key:4000}, types.VirtualMachineDeviceRuntimeInfo{DynamicData:types.DynamicData{}, RuntimeState:(*types.VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeState)(0xc000208d00), Key:4001}}, Host:(*types.ManagedObjectReference)(0xc0004059a0), ConnectionState:"connected", PowerState:"poweredOff", FaultToleranceState:"notConfigured", DasVmProtection:(*types.VirtualMachineRuntimeInfoDasProtectionState)(nil), ToolsInstallerMounted:false, SuspendTime:(*time.Time)(nil), BootTime:(*time.Time)(nil), SuspendInterval:0, Question:(*types.VirtualMachineQuestionInfo)(nil), MemoryOverhead:0, MaxCpuUsage:0, MaxMemoryUsage:0, NumMksConnections:0, RecordReplayState:"inactive", CleanPowerOff:(*bool)(nil), NeedSecondaryReason:"", OnlineStandby:(*bool)(0xc0003ff04d), MinRequiredEVCModeKey:"", ConsolidationNeeded:(*bool)(0xc0003ff05d), OfflineFeatureRequirement:[]types.VirtualMachineFeatureRequirement{types.VirtualMachineFeatureRequirement{DynamicData:types.DynamicData{}, Key:"cpuid.lm", FeatureName:"cpuid.lm", Value:"Bool:Min:1"}}, FeatureRequirement:[]types.VirtualMachineFeatureRequirement(nil), FeatureMask:[]types.HostFeatureMask(nil), VFlashCacheAllocation:0, Paused:(*bool)(0xc0003ff120), SnapshotInBackground:(*bool)(0xc0003ff13b), QuiescedForkParent:(*bool)(nil), InstantCloneFrozen:(*bool)(nil), CryptoState:""}, Guest:(*types.GuestInfo)(0xc000192f00), Summary:types.VirtualMachineSummary{DynamicData:types.DynamicData{}, Vm:(*types.ManagedObjectReference)(0xc000416500), Runtime:types.VirtualMachineRuntimeInfo{DynamicData:types.DynamicData{}, Device:[]types.VirtualMachineDeviceRuntimeInfo{types.VirtualMachineDeviceRuntimeInfo{DynamicData:types.DynamicData{}, RuntimeState:(*types.VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeState)(0xc000208d80), Key:4000}, types.VirtualMachineDeviceRuntimeInfo{DynamicData:types.DynamicData{}, RuntimeState:(*types.VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeState)(0xc000208e00), Key:4001}}, Host:(*types.ManagedObjectReference)(0xc000416b60), ConnectionState:"connected", PowerState:"poweredOff", FaultToleranceState:"notConfigured", DasVmProtection:(*types.VirtualMachineRuntimeInfoDasProtectionState)(nil), ToolsInstallerMounted:false, SuspendTime:(*time.Time)(nil), BootTime:(*time.Time)(nil), SuspendInterval:0, Question:(*types.VirtualMachineQuestionInfo)(nil), MemoryOverhead:0, MaxCpuUsage:0, MaxMemoryUsage:0, NumMksConnections:0, RecordReplayState:"inactive", CleanPowerOff:(*bool)(nil), NeedSecondaryReason:"", OnlineStandby:(*bool)(0xc0003ff8bd), MinRequiredEVCModeKey:"", ConsolidationNeeded:(*bool)(0xc0003ff8cd), OfflineFeatureRequirement:[]types.VirtualMachineFeatureRequirement{types.VirtualMachineFeatureRequirement{DynamicData:types.DynamicData{}, Key:"cpuid.lm", FeatureName:"cpuid.lm", Value:"Bool:Min:1"}}, FeatureRequirement:[]types.VirtualMachineFeatureRequirement(nil), FeatureMask:[]types.HostFeatureMask(nil), VFlashCacheAllocation:0, Paused:(*bool)(0xc0003ff966), SnapshotInBackground:(*bool)(0xc0003ff97b), QuiescedForkParent:(*bool)(nil), InstantCloneFrozen:(*bool)(nil), CryptoState:""}, Guest:(*types.VirtualMachineGuestSummary)(0xc000208e80), Config:types.VirtualMachineConfigSummary{DynamicData:types.DynamicData{}, Name:"IDCOMD.192.168.111.207.JumpServer", Template:false, VmPathName:"[VOL02] IDCOMD.192.168.111.207.JumpServer/IDCOMD.192.168.111.207.JumpServer.vmx", MemorySizeMB:8192, CpuReservation:0, MemoryReservation:0, NumCpu:12, NumEthernetCards:2, NumVirtualDisks:1, Uuid:"420ecd79-a338-89a5-0eb8-977dd843814d", InstanceUuid:"500e347d-daeb-8379-9b85-af1b18d6bb2f", GuestId:"centos64Guest", GuestFullName:"CentOS 4/5/6/7 (64-bit)", Annotation:"", Product:(*types.VAppProductInfo)(nil), InstallBootRequired:(*bool)(0xc0003ffcba), FtInfo:types.BaseFaultToleranceConfigInfo(nil), ManagedBy:(*types.ManagedByInfo)(nil), TpmPresent:(*bool)(nil), NumVmiopBackings:0}, Storage:(*types.VirtualMachineStorageSummary)(0xc000091740), QuickStats:types.VirtualMachineQuickStats{DynamicData:types.DynamicData{}, OverallCpuUsage:0, OverallCpuDemand:0, GuestMemoryUsage:0, HostMemoryUsage:0, GuestHeartbeatStatus:"gray", DistributedCpuEntitlement:0, DistributedMemoryEntitlement:0, StaticCpuEntitlement:0, StaticMemoryEntitlement:0, PrivateMemory:0, SharedMemory:0, SwappedMemory:0, BalloonedMemory:0, ConsumedOverheadMemory:0, FtLogBandwidth:-1, FtSecondaryLatency:-1, FtLatencyStatus:"gray", CompressedMemory:0, UptimeSeconds:0, SsdSwappedMemory:0}, OverallStatus:"green", CustomValue:[]types.BaseCustomFieldValue(nil)}, Datastore:[]types.ManagedObjectReference{types.ManagedObjectReference{Type:"Datastore", Value:"datastore-211"}}, Network:[]types.ManagedObjectReference{types.ManagedObjectReference{Type:"Network", Value:"network-16"}}, Snapshot:(*types.VirtualMachineSnapshotInfo)(nil), RootSnapshot:[]types.ManagedObjectReference(nil), GuestHeartbeatStatus:"gray"}

这段返回值,纯字符串长度15636;如果再考虑到其中嵌套的层层结构体,完全可以堪称'庞大'.

这样的结构体嵌套格式,无法直观展示所有信息,尤其当类型为*(指针类型)时,打印出的是指针即对象变量的内存地址;这里有一种方案,即给相应的*(指针类型)字段实现String()方法,从而解决这个问题;关于String()方法,可参考之前博文

尝试进行挨个分析:

ManagedEntity: "管理实体" 匿名字段

type ManagedEntity struct {
	ExtensibleManagedObject   //可扩展的管理对象

	Parent              *types.ManagedObjectReference  `mo:"parent"`
	CustomValue         []types.BaseCustomFieldValue   `mo:"customValue"`
	OverallStatus       types.ManagedEntityStatus      `mo:"overallStatus"`
	ConfigStatus        types.ManagedEntityStatus      `mo:"configStatus"`
	ConfigIssue         []types.BaseEvent              `mo:"configIssue"`
	EffectiveRole       []int32                        `mo:"effectiveRole"`
	Permission          []types.Permission             `mo:"permission"`
	Name                string                         `mo:"name"`
	DisabledMethod      []string                       `mo:"disabledMethod"`
	RecentTask          []types.ManagedObjectReference `mo:"recentTask"`
	DeclaredAlarmState  []types.AlarmState             `mo:"declaredAlarmState"`
	TriggeredAlarmState []types.AlarmState             `mo:"triggeredAlarmState"`
	AlarmActionsEnabled *bool                          `mo:"alarmActionsEnabled"`
	Tag                 []types.Tag                    `mo:"tag"`
}
type ExtensibleManagedObject struct {
	Self types.ManagedObjectReference

	Value          []types.BaseCustomFieldValue `mo:"value"`
	AvailableField []types.CustomFieldDef       `mo:"availableField"`
}
type ManagedObjectReference struct {
	Type  string `xml:"type,attr"`
	Value string `xml:",chardata"`
}

写到这里,发现*(指针)类型的字段非常多(上面那段已0x开头的),挨个对其实现String()方法,工作量大,且会侵入SDK的代码;

可以将原结构体转换为json格式,再利用各种在线解析json的工具,更直观和方便地进行梳理;

b,_ := json.Marshal(该结构体的实例)

fmt.Println(string(b))

返回值为:

{"Self":{"Type":"VirtualMachine","Value":"vm-389"},"Value":null,"AvailableField":null,"Parent":{"Type":"Folder","Value":"group-v341"},"CustomValue":null,"OverallStatus":"green","ConfigStatus":"green","ConfigIssue":null,"EffectiveRole":[-2],"Permission":null,"Name":"IDCOMD_192.168.110.191_CentOS6.10.X64.Template","DisabledMethod":["Destroy_Task","UnregisterVM","UnmountToolsInstaller","AnswerVM","UpgradeVM_Task","UpgradeTools_Task","UpgradeToolsFromImage_Task","TurnOffFaultToleranceForVM_Task","MakePrimaryVM_Task","TerminateFaultTolerantVM_Task","DisableSecondaryVM_Task","EnableSecondaryVM_Task","CreateSecondaryVM_Task","CreateSecondaryVMEx_Task","StopRecording_Task","StopReplaying_Task","CustomizeVM_Task","MarkAsTemplate","ResetGuestInformation","ExportVm","PowerOnVM_Task","MarkAsVirtualMachine"],"RecentTask":null,"DeclaredAlarmState":[{"Key":"alarm-10.vm-389","Entity":{"Type":"VirtualMachine","Value":"vm-389"},"Alarm":{"Type":"Alarm","Value":"alarm-10"},"OverallStatus":"gray","Time":"2019-08-02T02:03:33.547846Z","Acknowledged":false,"AcknowledgedByUser":"","AcknowledgedTime":null,"EventKey":0},{"Key":"alarm-11.vm-389","Entity":{"Type":"VirtualMachine","Value":"vm-389"},"Alarm":{"Type":"Alarm","Value":"alarm-11"},"OverallStatus":"gray","Time":"2019-08-02T02:03:33.554847Z","Acknowledged":false,"AcknowledgedByUser":"","AcknowledgedTime":null,"EventKey":0},{"Key":"alarm-2.vm-389","Entity":{"Type":"VirtualMachine","Value":"vm-389"},"Alarm":{"Type":"Alarm","Value":"alarm-2"},"OverallStatus":"gray","Time":"2019-08-02T02:03:33.592849Z","Acknowledged":false,"AcknowledgedByUser":"","AcknowledgedTime":null,"EventKey":0},{"Key":"alarm-23.vm-389","Entity":{"Type":"VirtualMachine","Value":"vm-389"},"Alarm":{"Type":"Alarm","Value":"alarm-23"},"OverallStatus":"gray","Time":"2019-08-02T02:03:33.597849Z","Acknowledged":false,"AcknowledgedByUser":"","AcknowledgedTime":null,"EventKey":0},{"Key":"alarm-26.vm-389","Entity":{"Type":"VirtualMachine","Value":"vm-389"},"Alarm":{"Type":"Alarm","Value":"alarm-26"},"OverallStatus":"gray","Time":"2019-08-02T02:03:33.601849Z","Acknowledged":false,"AcknowledgedByUser":"","AcknowledgedTime":null,"EventKey":0},{"Key":"alarm-30.vm-389","Entity":{"Type":"VirtualMachine","Value":"vm-389"},"Alarm":{"Type":"Alarm","Value":"alarm-30"},"OverallStatus":"gray","Time":"2019-08-02T02:03:33.60685Z","Acknowledged":false,"AcknowledgedByUser":"","AcknowledgedTime":null,"EventKey":0},{"Key":"alarm-49.vm-389","Entity":{"Type":"VirtualMachine","Value":"vm-389"},"Alarm":{"Type":"Alarm","Value":"alarm-49"},"OverallStatus":"gray","Time":"2019-08-02T02:03:33.62285Z","Acknowledged":false,"AcknowledgedByUser":"","AcknowledgedTime":null,"EventKey":0},{"Key":"alarm-50.vm-389","Entity":{"Type":"VirtualMachine","Value":"vm-389"},"Alarm":{"Type":"Alarm","Value":"alarm-50"},"OverallStatus":"gray","Time":"2019-08-02T02:03:33.625851Z","Acknowledged":false,"AcknowledgedByUser":"","AcknowledgedTime":null,"EventKey":0},{"Key":"alarm-51.vm-389","Entity":{"Type":"VirtualMachine","Value":"vm-389"},"Alarm":{"Type":"Alarm","Value":"alarm-51"},"OverallStatus":"gray","Time":"2019-08-02T02:03:33.628851Z","Acknowledged":false,"AcknowledgedByUser":"","AcknowledgedTime":null,"EventKey":0},{"Key":"alarm-59.vm-389","Entity":{"Type":"VirtualMachine","Value":"vm-389"},"Alarm":{"Type":"Alarm","Value":"alarm-59"},"OverallStatus":"gray","Time":"2019-08-02T02:03:33.634851Z","Acknowledged":false,"AcknowledgedByUser":"","AcknowledgedTime":null,"EventKey":0},{"Key":"alarm-6.vm-389","Entity":{"Type":"VirtualMachine","Value":"vm-389"},"Alarm":{"Type":"Alarm","Value":"alarm-6"},"OverallStatus":"green","Time":"2019-06-28T06:59:39.478Z","Acknowledged":false,"AcknowledgedByUser":"","AcknowledgedTime":null,"EventKey":0},{"Key":"alarm-65.vm-389","Entity":{"Type":"VirtualMachine","Value":"vm-389"},"Alarm":{"Type":"Alarm","Value":"alarm-65"},"OverallStatus":"gray","Time":"2019-08-02T02:03:33.643852Z","Acknowledged":false,"AcknowledgedByUser":"","AcknowledgedTime":null,"EventKey":0},{"Key":"alarm-67.vm-389","Entity":{"Type":"VirtualMachine","Value":"vm-389"},"Alarm":{"Type":"Alarm","Value":"alarm-67"},"OverallStatus":"gray","Time":"2019-08-02T02:03:33.646852Z","Acknowledged":false,"AcknowledgedByUser":"","AcknowledgedTime":null,"EventKey":0},{"Key":"alarm-7.vm-389","Entity":{"Type":"VirtualMachine","Value":"vm-389"},"Alarm":{"Type":"Alarm","Value":"alarm-7"},"OverallStatus":"green","Time":"2019-06-28T06:59:39.478Z","Acknowledged":false,"AcknowledgedByUser":"","AcknowledgedTime":null,"EventKey":0},{"Key":"alarm-95.vm-389","Entity":{"Type":"VirtualMachine","Value":"vm-389"},"Alarm":{"Type":"Alarm","Value":"alarm-95"},"OverallStatus":"gray","Time":"2019-08-02T02:03:33.666853Z","Acknowledged":false,"AcknowledgedByUser":"","AcknowledgedTime":null,"EventKey":0}],"TriggeredAlarmState":null,"AlarmActionsEnabled":true,"Tag":null,"Capability":{"SnapshotOperationsSupported":true,"MultipleSnapshotsSupported":true,"SnapshotConfigSupported":true,"PoweredOffSnapshotsSupported":true,"MemorySnapshotsSupported":true,"RevertToSnapshotSupported":true,"QuiescedSnapshotsSupported":true,"DisableSnapshotsSupported":false,"LockSnapshotsSupported":true,"ConsolePreferencesSupported":false,"CpuFeatureMaskSupported":true,"S1AcpiManagementSupported":true,"SettingScreenResolutionSupported":false,"ToolsAutoUpdateSupported":false,"VmNpivWwnSupported":true,"NpivWwnOnNonRdmVmSupported":true,"VmNpivWwnDisableSupported":true,"VmNpivWwnUpdateSupported":true,"SwapPlacementSupported":true,"ToolsSyncTimeSupported":true,"VirtualMmuUsageSupported":true,"DiskSharesSupported":true,"BootOptionsSupported":true,"BootRetryOptionsSupported":true,"SettingVideoRamSizeSupported":true,"SettingDisplayTopologySupported":false,"RecordReplaySupported":true,"ChangeTrackingSupported":true,"MultipleCoresPerSocketSupported":true,"HostBasedReplicationSupported":true,"GuestAutoLockSupported":true,"MemoryReservationLockSupported":true,"FeatureRequirementSupported":true,"PoweredOnMonitorTypeChangeSupported":true,"SeSparseDiskSupported":true,"NestedHVSupported":true,"VPMCSupported":true,"SecureBootSupported":null,"PerVmEvcSupported":null,"VirtualMmuUsageIgnored":null,"VirtualExecUsageIgnored":null,"DiskOnlySnapshotOnSuspendedVMSupported":null},"Config":{"ChangeVersion":"2019-06-28T06:58:45.542465Z","Modified":"1970-01-01T00:00:00Z","Name":"IDCOMD_192.168.110.191_CentOS6.10.X64.Template","GuestFullName":"CentOS 4/5/6/7 (64-bit)","Version":"vmx-11","Uuid":"42372cc9-0811-74e4-e7b6-abaa96a8ee85","CreateDate":null,"InstanceUuid":"50372076-6a91-f48a-818c-867387badbdd","NpivNodeWorldWideName":null,"NpivPortWorldWideName":null,"NpivWorldWideNameType":"","NpivDesiredNodeWwns":0,"NpivDesiredPortWwns":0,"NpivTemporaryDisabled":true,"NpivOnNonRdmDisks":null,"LocationId":"564db8fc-fc74-7db8-122a-ace19fce3bd0","Template":false,"GuestId":"centos64Guest","AlternateGuestName":"","Annotation":"","Files":{"VmPathName":"[VOL01] IDCOMD_192.168.110.191_CentOS6.10.X64.Template/IDCOMD_192.168.110.191_CentOS6.10.X64.Template.vmx","SnapshotDirectory":"[VOL01] IDCOMD_192.168.110.191_CentOS6.10.X64.Template/","SuspendDirectory":"[VOL01] IDCOMD_192.168.110.191_CentOS6.10.X64.Template/","LogDirectory":"[VOL01] IDCOMD_192.168.110.191_CentOS6.10.X64.Template/","FtMetadataDirectory":""},"Tools":{"ToolsVersion":2147483647,"ToolsInstallType":"","AfterPowerOn":true,"AfterResume":true,"BeforeGuestStandby":true,"BeforeGuestShutdown":true,"BeforeGuestReboot":null,"ToolsUpgradePolicy":"manual","PendingCustomization":"","CustomizationKeyId":null,"SyncTimeWithHost":false,"LastInstallInfo":{"Counter":0,"Fault":null}},"Flags":{"DisableAcceleration":false,"EnableLogging":true,"UseToe":false,"RunWithDebugInfo":false,"MonitorType":"release","HtSharing":"any","SnapshotDisabled":false,"SnapshotLocked":false,"DiskUuidEnabled":false,"VirtualMmuUsage":"automatic","VirtualExecUsage":"hvAuto","SnapshotPowerOffBehavior":"powerOff","RecordReplayEnabled":false,"FaultToleranceType":"unset","CbrcCacheEnabled":null,"VvtdEnabled":null,"VbsEnabled":null},"ConsolePreferences":null,"DefaultPowerOps":{"PowerOffType":"soft","SuspendType":"hard","ResetType":"soft","DefaultPowerOffType":"soft","DefaultSuspendType":"hard","DefaultResetType":"soft","StandbyAction":"powerOnSuspend"},"Hardware":{"NumCPU":4,"NumCoresPerSocket":2,"MemoryMB":4096,"VirtualICH7MPresent":false,"VirtualSMCPresent":false,"Device":[{"Key":100,"DeviceInfo":{"Label":"PCI controller 0","Summary":"PCI controller 0"},"Backing":null,"Connectable":null,"SlotInfo":null,"ControllerKey":0,"UnitNumber":null,"BusNumber":0,"Device":[500,12000,1000,4000]},{"Key":200,"DeviceInfo":{"Label":"IDE 0","Summary":"IDE 0"},"Backing":null,"Connectable":null,"SlotInfo":null,"ControllerKey":0,"UnitNumber":null,"BusNumber":0,"Device":null},{"Key":201,"DeviceInfo":{"Label":"IDE 1","Summary":"IDE 1"},"Backing":null,"Connectable":null,"SlotInfo":null,"ControllerKey":0,"UnitNumber":null,"BusNumber":1,"Device":[3002]},{"Key":300,"DeviceInfo":{"Label":"PS2 controller 0","Summary":"PS2 controller 0"},"Backing":null,"Connectable":null,"SlotInfo":null,"ControllerKey":0,"UnitNumber":null,"BusNumber":0,"Device":[600,700]},{"Key":400,"DeviceInfo":{"Label":"SIO controller 0","Summary":"SIO controller 0"},"Backing":null,"Connectable":null,"SlotInfo":null,"ControllerKey":0,"UnitNumber":null,"BusNumber":0,"Device":[8000]},{"Key":500,"DeviceInfo":{"Label":"Video card ","Summary":"Video card"},"Backing":null,"Connectable":null,"SlotInfo":null,"ControllerKey":100,"UnitNumber":0,"VideoRamSizeInKB":4096,"NumDisplays":1,"UseAutoDetect":false,"Enable3DSupport":false,"Use3dRenderer":"automatic","GraphicsMemorySizeInKB":262144},{"Key":600,"DeviceInfo":{"Label":"Keyboard ","Summary":"Keyboard"},"Backing":null,"Connectable":null,"SlotInfo":null,"ControllerKey":300,"UnitNumber":0},{"Key":700,"DeviceInfo":{"Label":"Pointing device","Summary":"Pointing device; Device"},"Backing":{"DeviceName":"","UseAutoDetect":false,"HostPointingDevice":"autodetect"},"Connectable":null,"SlotInfo":null,"ControllerKey":300,"UnitNumber":1},{"Key":1000,"DeviceInfo":{"Label":"SCSI controller 0","Summary":"LSI Logic"},"Backing":null,"Connectable":null,"SlotInfo":null,"ControllerKey":100,"UnitNumber":3,"BusNumber":0,"Device":[2000],"HotAddRemove":true,"SharedBus":"noSharing","ScsiCtlrUnitNumber":7},{"Key":2000,"DeviceInfo":{"Label":"Hard disk 1","Summary":"20,971,520 KB"},"Backing":{"FileName":"[VOL01] IDCOMD_192.168.110.191_CentOS6.10.X64.Template/IDCOMD_192.168.110.191_CentOS6.10.X64.Template.vmdk","Datastore":{"Type":"Datastore","Value":"datastore-210"},"BackingObjectId":"","DiskMode":"persistent","Split":false,"WriteThrough":false,"ThinProvisioned":true,"EagerlyScrub":null,"Uuid":"6000C290-ed00-a439-bd66-52afaf8bd3e7","ContentId":"86ae82146e1dc126db60196bfffffffe","ChangeId":"","Parent":null,"DeltaDiskFormat":"","DigestEnabled":false,"DeltaGrainSize":0,"DeltaDiskFormatVariant":"","Sharing":"","KeyId":null},"Connectable":null,"SlotInfo":null,"ControllerKey":1000,"UnitNumber":0,"CapacityInKB":20971520,"CapacityInBytes":21474836480,"Shares":{"Shares":1000,"Level":"normal"},"StorageIOAllocation":{"Limit":-1,"Shares":{"Shares":1000,"Level":"normal"},"Reservation":0},"DiskObjectId":"59-2000","VFlashCacheConfigInfo":null,"Iofilter":null,"VDiskId":null,"NativeUnmanagedLinkedClone":null},{"Key":3002,"DeviceInfo":{"Label":"CD/DVD drive 1","Summary":"Remote device"},"Backing":{"DeviceName":"","UseAutoDetect":false,"Exclusive":false},"Connectable":{"MigrateConnect":"","StartConnected":false,"AllowGuestControl":true,"Connected":true,"Status":"ok"},"SlotInfo":null,"ControllerKey":201,"UnitNumber":0},{"Key":4000,"DeviceInfo":{"Label":"Network adapter 1","Summary":"IDC-NET"},"Backing":{"DeviceName":"IDC-NET","UseAutoDetect":false,"Network":{"Type":"Network","Value":"network-16"},"InPassthroughMode":null},"Connectable":{"MigrateConnect":"","StartConnected":true,"AllowGuestControl":true,"Connected":true,"Status":"ok"},"SlotInfo":null,"ControllerKey":100,"UnitNumber":7,"AddressType":"assigned","MacAddress":"00:50:56:b7:12:51","WakeOnLanEnabled":true,"ResourceAllocation":{"Reservation":0,"Share":{"Shares":50,"Level":"normal"},"Limit":-1},"ExternalId":"","UptCompatibilityEnabled":null},{"Key":8000,"DeviceInfo":{"Label":"Floppy drive 1","Summary":"Remote"},"Backing":{"DeviceName":"","UseAutoDetect":false},"Connectable":{"MigrateConnect":"","StartConnected":false,"AllowGuestControl":true,"Connected":false,"Status":"ok"},"SlotInfo":null,"ControllerKey":400,"UnitNumber":0},{"Key":12000,"DeviceInfo":{"Label":"VMCI device","Summary":"Device on the virtual machine PCI bus that provides support for the virtual machine communication interface"},"Backing":null,"Connectable":null,"SlotInfo":null,"ControllerKey":100,"UnitNumber":17,"Id":-1767313787,"AllowUnrestrictedCommunication":false,"FilterEnable":true,"FilterInfo":null}]},"CpuAllocation":{"Reservation":0,"ExpandableReservation":false,"Limit":-1,"Shares":{"Shares":4000,"Level":"normal"},"OverheadLimit":null},"MemoryAllocation":{"Reservation":0,"ExpandableReservation":false,"Limit":-1,"Shares":{"Shares":40960,"Level":"normal"},"OverheadLimit":93},"LatencySensitivity":{"Level":"normal","Sensitivity":0},"MemoryHotAddEnabled":false,"CpuHotAddEnabled":false,"CpuHotRemoveEnabled":false,"HotPlugMemoryLimit":4096,"HotPlugMemoryIncrementSize":0,"CpuAffinity":null,"MemoryAffinity":null,"NetworkShaper":null,"ExtraConfig":[{"Key":"nvram","Value":"IDCOMD_192.168.110.191_CentOS6.10.X64.Template.nvram"},{"Key":"pciBridge0.present","Value":"true"},{"Key":"svga.present","Value":"true"},{"Key":"pciBridge4.present","Value":"true"},{"Key":"pciBridge4.virtualDev","Value":"pcieRootPort"},{"Key":"pciBridge4.functions","Value":"8"},{"Key":"pciBridge5.present","Value":"true"},{"Key":"pciBridge5.virtualDev","Value":"pcieRootPort"},{"Key":"pciBridge5.functions","Value":"8"},{"Key":"pciBridge6.present","Value":"true"},{"Key":"pciBridge6.virtualDev","Value":"pcieRootPort"},{"Key":"pciBridge6.functions","Value":"8"},{"Key":"pciBridge7.present","Value":"true"},{"Key":"pciBridge7.virtualDev","Value":"pcieRootPort"},{"Key":"pciBridge7.functions","Value":"8"},{"Key":"hpet0.present","Value":"true"},{"Key":"cpuid.coresPerSocket","Value":"2"},{"Key":"ethernet0.uptCompatibility","Value":"true"},{"Key":"vmware.tools.internalversion","Value":"2147483647"},{"Key":"vmware.tools.requiredversion","Value":"9541"},{"Key":"migrate.hostLogState","Value":"none"},{"Key":"migrate.migrationId","Value":"0"},{"Key":"migrate.hostLog","Value":"./IDCOMD_192.168.110.191_CentOS6.10.X64.Template-f0564f4b.hlog"},{"Key":"ethernet0.pciSlotNumber","Value":"160"},{"Key":"monitor.phys_bits_used","Value":"42"},{"Key":"pciBridge0.pciSlotNumber","Value":"17"},{"Key":"pciBridge4.pciSlotNumber","Value":"21"},{"Key":"pciBridge5.pciSlotNumber","Value":"22"},{"Key":"pciBridge6.pciSlotNumber","Value":"23"},{"Key":"pciBridge7.pciSlotNumber","Value":"24"},{"Key":"replay.filename","Value":""},{"Key":"replay.supported","Value":"false"},{"Key":"sched.swap.derivedName","Value":"/vmfs/volumes/5c4ec2f8-6b4feaec-3bde-90b11c12a830/IDCOMD_192.168.110.191_CentOS6.10.X64.Template/IDCOMD_192.168.110.191_CentOS6.10.X64.Template-f0564f4b.vswp"},{"Key":"scsi0.pciSlotNumber","Value":"16"},{"Key":"scsi0:0.redo","Value":""},{"Key":"softPowerOff","Value":"false"},{"Key":"virtualHW.productCompatibility","Value":"hosted"},{"Key":"vmci0.pciSlotNumber","Value":"32"},{"Key":"vmotion.checkpointFBSize","Value":"4194304"},{"Key":"vmotion.checkpointSVGAPrimarySize","Value":"4194304"},{"Key":"svga.guestBackedPrimaryAware","Value":"true"}],"CpuFeatureMask":null,"DatastoreUrl":[{"Name":"VOL01","Url":"/vmfs/volumes/5c4ec2f8-6b4feaec-3bde-90b11c12a830"}],"SwapPlacement":"inherit","BootOptions":{"BootDelay":0,"EnterBIOSSetup":false,"EfiSecureBootEnabled":null,"BootRetryEnabled":false,"BootRetryDelay":10000,"BootOrder":null,"NetworkBootProtocol":""},"FtInfo":null,"RepConfig":null,"VAppConfig":null,"VAssertsEnabled":false,"ChangeTrackingEnabled":false,"Firmware":"bios","MaxMksConnections":40,"GuestAutoLockEnabled":false,"ManagedBy":null,"MemoryReservationLockedToMax":false,"InitialOverhead":null,"NestedHVEnabled":false,"VPMCEnabled":false,"ScheduledHardwareUpgradeInfo":{"UpgradePolicy":"never","VersionKey":"","ScheduledHardwareUpgradeStatus":"none","Fault":null},"ForkConfigInfo":{"ParentEnabled":false,"ChildForkGroupId":"","ParentForkGroupId":"","ChildType":""},"VFlashCacheReservation":0,"VmxConfigChecksum":null,"MessageBusTunnelEnabled":null,"VmStorageObjectId":"","SwapStorageObjectId":"","KeyId":null,"GuestIntegrityInfo":null,"MigrateEncryption":""},"Layout":{"ConfigFile":["IDCOMD_192.168.110.191_CentOS6.10.X64.Template.vmxf","IDCOMD_192.168.110.191_CentOS6.10.X64.Template.nvram","IDCOMD_192.168.110.191_CentOS6.10.X64.Template.vmsd"],"LogFile":["vmware.log"],"Disk":[{"Key":2000,"DiskFile":["[VOL01] IDCOMD_192.168.110.191_CentOS6.10.X64.Template/IDCOMD_192.168.110.191_CentOS6.10.X64.Template.vmdk"]}],"Snapshot":null,"SwapFile":"[VOL01] IDCOMD_192.168.110.191_CentOS6.10.X64.Template/IDCOMD_192.168.110.191_CentOS6.10.X64.Template-f0564f4b.vswp"},"LayoutEx":{"File":[{"Key":0,"Name":"[VOL01] IDCOMD_192.168.110.191_CentOS6.10.X64.Template/IDCOMD_192.168.110.191_CentOS6.10.X64.Template.vmx","Type":"config","Size":2935,"UniqueSize":2935,"BackingObjectId":"","Accessible":true},{"Key":8,"Name":"[VOL01] IDCOMD_192.168.110.191_CentOS6.10.X64.Template/IDCOMD_192.168.110.191_CentOS6.10.X64.Template.vmxf","Type":"extendedConfig","Size":0,"UniqueSize":0,"BackingObjectId":"","Accessible":true},{"Key":4,"Name":"[VOL01] IDCOMD_192.168.110.191_CentOS6.10.X64.Template/IDCOMD_192.168.110.191_CentOS6.10.X64.Template.nvram","Type":"nvram","Size":8684,"UniqueSize":8684,"BackingObjectId":"","Accessible":true},{"Key":1,"Name":"[VOL01] IDCOMD_192.168.110.191_CentOS6.10.X64.Template/IDCOMD_192.168.110.191_CentOS6.10.X64.Template.vmsd","Type":"snapshotList","Size":0,"UniqueSize":0,"BackingObjectId":"","Accessible":true},{"Key":2,"Name":"[VOL01] IDCOMD_192.168.110.191_CentOS6.10.X64.Template/IDCOMD_192.168.110.191_CentOS6.10.X64.Template.vmdk","Type":"diskDescriptor","Size":0,"UniqueSize":0,"BackingObjectId":"","Accessible":true},{"Key":3,"Name":"[VOL01] IDCOMD_192.168.110.191_CentOS6.10.X64.Template/IDCOMD_192.168.110.191_CentOS6.10.X64.Template-flat.vmdk","Type":"diskExtent","Size":4447010816,"UniqueSize":4447010816,"BackingObjectId":"","Accessible":true},{"Key":5,"Name":"[VOL01] IDCOMD_192.168.110.191_CentOS6.10.X64.Template/IDCOMD_192.168.110.191_CentOS6.10.X64.Template-f0564f4b.vswp","Type":"swap","Size":4294967296,"UniqueSize":4294967296,"BackingObjectId":"","Accessible":true},{"Key":6,"Name":"[VOL01] IDCOMD_192.168.110.191_CentOS6.10.X64.Template/vmx-IDCOMD_192.168.110.191_CentOS6.10.X64.Template-4032188235-1.vswp","Type":"uwswap","Size":174063616,"UniqueSize":174063616,"BackingObjectId":"","Accessible":true},{"Key":7,"Name":"[VOL01] IDCOMD_192.168.110.191_CentOS6.10.X64.Template/vmware.log","Type":"log","Size":265539,"UniqueSize":265539,"BackingObjectId":"","Accessible":true}],"Disk":[{"Key":2000,"Chain":[{"FileKey":[2,3]}]}],"Snapshot":null,"Timestamp":"2019-08-12T01:17:49.437936Z"},"Storage":{"PerDatastoreUsage":[{"Datastore":{"Type":"Datastore","Value":"datastore-210"},"Committed":8916318886,"Uncommitted":17027826230,"Unshared":4447010816}],"Timestamp":"2019-08-12T01:17:49.439Z"},"EnvironmentBrowser":{"Type":"EnvironmentBrowser","Value":"envbrowser-389"},"ResourcePool":{"Type":"ResourcePool","Value":"resgroup-62"},"ParentVApp":null,"ResourceConfig":{"Entity":{"Type":"VirtualMachine","Value":"vm-389"},"ChangeVersion":"","LastModified":null,"CpuAllocation":{"Reservation":0,"ExpandableReservation":false,"Limit":-1,"Shares":{"Shares":4000,"Level":"normal"},"OverheadLimit":null},"MemoryAllocation":{"Reservation":0,"ExpandableReservation":false,"Limit":-1,"Shares":{"Shares":40960,"Level":"normal"},"OverheadLimit":93}},"Runtime":{"Device":[{"RuntimeState":{"VmDirectPathGen2Active":false,"VmDirectPathGen2InactiveReasonVm":null,"VmDirectPathGen2InactiveReasonOther":["vmNptIncompatibleNetwork"],"VmDirectPathGen2InactiveReasonExtended":"","ReservationStatus":"","AttachmentStatus":"","FeatureRequirement":null},"Key":4000}],"Host":{"Type":"HostSystem","Value":"host-13"},"ConnectionState":"connected","PowerState":"poweredOn","FaultToleranceState":"notConfigured","DasVmProtection":null,"ToolsInstallerMounted":false,"SuspendTime":null,"BootTime":"2019-06-28T06:58:45.518084Z","SuspendInterval":0,"Question":null,"MemoryOverhead":0,"MaxCpuUsage":10104,"MaxMemoryUsage":4096,"NumMksConnections":0,"RecordReplayState":"inactive","CleanPowerOff":null,"NeedSecondaryReason":"","OnlineStandby":false,"MinRequiredEVCModeKey":"","ConsolidationNeeded":false,"OfflineFeatureRequirement":[{"Key":"cpuid.lm","FeatureName":"cpuid.lm","Value":"Bool:Min:1"}],"FeatureRequirement":[{"Key":"cpuid.SSE3","FeatureName":"cpuid.SSE3","Value":"Bool:Min:1"},{"Key":"cpuid.PCLMULQDQ","FeatureName":"cpuid.PCLMULQDQ","Value":"Bool:Min:1"},{"Key":"cpuid.SSSE3","FeatureName":"cpuid.SSSE3","Value":"Bool:Min:1"},{"Key":"cpuid.CMPXCHG16B","FeatureName":"cpuid.CMPXCHG16B","Value":"Bool:Min:1"},{"Key":"cpuid.SSE41","FeatureName":"cpuid.SSE41","Value":"Bool:Min:1"},{"Key":"cpuid.SSE42","FeatureName":"cpuid.SSE42","Value":"Bool:Min:1"},{"Key":"cpuid.POPCNT","FeatureName":"cpuid.POPCNT","Value":"Bool:Min:1"},{"Key":"cpuid.AES","FeatureName":"cpuid.AES","Value":"Bool:Min:1"},{"Key":"cpuid.DS","FeatureName":"cpuid.DS","Value":"Bool:Min:1"},{"Key":"cpuid.SS","FeatureName":"cpuid.SS","Value":"Bool:Min:1"},{"Key":"cpuid.LAHF64","FeatureName":"cpuid.LAHF64","Value":"Bool:Min:1"},{"Key":"cpuid.NX","FeatureName":"cpuid.NX","Value":"Bool:Min:1"},{"Key":"cpuid.RDTSCP","FeatureName":"cpuid.RDTSCP","Value":"Bool:Min:1"},{"Key":"cpuid.LM","FeatureName":"cpuid.LM","Value":"Bool:Min:1"},{"Key":"cpuid.Intel","FeatureName":"cpuid.Intel","Value":"Bool:Min:1"}],"FeatureMask":null,"VFlashCacheAllocation":0,"Paused":false,"SnapshotInBackground":false,"QuiescedForkParent":null,"InstantCloneFrozen":null,"CryptoState":""},"Guest":{"ToolsStatus":"toolsOk","ToolsVersionStatus":"guestToolsUnmanaged","ToolsVersionStatus2":"guestToolsUnmanaged","ToolsRunningStatus":"guestToolsRunning","ToolsVersion":"2147483647","ToolsInstallType":"","GuestId":"","GuestFamily":"otherGuestFamily","GuestFullName":"Linux 2.6.32-754.15.3.el6.x86_64 CentOS release 6.10 (Final)","HostName":"CentOS6-X64-Template","IpAddress":"192.168.110.191","Net":[{"Network":"IDC-NET","IpAddress":["192.168.110.191","fe80::250:56ff:feb7:1251"],"MacAddress":"00:50:56:b7:12:51","Connected":true,"DeviceConfigId":4000,"DnsConfig":null,"IpConfig":{"IpAddress":[{"IpAddress":"192.168.110.191","PrefixLength":23,"Origin":"","State":"preferred","Lifetime":null},{"IpAddress":"fe80::250:56ff:feb7:1251","PrefixLength":64,"Origin":"","State":"unknown","Lifetime":null}],"Dhcp":null,"AutoConfigurationEnabled":null},"NetBIOSConfig":null}],"IpStack":[{"DnsConfig":{"Dhcp":false,"HostName":"CentOS6-X64-Template","DomainName":"","IpAddress":["114.114.114.114","233.5.5.5"],"SearchDomain":[""]},"IpRouteConfig":{"IpRoute":[{"Network":"192.168.110.0","PrefixLength":23,"Gateway":{"IpAddress":"","Device":"0"}},{"Network":"169.254.0.0","PrefixLength":16,"Gateway":{"IpAddress":"","Device":"0"}},{"Network":"0.0.0.0","PrefixLength":0,"Gateway":{"IpAddress":"192.168.111.254","Device":"0"}},{"Network":"fe80::","PrefixLength":64,"Gateway":{"IpAddress":"","Device":"0"}},{"Network":"ff00::","PrefixLength":8,"Gateway":{"IpAddress":"","Device":"0"}}]},"IpStackConfig":null,"DhcpConfig":null}],"Disk":[{"DiskPath":"/","Capacity":18369396736,"FreeSpace":15049367552},{"DiskPath":"/boot","Capacity":499355648,"FreeSpace":444992512}],"Screen":{"Width":800,"Height":600},"GuestState":"running","AppHeartbeatStatus":"appStatusGray","GuestKernelCrashed":null,"AppState":"none","GuestOperationsReady":true,"InteractiveGuestOperationsReady":false,"GuestStateChangeSupported":true,"GenerationInfo":null},"Summary":{"Vm":{"Type":"VirtualMachine","Value":"vm-389"},"Runtime":{"Device":[{"RuntimeState":{"VmDirectPathGen2Active":false,"VmDirectPathGen2InactiveReasonVm":null,"VmDirectPathGen2InactiveReasonOther":["vmNptIncompatibleNetwork"],"VmDirectPathGen2InactiveReasonExtended":"","ReservationStatus":"","AttachmentStatus":"","FeatureRequirement":null},"Key":4000}],"Host":{"Type":"HostSystem","Value":"host-13"},"ConnectionState":"connected","PowerState":"poweredOn","FaultToleranceState":"notConfigured","DasVmProtection":null,"ToolsInstallerMounted":false,"SuspendTime":null,"BootTime":"2019-06-28T06:58:45.518084Z","SuspendInterval":0,"Question":null,"MemoryOverhead":0,"MaxCpuUsage":10104,"MaxMemoryUsage":4096,"NumMksConnections":0,"RecordReplayState":"inactive","CleanPowerOff":null,"NeedSecondaryReason":"","OnlineStandby":false,"MinRequiredEVCModeKey":"","ConsolidationNeeded":false,"OfflineFeatureRequirement":[{"Key":"cpuid.lm","FeatureName":"cpuid.lm","Value":"Bool:Min:1"}],"FeatureRequirement":[{"Key":"cpuid.SSE3","FeatureName":"cpuid.SSE3","Value":"Bool:Min:1"},{"Key":"cpuid.PCLMULQDQ","FeatureName":"cpuid.PCLMULQDQ","Value":"Bool:Min:1"},{"Key":"cpuid.SSSE3","FeatureName":"cpuid.SSSE3","Value":"Bool:Min:1"},{"Key":"cpuid.CMPXCHG16B","FeatureName":"cpuid.CMPXCHG16B","Value":"Bool:Min:1"},{"Key":"cpuid.SSE41","FeatureName":"cpuid.SSE41","Value":"Bool:Min:1"},{"Key":"cpuid.SSE42","FeatureName":"cpuid.SSE42","Value":"Bool:Min:1"},{"Key":"cpuid.POPCNT","FeatureName":"cpuid.POPCNT","Value":"Bool:Min:1"},{"Key":"cpuid.AES","FeatureName":"cpuid.AES","Value":"Bool:Min:1"},{"Key":"cpuid.DS","FeatureName":"cpuid.DS","Value":"Bool:Min:1"},{"Key":"cpuid.SS","FeatureName":"cpuid.SS","Value":"Bool:Min:1"},{"Key":"cpuid.LAHF64","FeatureName":"cpuid.LAHF64","Value":"Bool:Min:1"},{"Key":"cpuid.NX","FeatureName":"cpuid.NX","Value":"Bool:Min:1"},{"Key":"cpuid.RDTSCP","FeatureName":"cpuid.RDTSCP","Value":"Bool:Min:1"},{"Key":"cpuid.LM","FeatureName":"cpuid.LM","Value":"Bool:Min:1"},{"Key":"cpuid.Intel","FeatureName":"cpuid.Intel","Value":"Bool:Min:1"}],"FeatureMask":null,"VFlashCacheAllocation":0,"Paused":false,"SnapshotInBackground":false,"QuiescedForkParent":null,"InstantCloneFrozen":null,"CryptoState":""},"Guest":{"GuestId":"","GuestFullName":"Linux 2.6.32-754.15.3.el6.x86_64 CentOS release 6.10 (Final)","ToolsStatus":"toolsOk","ToolsVersionStatus":"guestToolsUnmanaged","ToolsVersionStatus2":"guestToolsUnmanaged","ToolsRunningStatus":"guestToolsRunning","HostName":"CentOS6-X64-Template","IpAddress":"192.168.110.191"},"Config":{"Name":"IDCOMD_192.168.110.191_CentOS6.10.X64.Template","Template":false,"VmPathName":"[VOL01] IDCOMD_192.168.110.191_CentOS6.10.X64.Template/IDCOMD_192.168.110.191_CentOS6.10.X64.Template.vmx","MemorySizeMB":4096,"CpuReservation":0,"MemoryReservation":0,"NumCpu":4,"NumEthernetCards":1,"NumVirtualDisks":1,"Uuid":"42372cc9-0811-74e4-e7b6-abaa96a8ee85","InstanceUuid":"50372076-6a91-f48a-818c-867387badbdd","GuestId":"centos64Guest","GuestFullName":"CentOS 4/5/6/7 (64-bit)","Annotation":"","Product":null,"InstallBootRequired":false,"FtInfo":null,"ManagedBy":null,"TpmPresent":null,"NumVmiopBackings":0},"Storage":{"Committed":8916318886,"Uncommitted":17027826230,"Unshared":4447010816,"Timestamp":"2019-08-12T01:17:49.439936Z"},"QuickStats":{"OverallCpuUsage":0,"OverallCpuDemand":0,"GuestMemoryUsage":0,"HostMemoryUsage":2814,"GuestHeartbeatStatus":"green","DistributedCpuEntitlement":0,"DistributedMemoryEntitlement":829,"StaticCpuEntitlement":1631,"StaticMemoryEntitlement":4189,"PrivateMemory":2755,"SharedMemory":97,"SwappedMemory":0,"BalloonedMemory":0,"ConsumedOverheadMemory":37,"FtLogBandwidth":-1,"FtSecondaryLatency":-1,"FtLatencyStatus":"gray","CompressedMemory":0,"UptimeSeconds":3870025,"SsdSwappedMemory":0},"OverallStatus":"green","CustomValue":null},"Datastore":[{"Type":"Datastore","Value":"datastore-210"}],"Network":[{"Type":"Network","Value":"network-16"}],"Snapshot":null,"RootSnapshot":null,"GuestHeartbeatStatus":"green"}


如图:

最后使用这种方法,较为高效地进行了梳理,得到了需要的字段;

总结两点:

  • 对于复杂的嵌套结构体,将其转化为json格式,是清晰获取其内容的最佳方式;

  • 对于Vcenter的SDK,核心信息都在Summary字段中;

  • 相关文章

    JavaScript2024新功能:Object.groupBy、正则表达式v标志
    PHP trim 函数对多字节字符的使用和限制
    新函数 json_validate() 、randomizer 类扩展…20 个PHP 8.3 新特性全面解析
    使用HTMX为WordPress增效:如何在不使用复杂框架的情况下增强平台功能
    为React 19做准备:WordPress 6.6用户指南
    如何删除WordPress中的所有评论

    发布评论