Review virt-image SOP

Signed-off-by: Michal Konečný <mkonecny@redhat.com>
This commit is contained in:
Michal Konečný 2021-09-10 16:06:32 +02:00
parent fbaf1f2cd0
commit 6401d95ca1
2 changed files with 22 additions and 22 deletions

View file

@ -108,7 +108,7 @@
** xref:tag2distrepo.adoc[Tag2DistRepo Infrastructure - SOP]
** xref:torrentrelease.adoc[Torrent Releases Infrastructure - SOP]
** xref:unbound.adoc[Fedora Infra Unbound Notes - SOP]
** xref:virt-image.adoc[virt-image - SOP in review ]
** xref:virt-image.adoc[Fedora Infrastructure Kpartx Notes - SOP]
** xref:virtio.adoc[virtio - SOP in review ]
** xref:virt-notes.adoc[virt-notes - SOP in review ]
** xref:voting.adoc[voting - SOP in review ]

View file

@ -6,13 +6,9 @@ There can be multiple reasons you need to work with the contents of a
virtual machine without that machine running.
[arabic]
. {blank}
+
You have decommisioned the system and found you need to get something::
. You have decommisioned the system and found you need to get something
that was not backed up.
. {blank}
+
The system is for some reason unbootable and you need to change some::
. The system is for some reason unbootable and you need to change some
file to make it work.
. Forensics work of some sort.
@ -27,8 +23,8 @@ follow their instructions completely.
+
____
[upperalpha]
.. Log into batcave01.phx2.fedoraproject.org
.. search for the hostname in the file /var/log/virthost-lists.out:
.. Log into _batcave01.iad2.fedoraproject.org_
.. search for the hostname in the file `/var/log/virthost-lists.out`:
+
....
$ grep proxy01.phx2.fedoraproject.org /var/log/virthost-lists.out
@ -45,28 +41,32 @@ hosts more directly:
done
....
____
. Log into the virtual server and make sure the image is shutdown. Even
in cases where the system is not working correctly it may have still
have a running qemu on the physical server. It is best to confirm that
the box is dead.
+
____
....
# virsh destroy <hostname>
____
....
. We will be using the kpartx command to make the guest image ready for
mounting.
+
____
# lvs | grep <hostname> # kpartx -l /dev/mapper/<volume>-<hostname> #
kpartx -a /dev/mapper/<volume>-<hostname> # vgscan # vgchange -ay
/dev/mapper/<new volume-name> # mount /dev/mapper/<partition we want>
/mnt
____
....
# lvs | grep <hostname>
# kpartx -l /dev/mapper/<volume>-<hostname>
# kpartx -a /dev/mapper/<volume>-<hostname>
# vgscan
# vgchange -ay /dev/mapper/<new volume-name>
# mount /dev/mapper/<partition we want> /mnt
....
. Edit the files as needed.
. Tear down the tree.
+
____
# umount /mnt::
# vgchange -an <volume-name> # vgscan # kpartx -d
/dev/mapper/<volume>-<hostname>
____
....
# umount /mnt
# vgchange -an <volume-name>
# vgscan
# kpartx -d /dev/mapper/<volume>-<hostname>
....