From d459918e7b06d92e9adff999004ed7666a9750cb Mon Sep 17 00:00:00 2001 From: Fabian Arrotin Date: Apr 03 2025 04:53:57 +0000 Subject: modified kvm guest migration snippet Signed-off-by: Fabian Arrotin --- diff --git a/docs/buildsys/koji-cbs-sigs.md b/docs/buildsys/koji-cbs-sigs.md index 246b0ec..8a09101 100644 --- a/docs/buildsys/koji-cbs-sigs.md +++ b/docs/buildsys/koji-cbs-sigs.md @@ -172,7 +172,7 @@ Simply drop the `RPM-GPG-KEY-CentOS-SIG-` under /keys/ directory and updat Here is the Kmods SIG [commit](https://git.centos.org/centos/centos.org/c/fc51c0fc590ebdc734906343ccc392298fda930d?branch=master) given a reference !!! warning - Don't forget to also put the gpg passphrase in the git-crypted pkistore as it will be needed each time that we'll have to unlock the gpg keys in keyring (like on a reboot of the signing machine/service) + Don't forget to also put the gpg passphrase in the git-crypted pkistore as it will be needed each time that we'll have to unlock the gpg keys in keyring (like on a reboot of the signing machine/service), and also don't forget to securely export keys (`export_private_keys`) Last step is to then play the [stylo](https://github.com/centos/ansible-role-stylo) role with ansible after having updated the signing node `stylo_gpg_sigs` list in host_vars. Attention that gpg key id has to be written in lowercase though : diff --git a/docs/tips/virtual_machines.md b/docs/tips/virtual_machines.md index b47a3ad..03eec1e 100644 --- a/docs/tips/virtual_machines.md +++ b/docs/tips/virtual_machines.md @@ -34,7 +34,11 @@ ssh $hypervisor "sudo setfacl -m u:$USER:rwx /var/lib/libvirt/images ; sudo virs # Ensuring now that we can also write to local/target hypervisor and starting to rsync -S (sparsify) the VM sudo setfacl -m u:${USER}:rwx /var/lib/libvirt/images -rsync -avS -4 --progress ${hypervisor}:/var/lib/libvirt/images/${VM}.qcow2 /var/lib/libvirt/images/${VM}.qcow2 +disks=$(ssh $hypervisor "sudo virsh dumpxml ${VM}|grep '/var/lib/libvirt/images'|cut -f 2 -d '='|tr -d \"'\" | sed 's/index//g' ") +for disk in ${disks} ; do + echo "Pulling disk ${disk}" + rsync -avS -4 --progress ${hypervisor}:${disk} /var/lib/libvirt/images/${disk} +done ssh $hypervisor "sudo virsh dumpxml $VM" > /var/lib/libvirt/images/${VM}.xml ```