[Libguestfs] Integration with muCommander

Nikolay Ivanets stenavin at gmail.com
Sat Nov 24 19:36:31 UTC 2018

> Well, I don't need any information about the operating system itself but ideally, when browsing the disk image the user sees the file system(s) as if the user would have connected (e.g., via ssh) to the guest. So let's say that I browse a disk image with two partitions, the root that is mounted to "/" and another one that is mounted to "/boot". I think it makes sense to show the content of the disk in a way that the second partition is mounted to "/boot", and it seems that this mapping is only returned by inspect-os, right?

Yes, that is right. You have to call inspect-os if you want to present
disk (or I would rather say VM) content in the way the user expect it
to be.

>> 1. User: selects disk image, double-click. You: launch libguestfs
>> instance, call list-filesystems and display them.
> Right, adding another level of file-systems is possible. The downside though is that I then stop seeing the directory-structure from the guest point of view, right?

Right. But I want to stress you again: you MUST to add ALL VM disks
(preferably in the same order) if you want to present file system from
the guest point of view. Otherwise you will be unable to present LVM,
MD and Windows LDM partitions. You also should be prepared that
guestfs might not be able to mount ALL found file systems and guestfs
might not be found all mappings. Even more: you will not get mappings
if guetsfs unable to detect OS or there are no OS at all on the
disk(s) you are browsing. And side question: are you ready to the
situation where inspect-os find more then one OS?

> Maybe it's not that bad if it significantely improves the responsiveness...

Anyway you need to prepared to display disk(s)/VM from guest(s) point
of view as well as simply browsing found file systems.

> But on the other hand, I do want to enable the user to browse a single disk image even if it was attached to the VM along with few others.
> What would be the risk in inspecting a single disk image in that case? shouldn't each disk image be a stand alone entity?

Imagine: I have two disks and I have create physical volumes (PV), and
volume group (VG) adding both PVs, and I've created logical volume
(LV), and finally any file system atop (e.g. XFS). Any attempt to
browse disks separately will not be successful. You must to add them
both to a guestfs before launching. The similar things happens with
soft array (MD) spread across multiple disks. I hope you've got an

And definitely I would not made an attempt to modify disks of live VM.

    Mykola Ivanets

More information about the Libguestfs mailing list