3.5 KiB
layout | page_title | sidebar_current | description |
---|---|---|---|
libvirt | Libvirt: libvirt_node_device_info | docs-libvirt-node-device-info | Use this data source to get information about a specific device on the current node |
Data Source: libvirt_node_device_info
Retrieve information about a specific device on the current node
Example Usage
data "libvirt_node_device_info" "device" {
name = "pci_0000_00_00_0"
}
Argument Reference
name
- (Required) The name of the device name as expected by libvirt.
Attribute Reference
This data source exports the following attributes in addition to the arguments above:
-
capability
- A map of the various attributes for the device, depending on the type of device. Currently implemented arepci
,storage
,usb
type
- Device type:pci
,storage
,usb
devnode
: For devices with a/dev
special file. A mandatory attribute type specify the kind of filepath
, which may be either dev for the main name, orlink
for additional symlinks.
For
pci
devices the additional attributes are:class
- Device PCI classdomain
- Device PCI domainbus
- Device PCI busslot
- Device PCI slotfunction
- Device PCI functionproduct
- Device PCI product map ofid
andname
vendor
- Device PCI vendor map ofid
andname
iommu_group
- Structure that holds IOMMU Groupnumber
and the list of devices that are part of the group
For
storage
devices the additional attributes are:block
- Block device namedrive_type
- Device drive typemodel
- Device modelserial
- Device serial numbersize
- Device size in byteslogical_block_size
- Device logical block sizenum_blocks
- Number of blocks on the device
For
usb
devices the additional attributes are:number
- Device numberclass
- Device classsubclass
- Device subclassprotocol
- Device protocol
For
usb_device
devices the additional attributes are:bus
- Which bus the device belongs todevice
- Which device within the \product
- If present, the productid
andname
from the device ROMvendor
- If present, the vendorid
andname
from the device ROM
For
net
devices the additional attributes are:interface
- The interface name tied to this deviceaddress
- If present, the MAC address of the devicelink
- Optional to reflect the status of the link viaspeed
andstate
keysfeature
- List of features supported by the network interfacecapability
- Holds keytype
that describes the type of network interface:80203
for IEEE 802.3 or80211
for IEEE 802.11
For
scsi_host
devices the additional attributes are:host
- The SCSI host numberunique_id
- This optionally provides the value from the 'unique_id' file found in the scsi_host's directory
For
scsi
devices the additional attributes are:host
- The SCSI host containing the devicebus
- The bus within the hosttarget
- The target within the buslun
- The lun within the targetscsi_type
- The type of SCSI device
For
drm
devices the additional attributes are:drm_type
- Type of DRM device:render
orcard
-
parent
- The parent of this device in the hierarchy -
path
- Full path of the device -
xml
- The XML returned by the libvirt API call -
devnode
- For typedrm
holds thepath
andlink
that point to the device