In step 1, we list all available secrets that libvirt knows about. Since we haven't created any, the list is empty.
In step 2, we create the XML definition of the secret. The XML elements that we use to define the secret are:
- The <secret> root element, with an optional ephemeral attribute, telling libvirt that the password should only be stored in memory, if set to yes.
- The <description> attribute containing an arbitrary description.
- The <usage> element specifies what the secrets is going to be used for and its type. In this example, the type attribute is set to iSCSI. The other available types are volume, ceph, and tls. The type attribute is mandatory.
- The <target> element that specifies an arbitrary name is to be used in ...