From a149ef47b00c04760395a6a5ecf82b820cd37185 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kone=C4=8Dn=C3=BD?= Date: Fri, 10 Sep 2021 16:14:35 +0200 Subject: [PATCH] Review virt-notes SOP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Konečný --- modules/sysadmin_guide/nav.adoc | 2 +- modules/sysadmin_guide/pages/virt-notes.adoc | 49 ++++++++------------ 2 files changed, 21 insertions(+), 30 deletions(-) diff --git a/modules/sysadmin_guide/nav.adoc b/modules/sysadmin_guide/nav.adoc index 468721d..e813f94 100644 --- a/modules/sysadmin_guide/nav.adoc +++ b/modules/sysadmin_guide/nav.adoc @@ -110,7 +110,7 @@ ** xref:unbound.adoc[Fedora Infra Unbound Notes - SOP] ** xref:virt-image.adoc[Fedora Infrastructure Kpartx Notes - SOP] ** xref:virtio.adoc[Virtio Notes - SOP] -** xref:virt-notes.adoc[virt-notes - SOP in review ] +** xref:virt-notes.adoc[Fedora Infrastructure Libvirt Notes - SOP] ** xref:voting.adoc[voting - SOP in review ] ** xref:waiverdb.adoc[waiverdb - SOP in review ] ** xref:wcidff.adoc[wcidff - SOP in review ] diff --git a/modules/sysadmin_guide/pages/virt-notes.adoc b/modules/sysadmin_guide/pages/virt-notes.adoc index 9bed7b5..e7d3cbf 100644 --- a/modules/sysadmin_guide/pages/virt-notes.adoc +++ b/modules/sysadmin_guide/pages/virt-notes.adoc @@ -1,26 +1,19 @@ = Fedora Infrastructure Libvirt Notes -Notes/FAQ on using libvirt/virsh/virt-manager in our environment +Notes/FAQ on using `libvirt/virsh/virt-manager` in our environment -== how do I migrate a guest from one virthost to another +== How do I migrate a guest from one virthost to another -multiple steps: - -[arabic] -. {blank} -+ -setup an unpassworded root ssh key to allow communication between:: - the two virthosts as root. This is only temporary, so, while scary it - is not a big deal. Right now, this also means modifying the - `/etc/ssh/sshd_config` to `permitroot without-password`. +. Setup an unpassworded root ssh key to allow communication between +the two virthosts as root. This is only temporary, so, while scary it +is not a big deal. Right now, this also means modifying the +`/etc/ssh/sshd_config` to `permitroot without-password`. . Determine whatever changes need to be made to the guest. This can be the number of cpus, the amount of memory, or the disk location as this may not be standard on the current server. -. {blank} -+ -Make a dump of the current virtual guest using the virsh:: - command. Use `virsh dumpxml --migratable guestname` and then edit any - changes in disk layout, memory and cpu needed. +. Make a dump of the current virtual guest using the virsh +command. Use `virsh dumpxml --migratable guestname` and then edit any +changes in disk layout, memory and cpu needed. . setup storage on the destination end to match the source storage. `lvs` will give the amount of disk space. Due to some vaguries on disk sizes, it is always better to round up so if the original server says it @@ -67,20 +60,16 @@ you will need to use a more direct movement. . Schedule outage time if any. This will need to be long enough to copy the data from one host to another, so will depend on guest disk size. . Turn off monitoring in nagios -. {blank} -+ -setup an unpassworded root ssh key to allow communication between:: - the two virthosts as root. This is only temporary, so, while scary it - is not a big deal. Right now, this also means modifying the - `/etc/ssh/sshd_config` to `permitroot without-password`. +. setup an unpassworded root ssh key to allow communication between +the two virthosts as root. This is only temporary, so, while scary it +is not a big deal. Right now, this also means modifying the +`/etc/ssh/sshd_config` to `permitroot without-password`. . Determine whatever changes need to be made to the guest. This can be the number of cpus, the amount of memory, or the disk location as this may not be standard on the current server. -. {blank} -+ -Make a dump of the current virtual guest using the virsh:: - command. Use `virsh dumpxml --migratable guestname` and then edit any - changes in disk layout, memory and cpu needed. +. Make a dump of the current virtual guest using the virsh +command. Use `virsh dumpxml --migratable guestname` and then edit any +changes in disk layout, memory and cpu needed. . setup storage on the destination end to match the source storage. `lvs` will give the amount of disk space. Due to some vaguries on disk sizes, it is always better to round up so if the original server says it @@ -103,7 +92,9 @@ nc -l 11111 | dd of=/dev// ____ . On the source host: + +.... dd if=/dev// | nc desthost 11111 +.... + Wait for the copy to finish. You can do the following to track how far something has gone by finding the dd pid and then sending a 'kill -USR1' @@ -123,6 +114,6 @@ values are correct: + .... volgroup: /dev/vg_guests -vmhost: virthost??.phx2.fedoraproject.org +vmhost: virthost??.iad2.fedoraproject.org .... -. Run the noc.yml ansible playbook to update nagios. +. Run the `noc.yml` ansible playbook to update nagios.