Review virt-notes SOP

Signed-off-by: Michal Konečný <mkonecny@redhat.com>
This commit is contained in:
Michal Konečný 2021-09-10 16:14:35 +02:00
parent 1e736faf50
commit a149ef47b0
2 changed files with 21 additions and 30 deletions

View file

@ -110,7 +110,7 @@
** xref:unbound.adoc[Fedora Infra Unbound Notes - SOP] ** xref:unbound.adoc[Fedora Infra Unbound Notes - SOP]
** xref:virt-image.adoc[Fedora Infrastructure Kpartx Notes - SOP] ** xref:virt-image.adoc[Fedora Infrastructure Kpartx Notes - SOP]
** xref:virtio.adoc[Virtio 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:voting.adoc[voting - SOP in review ]
** xref:waiverdb.adoc[waiverdb - SOP in review ] ** xref:waiverdb.adoc[waiverdb - SOP in review ]
** xref:wcidff.adoc[wcidff - SOP in review ] ** xref:wcidff.adoc[wcidff - SOP in review ]

View file

@ -1,24 +1,17 @@
= Fedora Infrastructure Libvirt Notes = 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: . Setup an unpassworded root ssh key to allow communication between
[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 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 is not a big deal. Right now, this also means modifying the
`/etc/ssh/sshd_config` to `permitroot without-password`. `/etc/ssh/sshd_config` to `permitroot without-password`.
. Determine whatever changes need to be made to the guest. This can be . 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 the number of cpus, the amount of memory, or the disk location as this
may not be standard on the current server. may not be standard on the current server.
. {blank} . Make a dump of the current virtual guest using the virsh
+
Make a dump of the current virtual guest using the virsh::
command. Use `virsh dumpxml --migratable guestname` and then edit any command. Use `virsh dumpxml --migratable guestname` and then edit any
changes in disk layout, memory and cpu needed. changes in disk layout, memory and cpu needed.
. setup storage on the destination end to match the source storage. . setup storage on the destination end to match the source storage.
@ -67,18 +60,14 @@ you will need to use a more direct movement.
. Schedule outage time if any. This will need to be long enough to copy . 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. the data from one host to another, so will depend on guest disk size.
. Turn off monitoring in nagios . Turn off monitoring in nagios
. {blank} . setup an unpassworded root ssh key to allow communication between
+
setup an unpassworded root ssh key to allow communication between::
the two virthosts as root. This is only temporary, so, while scary it 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 is not a big deal. Right now, this also means modifying the
`/etc/ssh/sshd_config` to `permitroot without-password`. `/etc/ssh/sshd_config` to `permitroot without-password`.
. Determine whatever changes need to be made to the guest. This can be . 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 the number of cpus, the amount of memory, or the disk location as this
may not be standard on the current server. may not be standard on the current server.
. {blank} . Make a dump of the current virtual guest using the virsh
+
Make a dump of the current virtual guest using the virsh::
command. Use `virsh dumpxml --migratable guestname` and then edit any command. Use `virsh dumpxml --migratable guestname` and then edit any
changes in disk layout, memory and cpu needed. changes in disk layout, memory and cpu needed.
. setup storage on the destination end to match the source storage. . setup storage on the destination end to match the source storage.
@ -103,7 +92,9 @@ nc -l 11111 | dd of=/dev/<guest_vg>/<guest-partition>
____ ____
. On the source host: . On the source host:
+ +
....
dd if=/dev/<guest_vg>/<guest-partition> | nc desthost 11111 dd if=/dev/<guest_vg>/<guest-partition> | nc desthost 11111
....
+ +
Wait for the copy to finish. You can do the following to track how far 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' 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 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.