Skip to content

Add NBD+TLS support for Remote backup #66

@abbbi

Description

@abbbi

Add TLS support for remote backup. It seems not all distributions ship an up to date domainbackup.rng, so its
not possible to start an NBD pull service with TLS support. As distributions adopt, add option --with-tls, so remote
backup via NBDS is possible.

https://fossies.org/linux/libvirt/src/conf/schemas/domainbackup.rng on debian11:

   60               <element name="server">
   61                 <optional>
   62                   <attribute name="tls">
   63                     <ref name="virYesNo"/>
   64                   </attribute>

on rhel 8.5 tls option is missing, so created backup-begin xml fails to validate:

                    </optional>
                    <!-- add tls? -->
                  </group>

Backup XML example:

<domainbackup mode="pull">
  <server tls="yes" name="192.168.20.2" port="10809"/>
  <disks>
    <disk name="vda">
      <scratch file="/var/tmp/backup.9Y9VD.sda"/>
    </disk>
  </disks>
</domainbackup>

this however requires some setup on the host too:

sudo virsh backup-begin --backupxml bck.xml restoredvm
error: internal error: unable to execute QEMU command 'object-add': Unable to access credentials /etc/pki/qemu/ca-cert.pem: No such file or directory

see: https://wiki.libvirt.org/page/TLSCreateCACert

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions