Re: Access qcow2 vm file from host problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 5/15/25 9:27 AM, Robert McBroom via users wrote:

Have a Fc39 server qemu/kvm virtual machine. Trying to access the filesystem from the host machine.  The following commands---

:~# modprobe nbd max_part=8

:~# qemu-nbd --connect=/dev/nbd0 /var/lib/libvirt/images/Fed39.qcow2

:~# fdisk /dev/nbd0 -l
Disk /dev/nbd0: 60 GiB, 64424509440 bytes, 125829120 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 131072 bytes
Disklabel type: gpt
Disk identifier: 3B52A5A1-29BD-436B-8145-EEF27D9EFC97

Device        Start       End   Sectors Size Type
/dev/nbd0p1    2048      4095      2048   1M BIOS boot
/dev/nbd0p2    4096   2101247   2097152   1G Linux filesystem
/dev/nbd0p3 2101248 125827071 123725824  59G Linux LVM

:~# mount /dev/nbd0p3 /mnt/iso
mount: /mnt/iso: unknown filesystem type 'LVM2_member'.
      dmesg(1) may have more information after failed mount system call.

:~# vgscan
 Found volume group "fedora_hpz440" using metadata type lvm2
 WARNING: Couldn't find device with uuid IrbzRo-h3Fw-7s0X-3x1q-NONl-TE3b-iUeftd.
 WARNING: VG sysvg is missing PV IrbzRo-h3Fw-7s0X-3x1q-NONl-TE3b-iUeftd (last written to /dev/sdb).
 Found volume group "sysvg" using metadata type lvm2

The missing PV in sysvg  is a separate qcow2 file. Just need access to the first. Is there a way to access the group from the host?

Thanks Peter

Had a work around already. Was able to put a workstation live on the virtual machine and access the partitions freely from it to extend the volume group and the xfs filesystem.  Will keep your note in mind for future use.

-- 
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux