github.com/vmware/govmomi@v0.37.1/simulator/esx/host_storage_device_info.go (about) 1 /* 2 Copyright (c) 2017-2023 VMware, Inc. All Rights Reserved. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 package esx 18 19 import "github.com/vmware/govmomi/vim25/types" 20 21 // HostStorageDeviceInfo is the default template for the HostSystem config.storageDevice property. 22 // Capture method: 23 // 24 // govc object.collect -s -dump HostSystem:ha-host config.storageDevice 25 var HostStorageDeviceInfo = types.HostStorageDeviceInfo{ 26 HostBusAdapter: []types.BaseHostHostBusAdapter{ 27 &types.HostParallelScsiHba{ 28 HostHostBusAdapter: types.HostHostBusAdapter{ 29 Key: "key-vim.host.ParallelScsiHba-vmhba0", 30 Device: "vmhba0", 31 Bus: 3, 32 Status: "unknown", 33 Model: "PVSCSI SCSI Controller", 34 Driver: "pvscsi", 35 Pci: "0000:03:00.0", 36 }, 37 }, 38 &types.HostBlockHba{ 39 HostHostBusAdapter: types.HostHostBusAdapter{ 40 Key: "key-vim.host.BlockHba-vmhba1", 41 Device: "vmhba1", 42 Bus: 0, 43 Status: "unknown", 44 Model: "PIIX4 for 430TX/440BX/MX IDE Controller", 45 Driver: "vmkata", 46 Pci: "0000:00:07.1", 47 }, 48 }, 49 &types.HostBlockHba{ 50 HostHostBusAdapter: types.HostHostBusAdapter{ 51 Key: "key-vim.host.BlockHba-vmhba64", 52 Device: "vmhba64", 53 Bus: 0, 54 Status: "unknown", 55 Model: "PIIX4 for 430TX/440BX/MX IDE Controller", 56 Driver: "vmkata", 57 Pci: "0000:00:07.1", 58 }, 59 }, 60 }, 61 ScsiLun: []types.BaseScsiLun{ 62 &types.ScsiLun{ 63 HostDevice: types.HostDevice{ 64 DeviceName: "/vmfs/devices/cdrom/mpx.vmhba1:C0:T0:L0", 65 DeviceType: "cdrom", 66 }, 67 Key: "key-vim.host.ScsiLun-0005000000766d686261313a303a30", 68 Uuid: "0005000000766d686261313a303a30", 69 Descriptor: []types.ScsiLunDescriptor{ 70 { 71 Quality: "lowQuality", 72 Id: "mpx.vmhba1:C0:T0:L0", 73 }, 74 { 75 Quality: "lowQuality", 76 Id: "vml.0005000000766d686261313a303a30", 77 }, 78 { 79 Quality: "lowQuality", 80 Id: "0005000000766d686261313a303a30", 81 }, 82 }, 83 CanonicalName: "mpx.vmhba1:C0:T0:L0", 84 DisplayName: "Local NECVMWar CD-ROM (mpx.vmhba1:C0:T0:L0)", 85 LunType: "cdrom", 86 Vendor: "NECVMWar", 87 Model: "VMware IDE CDR00", 88 Revision: "1.00", 89 ScsiLevel: 5, 90 SerialNumber: "unavailable", 91 DurableName: (*types.ScsiLunDurableName)(nil), 92 AlternateName: []types.ScsiLunDurableName{ 93 { 94 Namespace: "GENERIC_VPD", 95 NamespaceId: 0x5, 96 Data: []uint8{0x2d, 0x37, 0x39}, 97 }, 98 { 99 Namespace: "GENERIC_VPD", 100 NamespaceId: 0x5, 101 Data: []uint8{0x30}, 102 }, 103 }, 104 StandardInquiry: []uint8{0x30}, 105 QueueDepth: 0, 106 OperationalState: []string{"ok"}, 107 Capabilities: &types.ScsiLunCapabilities{}, 108 VStorageSupport: "vStorageUnsupported", 109 ProtocolEndpoint: types.NewBool(false), 110 }, 111 &types.HostScsiDisk{ 112 ScsiLun: types.ScsiLun{ 113 HostDevice: types.HostDevice{ 114 DeviceName: "/vmfs/devices/disks/mpx.vmhba0:C0:T0:L0", 115 DeviceType: "disk", 116 }, 117 Key: "key-vim.host.ScsiDisk-0000000000766d686261303a303a30", 118 Uuid: "0000000000766d686261303a303a30", 119 Descriptor: []types.ScsiLunDescriptor{ 120 { 121 Quality: "lowQuality", 122 Id: "mpx.vmhba0:C0:T0:L0", 123 }, 124 { 125 Quality: "lowQuality", 126 Id: "vml.0000000000766d686261303a303a30", 127 }, 128 { 129 Quality: "lowQuality", 130 Id: "0000000000766d686261303a303a30", 131 }, 132 }, 133 CanonicalName: "mpx.vmhba0:C0:T0:L0", 134 DisplayName: "Local VMware, Disk (mpx.vmhba0:C0:T0:L0)", 135 LunType: "disk", 136 Vendor: "VMware, ", 137 Model: "VMware Virtual S", 138 Revision: "1.0 ", 139 ScsiLevel: 2, 140 SerialNumber: "unavailable", 141 DurableName: (*types.ScsiLunDurableName)(nil), 142 AlternateName: []types.ScsiLunDurableName{ 143 { 144 Namespace: "GENERIC_VPD", 145 NamespaceId: 0x5, 146 Data: []uint8{0x2d, 0x37, 0x39}, 147 }, 148 { 149 Namespace: "GENERIC_VPD", 150 NamespaceId: 0x5, 151 Data: []uint8{0x30}, 152 }, 153 }, 154 StandardInquiry: []uint8{0x30}, 155 QueueDepth: 1024, 156 OperationalState: []string{"ok"}, 157 Capabilities: &types.ScsiLunCapabilities{}, 158 VStorageSupport: "vStorageUnsupported", 159 ProtocolEndpoint: types.NewBool(false), 160 }, 161 Capacity: types.HostDiskDimensionsLba{ 162 BlockSize: 512, 163 Block: 67108864, 164 }, 165 DevicePath: "/vmfs/devices/disks/mpx.vmhba0:C0:T0:L0", 166 Ssd: types.NewBool(true), 167 LocalDisk: types.NewBool(true), 168 PhysicalLocation: nil, 169 EmulatedDIXDIFEnabled: types.NewBool(false), 170 VsanDiskInfo: (*types.VsanHostVsanDiskInfo)(nil), 171 ScsiDiskType: "native512", 172 }, 173 }, 174 ScsiTopology: &types.HostScsiTopology{ 175 Adapter: []types.HostScsiTopologyInterface{ 176 { 177 Key: "key-vim.host.ScsiTopology.Interface-vmhba0", 178 Adapter: "key-vim.host.ParallelScsiHba-vmhba0", 179 Target: []types.HostScsiTopologyTarget{ 180 { 181 Key: "key-vim.host.ScsiTopology.Target-vmhba0:0:0", 182 Target: 0, 183 Lun: []types.HostScsiTopologyLun{ 184 { 185 Key: "key-vim.host.ScsiTopology.Lun-0000000000766d686261303a303a30", 186 Lun: 0, 187 ScsiLun: "key-vim.host.ScsiDisk-0000000000766d686261303a303a30", 188 }, 189 }, 190 Transport: &types.HostParallelScsiTargetTransport{}, 191 }, 192 }, 193 }, 194 { 195 Key: "key-vim.host.ScsiTopology.Interface-vmhba1", 196 Adapter: "key-vim.host.BlockHba-vmhba1", 197 Target: []types.HostScsiTopologyTarget{ 198 { 199 Key: "key-vim.host.ScsiTopology.Target-vmhba1:0:0", 200 Target: 0, 201 Lun: []types.HostScsiTopologyLun{ 202 { 203 Key: "key-vim.host.ScsiTopology.Lun-0005000000766d686261313a303a30", 204 Lun: 0, 205 ScsiLun: "key-vim.host.ScsiLun-0005000000766d686261313a303a30", 206 }, 207 }, 208 Transport: &types.HostBlockAdapterTargetTransport{}, 209 }, 210 }, 211 }, 212 { 213 Key: "key-vim.host.ScsiTopology.Interface-vmhba64", 214 Adapter: "key-vim.host.BlockHba-vmhba64", 215 Target: nil, 216 }, 217 }, 218 }, 219 MultipathInfo: &types.HostMultipathInfo{ 220 Lun: []types.HostMultipathInfoLogicalUnit{ 221 { 222 Key: "key-vim.host.MultipathInfo.LogicalUnit-0005000000766d686261313a303a30", 223 Id: "0005000000766d686261313a303a30", 224 Lun: "key-vim.host.ScsiLun-0005000000766d686261313a303a30", 225 Path: []types.HostMultipathInfoPath{ 226 { 227 Key: "key-vim.host.MultipathInfo.Path-vmhba1:C0:T0:L0", 228 Name: "vmhba1:C0:T0:L0", 229 PathState: "active", 230 State: "active", 231 IsWorkingPath: types.NewBool(true), 232 Adapter: "key-vim.host.BlockHba-vmhba1", 233 Lun: "key-vim.host.MultipathInfo.LogicalUnit-0005000000766d686261313a303a30", 234 Transport: &types.HostBlockAdapterTargetTransport{}, 235 }, 236 }, 237 Policy: &types.HostMultipathInfoFixedLogicalUnitPolicy{ 238 HostMultipathInfoLogicalUnitPolicy: types.HostMultipathInfoLogicalUnitPolicy{ 239 Policy: "VMW_PSP_FIXED", 240 }, 241 Prefer: "vmhba1:C0:T0:L0", 242 }, 243 StorageArrayTypePolicy: &types.HostMultipathInfoLogicalUnitStorageArrayTypePolicy{ 244 Policy: "VMW_SATP_LOCAL", 245 }, 246 }, 247 { 248 Key: "key-vim.host.MultipathInfo.LogicalUnit-0000000000766d686261303a303a30", 249 Id: "0000000000766d686261303a303a30", 250 Lun: "key-vim.host.ScsiDisk-0000000000766d686261303a303a30", 251 Path: []types.HostMultipathInfoPath{ 252 { 253 Key: "key-vim.host.MultipathInfo.Path-vmhba0:C0:T0:L0", 254 Name: "vmhba0:C0:T0:L0", 255 PathState: "active", 256 State: "active", 257 IsWorkingPath: types.NewBool(true), 258 Adapter: "key-vim.host.ParallelScsiHba-vmhba0", 259 Lun: "key-vim.host.MultipathInfo.LogicalUnit-0000000000766d686261303a303a30", 260 Transport: &types.HostParallelScsiTargetTransport{}, 261 }, 262 }, 263 Policy: &types.HostMultipathInfoFixedLogicalUnitPolicy{ 264 HostMultipathInfoLogicalUnitPolicy: types.HostMultipathInfoLogicalUnitPolicy{ 265 Policy: "VMW_PSP_FIXED", 266 }, 267 Prefer: "vmhba0:C0:T0:L0", 268 }, 269 StorageArrayTypePolicy: &types.HostMultipathInfoLogicalUnitStorageArrayTypePolicy{ 270 Policy: "VMW_SATP_LOCAL", 271 }, 272 }, 273 }, 274 }, 275 PlugStoreTopology: &types.HostPlugStoreTopology{ 276 Adapter: []types.HostPlugStoreTopologyAdapter{ 277 { 278 Key: "key-vim.host.PlugStoreTopology.Adapter-vmhba0", 279 Adapter: "key-vim.host.ParallelScsiHba-vmhba0", 280 Path: []string{"key-vim.host.PlugStoreTopology.Path-vmhba0:C0:T0:L0"}, 281 }, 282 { 283 Key: "key-vim.host.PlugStoreTopology.Adapter-vmhba1", 284 Adapter: "key-vim.host.BlockHba-vmhba1", 285 Path: []string{"key-vim.host.PlugStoreTopology.Path-vmhba1:C0:T0:L0"}, 286 }, 287 { 288 Key: "key-vim.host.PlugStoreTopology.Adapter-vmhba64", 289 Adapter: "key-vim.host.BlockHba-vmhba64", 290 Path: nil, 291 }, 292 }, 293 Path: []types.HostPlugStoreTopologyPath{ 294 { 295 Key: "key-vim.host.PlugStoreTopology.Path-vmhba0:C0:T0:L0", 296 Name: "vmhba0:C0:T0:L0", 297 ChannelNumber: 0, 298 TargetNumber: 0, 299 LunNumber: 0, 300 Adapter: "key-vim.host.PlugStoreTopology.Adapter-vmhba0", 301 Target: "key-vim.host.PlugStoreTopology.Target-pscsi.0:0", 302 Device: "key-vim.host.PlugStoreTopology.Device-0000000000766d686261303a303a30", 303 }, 304 { 305 Key: "key-vim.host.PlugStoreTopology.Path-vmhba1:C0:T0:L0", 306 Name: "vmhba1:C0:T0:L0", 307 ChannelNumber: 0, 308 TargetNumber: 0, 309 LunNumber: 0, 310 Adapter: "key-vim.host.PlugStoreTopology.Adapter-vmhba1", 311 Target: "key-vim.host.PlugStoreTopology.Target-ide.0:0", 312 Device: "key-vim.host.PlugStoreTopology.Device-0005000000766d686261313a303a30", 313 }, 314 }, 315 Target: []types.HostPlugStoreTopologyTarget{ 316 { 317 Key: "key-vim.host.PlugStoreTopology.Target-pscsi.0:0", 318 Transport: &types.HostParallelScsiTargetTransport{}, 319 }, 320 { 321 Key: "key-vim.host.PlugStoreTopology.Target-ide.0:0", 322 Transport: &types.HostBlockAdapterTargetTransport{}, 323 }, 324 }, 325 Device: []types.HostPlugStoreTopologyDevice{ 326 { 327 Key: "key-vim.host.PlugStoreTopology.Device-0005000000766d686261313a303a30", 328 Lun: "key-vim.host.ScsiLun-0005000000766d686261313a303a30", 329 Path: []string{"key-vim.host.PlugStoreTopology.Path-vmhba1:C0:T0:L0"}, 330 }, 331 { 332 Key: "key-vim.host.PlugStoreTopology.Device-0000000000766d686261303a303a30", 333 Lun: "key-vim.host.ScsiDisk-0000000000766d686261303a303a30", 334 Path: []string{"key-vim.host.PlugStoreTopology.Path-vmhba0:C0:T0:L0"}, 335 }, 336 }, 337 Plugin: []types.HostPlugStoreTopologyPlugin{ 338 { 339 Key: "key-vim.host.PlugStoreTopology.Plugin-NMP", 340 Name: "NMP", 341 Device: []string{"key-vim.host.PlugStoreTopology.Device-0005000000766d686261313a303a30", "key-vim.host.PlugStoreTopology.Device-0000000000766d686261303a303a30"}, 342 ClaimedPath: []string{"key-vim.host.PlugStoreTopology.Path-vmhba0:C0:T0:L0", "key-vim.host.PlugStoreTopology.Path-vmhba1:C0:T0:L0"}, 343 }, 344 }, 345 }, 346 SoftwareInternetScsiEnabled: false, 347 }