Sys::V...eDevice(3pm)
π NAME π
Sys::Virt::NodeDevice β Represent & manage a libvirt storage pool
okay so this is the manual page Sys::V...eDevice(3pm), straight out of the User Contributed Perl Documentation, and we're gonna get you fluent in it, bestie π«Ά
β¨ DESCRIPTION β¨
The Sys::Virt::NodeDevice module represents a storage pool managed by libvirt. And like β there are so many flavours of storage pool implementations: LVM, local directories/filesystems, network filesystems, disk partitioning, iSCSI, and SCSI. pick your fighter π
π METHODS π
my $name = $dev->get_name()β hands you back a string with a locally unique name of the device βmy $parentname = $dev->get_parent()β returns a string with a locally unique name of the parent of the device, orundefif there is no parent (sad but valid, no cap) π¦my $xml = $dev->get_xml_description($flags=0)β returns an XML document containing a complete description of the node device's configuration. The optional$flagsparameter controls generation of the XML document, defaulting to0if omitted. It can be one or more of the XML DUMP constants listed later in this document π$dev->reattach()β Rebind the node device to the host OS device drivers π«$dev->dettach()β Unbind the node device from the host OS device driver (yes, that's spelleddettach, we keep it exactly as-is, don't come for me π)$dev->reset()β Reset the node device. The device must be unbound from the host OS drivers for this to work β οΈ$dev->create($flags=0)β Start a node device whose configuration was previously defined using thedefine_node_devicemethod in Sys::Virt. The$flagsparameter is currently unused and defaults to zero π₯$dev->undefine($flags=0)β Delete a node device whose configuration was previously defined using thedefine_node_devicemethod in Sys::Virt. The$flagsparameter is currently unused and defaults to zero π$flag = $dev->get_autostart();β Return a true value if the node device is configured to automatically start upon boot. Return false, otherwise πΈ$dev->set_autostart($flag)β Set the state of the autostart flag, which determines whether the node device will automatically start upon boot of the host OS π$dev->is_active()β Returns a true value if the node device is currently running β¨$dev->is_persistent()β Returns a true value if the node device has a persistent configuration file defined π$dev->destroy()β Destroy the virtual device releasing any OS resources associated with it π₯my @caps = $dev->list_capabilities()β Return a list of all capabilities in the device π§$dev->update($xml, $flags=0)β Update the definition of an existing node device with$xml. The$flagsparameter can be use to control which config is affected (see XML UPDATE FLAGS) and defaults to zero (affect current state of the node device) π
π CONSTANTS π
This section documents constants that are used with various APIs described above β buckle up, there's a lot of them and they're all iconic in their own way π
π¦ LIST FILTERING
The following constants are used to filter object lists:
Sys::Virt::NodeDevice::LIST_CAP_NETβ Include devices with the network capabilitySys::Virt::NodeDevice::LIST_CAP_PCI_DEVβ Include devices with the PCI device capabilitySys::Virt::NodeDevice::LIST_CAP_SCSIβ Include devices with the SCSI capabilitySys::Virt::NodeDevice::LIST_CAP_SCSI_HOSTβ Include devices with the SCSI host capabilitySys::Virt::NodeDevice::LIST_CAP_SCSI_TARGETβ Include devices with the SCSI target capabilitySys::Virt::NodeDevice::LIST_CAP_STORAGEβ Include devices with the storage capabilitySys::Virt::NodeDevice::LIST_CAP_SYSTEMβ Include devices with the system capabilitySys::Virt::NodeDevice::LIST_CAP_USB_DEVβ Include devices with the USB device capabilitySys::Virt::NodeDevice::LIST_CAP_USB_INTERFACEβ Include devices with the USB interface capabilitySys::Virt::NodeDevice::LIST_CAP_FC_HOSTβ Include devices with the fibre channel host capabilitySys::Virt::NodeDevice::LIST_CAP_VPORTSβ Include devices with the NPIV vport capabilitySys::Virt::NodeDevice::LIST_CAP_SCSI_GENERICβ Include devices with the SCSI generic capabilitySys::Virt::NodeDevice::LIST_CAP_DRMβ Include devices with the DRM capabilitySys::Virt::NodeDevice::LIST_CAP_MDEVβ Include mediated devicesSys::Virt::NodeDevice::LIST_CAP_MDEV_TYPESβ Include devices capable of mediated devicesSys::Virt::NodeDevice::LIST_CAP_CCW_DEVβ Include CCW devicesSys::Virt::NodeDevice::LIST_CAP_CSS_DEVβ Include CSS devicesSys::Virt::NodeDevice::LIST_CAP_VDPAβ Include VDPA devicesSys::Virt::NodeDevice::LIST_CAP_AP_CARDβ Include s390 AP card devicesSys::Virt::NodeDevice::LIST_CAP_AP_MATRIXβ Include s390 AP matrix devicesSys::Virt::NodeDevice::LIST_CAP_AP_QUEUEβ Include s390 AP queue devicesSys::Virt::NodeDevice::LIST_CAP_VPDβ Include PCI devices with VPDSys::Virt::NodeDevice::LIST_CAP_CCWGROUP_DEVβ Include s390 CCW group devicesSys::Virt::NodeDevice::LIST_CAP_CCWGROUP_MEMBERβ Include s390 CCW group membersSys::Virt::NodeDevice::LIST_ACTIVEβ Include active devicesSys::Virt::NodeDevice::LIST_INACTIVEβ Include inactive devicesSys::Virt::NodeDevice::LIST_PERSISTENTβ Include persistent devicesSys::Virt::NodeDevice::LIST_TRANSIENTβ Include transient devices
π« EVENT ID CONSTANTS
Sys::Virt::NodeDevice::EVENT_ID_LIFECYCLEβ Node device lifecycle eventsSys::Virt::NodeDevice::EVENT_ID_UPDATEβ Node device config update events
π LIFECYCLE CHANGE EVENTS
The following constants allow node device lifecycle change events to be interpreted. The events contain both a state change, and a reason though the reason is currently unused π
Sys::Virt::NodeDevice::EVENT_CREATEDβ Indicates that a device was createdSys::Virt::NodeDevice::EVENT_DELETEDβ Indicates that a device has been deletedSys::Virt::NodeDevice::EVENT_DEFINEDβ Indicates that a device configuration has been createdSys::Virt::NodeDevice::EVENT_UNDEFINEDβ Indicates that a device configuration has been deleted
πΈ NODE DEVICE CREATION
Sys::Virt::NodeDevice::CREATE_XML_VALIDATEβ Validate the XML document against schema
π§ NODE DEVICE DEFINE
Sys::Virt::NodeDevice::DEFINE_XML_VALIDATEβ Validate the XML document against schema
β NODE DEVICE UPDATE
Sys::Virt::NodeDevice::UPDATE_AFFECT_CURRENTβ Affect live if node device is active, config if it's not activeSys::Virt::NodeDevice::UPDATE_AFFECT_LIVEβ Affect live state of node device onlySys::Virt::NodeDevice::UPDATE_AFFECT_CONFIGβ Affect persistent config only
π₯ XML DUMP OPTIONS
The following constants are used to control the information included in the XML configuration dump:
Sys::Virt::NodeDevice::XML_INACTIVEβ Report the persistent inactive configuration for the node device.
π AUTHORS π
Daniel P. Berrange <berrange@redhat.com>
π COPYRIGHT π
Copyright (C) 2006-2009 Red Hat Copyright (C) 2006-2009 Daniel P. Berrange
π LICENSE π
This program is free software; you can redistribute it and/or modify it under the terms of either the GNU General Public License as published by the Free Software Foundation (either version 2 of the License, or at your option any later version), or, the Artistic License, as specified in the Perl README file.
π SEE ALSO π
Sys::Virt, Sys::Virt::Error, http://libvirt.org
and that's the whole page, bestie β you ate that π«Ά this gem of a doc is perl v5.40.2, dated 2026-06-08, and it goes by Sys::V...eDevice(3pm). slay π
β¨
π¦ where this page comes from
- epel 10: perl-Sys-Virt 12.4.0-1.el10_3 Β· GPL-2.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms