virtio is enabled by default in libguestfs?
by Yufang Zhang
Hi all,
Could I ask if and from which version that virtio is enabled by default in libguestfs? It seems that it is enabled by default in fedora-12, on which the latest version of libguestfs is 1.0.85. But for fedora-11(the latest version of libguestfs is 1.0.72), I could enable virtio only when I set it explicitly via config command. Thus it is not enabled by default on fedora-11. So I'd like to know on which situation virtio will be enabled automatically by libguestfs? Thanks.
--Yufang
14 years, 7 months
[PATCH 1/2] Try to load the loop module before running mkinitrd
by Matthew Booth
mkinitrd needs to mount files using loop. loop might be a module, so try to load
it first.
---
lib/Sys/VirtV2V/GuestOS/RedHat.pm | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/lib/Sys/VirtV2V/GuestOS/RedHat.pm b/lib/Sys/VirtV2V/GuestOS/RedHat.pm
index 0e469f5..08027b6 100644
--- a/lib/Sys/VirtV2V/GuestOS/RedHat.pm
+++ b/lib/Sys/VirtV2V/GuestOS/RedHat.pm
@@ -1114,6 +1114,13 @@ sub prepare_bootable
$g->modprobe("ext2");
};
+ # loop is a module in RHEL 5. Try to load it. Doesn't matter for other
+ # OSs if it doesn't exist, but RHEL 5 will complain:
+ # All of your loopback devices are in use.
+ eval {
+ $g->modprobe("loop");
+ };
+
$g->command(["/sbin/mkinitrd", @preload_args, $initrd, $version]);
}
--
1.6.6.1
14 years, 7 months
[PATCH] Whitelist the loop kernel module
by Matthew Booth
loop is sometimes a module, for example on RHEL 5.
---
appliance/kmod.whitelist.in | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/appliance/kmod.whitelist.in b/appliance/kmod.whitelist.in
index 814b9d0..96fc4c3 100644
--- a/appliance/kmod.whitelist.in
+++ b/appliance/kmod.whitelist.in
@@ -62,3 +62,5 @@ reiserfs.ko
crc*.ko
libcrc*.ko
+
+loop.ko
--
1.6.6.1
14 years, 7 months
RFE: reuse of the libguestfs daemon + host API in a externally managed VM
by Daniel P. Berrange
The libvirt-TCK is a integration test suite we are using to validate the
correct operation of libvirt drivers. Currently it is just checking the
basic operation & functionality of drivers from the host side. we just
boot a random Fedora kernel + initrd since we don't actually care that
the guest OS boots into any particular state, we only care that its
running in some form.
We would like to extend our tests, to include validation of changes inside
the guest. For example, in the TCK test case for CDROM media change, we
want to be able to validate that the guest OS can actually see the new
media. Or in disk hotplug we want to validate that the new PCI device
appeared in the guest. etc etc. This requires that we have a real guest
OS image running + some form of channel to get data out of the guest OS.
To me it looks like the libguestfs appliance image / guest daemon would
fit our needs just fine. On the host side, the libguestfs Perl bindings
also fit the bill nicely.
The only issue is that the guest VM can't be under libguestfs' control.
The libvirt TCK test cases need to spawn / control the guest in whatever
config it needs.
My thought is that anytime the libvirt TCK needs a guest OS it can talk
to, it can simply configure its VM to point at the libguestfs appliance
image. Then tell the libguestfs API to attach to this pre-running VM via
whatever chardev channel libvirt configured.
IIUC, this could be a change such that instead of:
guestfs_launch(h);
the app could do:
guestfs_attach(h, "/var/run/libvirt-tck/virtio-serial-guestfs.sock");
But perhaps also allow query of the expected kernel/initrd, so apps
don't have to hardcode those location
vmlinuz = guestfs_appliance_kernel(h);
initrd = guestfs_appliance_initrd(h);
Regards,
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
14 years, 7 months
[PATCH 1/2] Don't die during inspection if initrd doesn't exist
by Matthew Booth
This fixes a problem where inspection would die if grub.conf referenced a
non-existent initrd. Just return an empty initrd instead.
---
perl/lib/Sys/Guestfs/Lib.pm | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/perl/lib/Sys/Guestfs/Lib.pm b/perl/lib/Sys/Guestfs/Lib.pm
index 5428b10..b5b3906 100644
--- a/perl/lib/Sys/Guestfs/Lib.pm
+++ b/perl/lib/Sys/Guestfs/Lib.pm
@@ -1825,7 +1825,7 @@ sub _inspect_initrd
# Disregard old-style compressed ext2 files and only work with real
# compressed cpio files, since cpio takes ages to (fail to) process anything
# else.
- if ($g->file ($path) =~ /cpio/) {
+ if ($g->exists($path) && $g->file($path) =~ /cpio/) {
eval {
@modules = $g->initrd_list ($path);
};
--
1.6.6.1
14 years, 7 months
libguestfs mounting solaris 10 ZFS guest
by John Larson
Not sure if this possible, but I have a KVM guest running Solaris 10
with the OS on ZFS and I am trying to use
libguestfs/guestfish/guestmount to get to the VM. I am running Red Hat
EL 5.4 with EPEL rpms as required.
The VM is on a LV and it boots fine, but I can't seem to get the syntax
correct to get libguestfs to deal with it. Guestmount seemed like the
best option because it supports FUSE modules. I have fuse installed and
zfs-fuse and I can create ZFS filesystems on the physical host machine.
Just really not sure how to make libguestfs deal with it. I have tried
mounting the pool and the underlying virtual disk device with no success.
# guestmount -o modules=zfs -a /dev/kvmVG00/sol10u6 -m
newpool/ROOT/s10up-08 --ro /mnt
libguestfs: error: mount_options: mount_options_stub:
newpool/ROOT/s10up-08: expecting a device name
# guestmount -o modules=zfs -a /dev/kvmVG00/sol10u6 -m /dev/dsk/c0d0s0
--ro /mnt
libguestfs: error: mount_options: mount_options_stub: /dev/dsk/c0d0s0:
No such file or directory
# guestmount -o modules=zfs -a /dev/kvmVG00/sol10u6 -m /dev/dsk/c0t0d0s0
--ro /mnt
libguestfs: error: mount_options: mount_options_stub: /dev/dsk/c0t0d0s0:
No such file or directory
# rpm -qa | grep fuse
zfs-fuse-0.6.0-6.el5
fuse-2.7.4-8.el5
fuse-libs-2.7.4-8.el5
# rpm -qa | grep guest
libguestfs-1.0.85-1.el5.9
guestfish-1.0.85-1.el5.9
perl-libguestfs-1.0.85-1.el5.9
libguestfs-tools-1.0.85-1.el5.9
libguestfs-mount-1.0.85-1.el5.9
libguestfs-devel-1.0.85-1.el5.9
Any help MUCH appreciated.
John L
14 years, 7 months
Error when compile libguestfs from source in Fedora-12
by Yufang Zhang
Hi all,
I am trying to compile libguestfs from source in Fedora12, but failed
with such error:
cp: cannot stat `initramfs/fakeroot.log': No such file or directory
make[2]: *** [../initramfs/fakeroot.log] Error 1
make[2]: Leaving directory `/home/yufang/Code/libguestfs/appliance'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/yufang/Code/libguestfs'
make: *** [all] Error 2
I have installed all required packages listed in
http://cvs.fedoraproject.org/viewvc/devel/libguestfs/libguestfs.spec?view...
but still cannot find the reason. Could anybody do me a favour to have
a look at this issue?
config.log and output of make(make.log) are uploaded in the attachment
to track problems.
Thanks.
--Yufang
14 years, 7 months
Re: [Libguestfs] guestfish ... [SEC=UNCLASSIFIED]
by Richard W.M. Jones
On Mon, Apr 19, 2010 at 10:17:07PM +0800, Wilkinson, Alex wrote:
> The aforementioned article says that libguestfs supports VMware's
> VMDKs.
This is partly true. We rely on qemu's support for VMDK which is
rather sketchy. In particular, qemu cannot handle some VMDKs from ESX
4.0. However ...
> So if these VMDKs live on a vmfs on an ESX server, what do
> you recomend as the best approach to access them via libguestfs ?
> Would it be best to mount the vmfs over nfs (i.e. to a linux box
> that supports libguestfs) ?
Best thing is to access the flat disk image, which ESX [all versions]
makes available to you as a pseudo-file called <vm>-flat.vmdk.
Despite the ".vmdk" extension, it's really just a raw disk image which
libguestfs or any other program will have no problems with.
I can't quite remember now if this is supported from NFS, but it's
definitely supported if you ssh into the ESX storage (or use sshfs).
Don't try to edit files if the virtual machine is running. Since
there is no way for libguestfs to know if a remote VMWare VM is
running, this is doubly important when modifying VMWare images.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
New in Fedora 11: Fedora Windows cross-compiler. Compile Windows
programs, test, and build Windows installers. Over 70 libraries supprt'd
http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw
14 years, 7 months
Should umask takes effect when we create device file via mknod?
by Yufang Zhang
Hi all,
Currently, umask takes effect when we create device file via mknod, as
bellow commands show:
><fs> mknod-b 0760 8 1 /dev/sdf
><fs> ll /dev/sdf
brwxr----- 1 root root 8, 1 Apr 15 11:10 /sysroot/dev/sdf
But I wonder whether it is reasonable? For mknod(1), when we use option
-m mode, we set file permission bits to MODE, not a=rw - umask. Should
this also be applicable to mknod in guestfish, thus when we create
device file with mode set, umask doesn't take effect?
14 years, 7 months