O'Reilly logo

KVM Virtualization Cookbook by Konstantin Ivanov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to do it...

To define and list secrets with libvirt, perform the steps outlined here:

  1. List all available secrets:
root@kvm:~# virsh secret-list UUID Usage-------------------------------------------------------------------root@kvm:~#
  1. Create the following secrets definition:
root@kvm:~# cat volume_secret.xml<secret ephemeral='no'> <description>Passphrase for the iSCSI iscsi-target.linux-admins.net target server</description> <usage type='iscsi'>   <target>iscsi_secret</target> </usage></secret>root@kvm:~#





 

 

  1. Create the secret and ensure that it has been successfully created:
root@kvm:~# virsh secret-define volume_secret.xmlSecret 7ad1c208-c2c5-4723-8dc5-e2f4f576101a createdroot@kvm:~# virsh secret-list UUID                                 Usage----------------------------------------------------------------- ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required