KVM Gotchas: Difference between revisions

From I Will Fear No Evil
Jump to navigation Jump to search
(Created page with "====Common useful commands for KVM Guests==== KVM LVM error fixes: <pre> WARNING: PV /dev/sda5 in VG dns01-vg is using an old PV header, modify the VG to update. </pre> Fix: <pre> vgck --updatemetadata dns01-vg </pre> Category:Virtualization")
 
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
====Common useful commands for KVM Guests====
====Common useful commands for KVM Guests====


KVM LVM error fixes:
 
LVM error fixes:
* not exclusive for KVM, but since I have so many of these VM's thats where I see it a lot.
* commonly happens when do-release-upgrade is run, or when some updates happen to the lvm code.  My GUESS is that the metadata contains the lvm version in there somewhere and does not get updated.
* This fix is only for the metadata
 
<pre>
<pre>
   WARNING: PV /dev/sda5 in VG dns01-vg is using an old PV header, modify the VG to update.
   WARNING: PV /dev/sda5 in VG dns01-vg is using an old PV header, modify the VG to update.
Line 8: Line 13:
<pre>
<pre>
vgck --updatemetadata dns01-vg
vgck --updatemetadata dns01-vg
vgck --updatemetadata <VG Name from warning message>
</pre>
</pre>


== Create new Image ==
<pre>
qemu-img create -f qcow2 -o preallocation=metadata FILENAME.qcow2 XXXG
</pre>


[[Category:Virtualization]]
[[Category:Virtualization]]

Latest revision as of 14:06, 5 September 2023

Common useful commands for KVM Guests

LVM error fixes:

  • not exclusive for KVM, but since I have so many of these VM's thats where I see it a lot.
  • commonly happens when do-release-upgrade is run, or when some updates happen to the lvm code. My GUESS is that the metadata contains the lvm version in there somewhere and does not get updated.
  • This fix is only for the metadata
  WARNING: PV /dev/sda5 in VG dns01-vg is using an old PV header, modify the VG to update.

Fix:

vgck --updatemetadata dns01-vg
vgck --updatemetadata <VG Name from warning message>

Create new Image

qemu-img create -f qcow2 -o preallocation=metadata FILENAME.qcow2 XXXG