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

[Libguestfs] [PATCH 0/3] RFC: Allow use of external QEMU process with libguestfs

This attempts to implement the idea proposed in


The idea is that an externally managed QEMU (manual, or via libvirt)
can boot the appliance kernel/initrd. libguestfs can then be just told
of the UNIX domain socket associated with the guest daemon.

An example based on guestfish.

 1. Step one, find the appliance kernel/initrd (building the supermin
    appliance image if neccessary)

   ><fs> find-appliance 
   ><fs> get-kernel 
   ><fs> get-initrd 

 2. Boot a QEMU instance with this info

      -drive file=/dev/HostVG/f11i386,cache=off,if=virtio 
      -enable-kvm -nodefaults -nographic 
      -serial file:/tmp/guest/boot.log -monitor stdio 
      -m 500 -no-reboot 
      -chardev socket,id=guestfsvmc,path=/tmp/guest/sock,server,nowait 
      -net user,vlan=0,net=,guestfwd=tcp:
      -net nic,model=virtio,vlan=0 
      -append 'panic=1 console=ttyS0 udevtimeout=300 noapic acpi=off printk.time=1 cgroup_disable=memory selinux=0 guestfs_vmchannel=tcp:  TERM=xterm'
      -kernel /tmp/libguestfsqJB1iN/kernel
      -initrd /tmp/libguestfsqJB1iN/initrd

 3. Tell guestfish to connect to this instance

   ><fs> launch-method attach
   ><fs> sockpath /tmp/guest/sock
   ><fs> launch

The temporary kernel/initrd from 'find-appliance' will be
automatically deleted when the guestfs handle is closed.

Instead of using 'find-appliance' an app can manually invoke
the febootstrap-supermin-helper to build the initrd/kernel
but is a fragile coupling to libguestfs internals. Thus it is
preferable to let libguestfs locate & inform you of the kernl
and initrd

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