3

How can I get read/write permissions to browse the guest filesystem from the host? (Presumably it's only safe when the guest is shutdown.)

Where is the default path, as below, for the guest filesystem?

This example from man virt-install:

EXAMPLES Install a Fedora 20 KVM guest with virtio accelerated disk/network, creating a new 10GiB qcow2 file, installing from media in the hosts CDROM drive. This will use Spice graphics by default, and launch autolaunch a graphical client.

     # virt-install \
          --connect qemu:///system \
          --virt-type kvm \
          --name demo \
          --memory 500 \
          --disk size=10 \
          --cdrom /dev/cdrom \
          --os-variant fedora13

storage options from the man file:

STORAGE OPTIONS --disk OPTIONS Specifies media to use as storage for the guest, with various options. The general format of a disk string is

           --disk opt1=val1,opt2=val2,...

       The simplest invocation to create a new 10G disk image and associated
       disk device:

           --disk size=10

2 Answers 2

1

How can I get read/write permissions to browse the guest filesystem from the host?

Virtual machine it's not a container. You have virtual disks (or something else e.g. lvm volumes) with its own disk structure and filesystems.

You can mount this disks to host OS but what for? You can do it with qemu-nbd or with other tools (with lvm).

Where is the default path, as below, for the guest filesystem?

There is no default path for guest's filesystem, but there is default path to virtual disks files. Virtual disks will be created in default location that you can type (and you must if it does not exist) with virsh like below:

virsh pool-define-as --name guest_images --type dir --target /var/guest_images

Where /var/guest_images it's default location

1

What you are looking for is libguestfs and guestfish.

http://libguestfs.org/

This is an older blog post, but good starting point: Modifying QCOW Images with Guestfish

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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