Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have tried to mount a virtual disk image on my Fedora host using the command

qemu-nbd -c /dev/ndb0 rawhide.img

and then detecting the LVM logical volumes and mounting the one I wanted. Obviously, the virtual machine is not running - I'm not stupid. However, because I have found this to be unreliable (nbd dies after a while), and also slow, I have decided to just copy the filesystem into a subdirectory of my home directory:

cp -a /mnt/rawhide .

However, I can't even get nbd to stay alive long enough to do the copy! It just died after less than one minute!

I can't use the fast offset= technique (at least, not as stated) from this page because the filesystem is inside LVM on the virtual disk image. I think there was some utility to calculate the offset for you, but I can't remember what it was called, or whether it works with LVM?

share|improve this question
    
I've filed a bug report. –  Robin Green Jan 29 '12 at 14:48

1 Answer 1

up vote 0 down vote accepted

Use guestfish instead:

$ mkdir rawhide
$ sudo guestfish -i rawhide.img

Welcome to guestfish, the libguestfs filesystem interactive shell for
editing virtual machine filesystems.

Type: 'help' for help on commands
      'man' to read the manual
      'quit' to quit the shell

Operating system: Fedora release 17 (Rawhide)
/dev/vg/lv_root mounted on /
/dev/vda2 mounted on /boot
><fs> glob copy-out /* rawhide

Warning: That actually misses out the hidden files contained in /, but I don't really care about them for my purposes.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.