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:tag2distrepo.adoc[Tag2DistRepo Infrastructure - SOP]
** xref:torrentrelease.adoc[Torrent Releases Infrastructure - SOP] ** xref:torrentrelease.adoc[Torrent Releases Infrastructure - SOP]
** xref:unbound.adoc[Fedora Infra Unbound Notes - 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:virtio.adoc[virtio - SOP in review ]
** xref:virt-notes.adoc[virt-notes - SOP in review ] ** xref:virt-notes.adoc[virt-notes - SOP in review ]
** xref:voting.adoc[voting - 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. virtual machine without that machine running.
[arabic] [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. 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. file to make it work.
. Forensics work of some sort. . Forensics work of some sort.
@ -27,8 +23,8 @@ follow their instructions completely.
+ +
____ ____
[upperalpha] [upperalpha]
.. Log into batcave01.phx2.fedoraproject.org .. Log into _batcave01.iad2.fedoraproject.org_
.. search for the hostname in the file /var/log/virthost-lists.out: .. search for the hostname in the file `/var/log/virthost-lists.out`:
+ +
.... ....
$ grep proxy01.phx2.fedoraproject.org /var/log/virthost-lists.out $ grep proxy01.phx2.fedoraproject.org /var/log/virthost-lists.out
@ -45,28 +41,32 @@ hosts more directly:
done done
.... ....
____ ____
. Log into the virtual server and make sure the image is shutdown. Even . 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 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 have a running qemu on the physical server. It is best to confirm that
the box is dead. the box is dead.
+ +
____ ....
# virsh destroy <hostname> # virsh destroy <hostname>
____ ....
. We will be using the kpartx command to make the guest image ready for . We will be using the kpartx command to make the guest image ready for
mounting. mounting.
+ +
____ ....
# lvs | grep <hostname> # kpartx -l /dev/mapper/<volume>-<hostname> # # lvs | grep <hostname>
kpartx -a /dev/mapper/<volume>-<hostname> # vgscan # vgchange -ay # kpartx -l /dev/mapper/<volume>-<hostname>
/dev/mapper/<new volume-name> # mount /dev/mapper/<partition we want> # kpartx -a /dev/mapper/<volume>-<hostname>
/mnt # vgscan
____ # vgchange -ay /dev/mapper/<new volume-name>
# mount /dev/mapper/<partition we want> /mnt
....
. Edit the files as needed. . Edit the files as needed.
. Tear down the tree. . Tear down the tree.
+ +
____ ....
# umount /mnt:: # umount /mnt
# vgchange -an <volume-name> # vgscan # kpartx -d # vgchange -an <volume-name>
/dev/mapper/<volume>-<hostname> # vgscan
____ # kpartx -d /dev/mapper/<volume>-<hostname>
....