summaryrefslogtreecommitdiffstats
path: root/perl/lib
Commit message (Collapse)AuthorAgeFilesLines
* Lib.pm: unknown filesystem /dev/hd{x} (cdrom) (RHBZ#666577)Douglas Schilling Landgraf2011-01-021-1/+3
| | | | | | | | | | | | | This a purpose patch to avoid the message "unknown filesystem /dev/hdc". Where /dev/hdc is an entry in fstab for CDROM. Example of fstab: /dev/hdc /media/cdrom auto pamconsole,exec,noauto,managed 0 0 https://bugzilla.redhat.com/show_bug.cgi?id=666577 Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
* Lib.pm: unknown filesystem label SWAP-sda2 (RHBZ#666578)Douglas Schilling Landgraf2011-01-021-1/+1
| | | | | | | | | | | | | | Hi, This is a purpose patch to avoid the message: unknown filesystem label SWAP-sda2. Instead of validate the label with 'eq', use '=~' and /$label/i. https://bugzilla.redhat.com/show_bug.cgi?id=666578 Thanks Douglas
* Lib.pm: avoid message "unknown filesystem /dev/fd0" (RHBZ#666577)Douglas Schilling Landgraf2011-01-021-0/+1
| | | | | | | | | | This patch to avoid the message "unknown filesystem /dev/fd0". https://bugzilla.redhat.com/show_bug.cgi?id=666577 Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Thanks Douglas
* Sys::Guestfs::Lib: deprecate get_partitions (RHBZ#642933).Richard W.M. Jones2010-10-281-10/+3
| | | | | However the code is left since this function is used by virt-v2v amongst others.
* Sys::Guestfs::Lib: deprecate inspection functions (RHBZ#642930).Richard W.M. Jones2010-10-281-390/+29
| | | | | | | | Deprecate the guest inspection functions in this module, remove documentation, and point users at the core API functions instead. However we will keep the code here since it is used by virt-v2v and virt-inspector.
* tools: Specify format of disks (RHBZ#642934,CVE-2010-3851).Richard W.M. Jones2010-10-221-24/+37
| | | | | | | | | | Sys::Guestfs::Lib is changed in two ways: firstly we take the format string from libvirt and pass it to add_drive_opts. Secondly we allow an extra format => parameter to open_guest which allows the format to be specified for disk images. All the tools are changed to add an extra --format parameter allowing the format to be specified for direct disk images.
* New API: file-architectureRichard Jones2010-08-171-144/+3
| | | | | | This change simply converts the existing Perl-only function file_architecture into a core API call. The core API call is written in C and available in all languages and from guestfish.
* perl: Check all images are defined in first param of open_guest.Richard Jones2010-06-111-0/+7
|
* Rely on new augeas lens for modules.conf and conf.modulesMatthew Booth2010-05-271-7/+0
| | | | | | | | | | | | | | | Latest augeas includes a lens for /etc/modules.conf. If this new lens is present, the code to force the Modprobe lens to try to match /etc/modules.conf as well results in /etc/modules.conf not being parsed at all. This results in modprobe_aliases in virt-inspector output being empty. This change is equivalent to change cfd28d1140393667913689b7b9bcf21c8bfe592c from virt-v2v. An effect of this change is that the Modules_conf augeas lens is now required for correct operation on guests which use /etc/modules.conf. Fixes RHBZ#596776
* Improved error if virt-inspector cannot find OSes in image (RHBZ#591142).Richard Jones2010-05-131-2/+8
|
* Add version numbers to Perl modules (RHBZ#521674).Richard Jones2010-05-121-1/+8
| | | | | | | | | | Sys::Guestfs now contains a version number which reflects the ABI that we are compiled against, ie. '0.<MAX_PROC_NR>'. This has the beneficial side effect of causing an error if the user tries to mix versions of the Perl module and the XS code. Sys::Guestfs::Lib now contains a synthetic version number which will reflect future changes in that module.
* inspector: Support filesystem-on-image VMs (RHBZ#590167).Richard Jones2010-05-071-4/+15
| | | | | | $ virt-df /tmp/dbroot.img Filesystem 1K-blocks Used Available Use% /tmp/dbroot.img:/dev/vda 3096336 593628 2345424 20%
* Warn instead of dying if grub refers to non-existent kernelMatthew Booth2010-05-071-2/+8
|
* Don't die during inspection if rpm -qa or dpkg-query failsMatthew Booth2010-04-211-8/+20
| | | | | If a problem in the package database prevented package enumeration from working, inspection would die. This change makes it emit a warning and continue.
* Don't die during inspection if initrd doesn't existMatthew Booth2010-04-211-1/+1
| | | | | This fixes a problem where inspection would die if grub.conf referenced a non-existent initrd. Just return an empty initrd instead.
* Remove warning "No grub default" (RHBZ#580650).Richard Jones2010-04-081-3/+0
|
* Improved version of virt-win-reg, supporting exporting and merging.Richard Jones2010-03-301-2/+4
|
* inspector: Read information about Windows guests from the Registry.Richard Jones2010-03-081-86/+102
| | | | | | | | | | | | | | This commit changes substantially the way that we get information about Windows guests. We now use the Windows Registry to get information such as the version, product name and much else. This uses Win::Hivex (ie. the hivex library). 'reged' is no longer needed or used. As an incidental change, this also tries harder to search for %systemroot%, in the case when we cannot find boot.ini (ie. Windows Vista and more recent). This ensures we can get more detail from those versions of Windows.
* inspector: Add product_name field to output.Richard Jones2010-03-081-0/+10
| | | | | | This is a free text string containing the "product name" of the OS. It's mainly useful for Windows guests, and a forthcoming patch will get this field from the Windows Registry.
* inspector: Sort application names.Richard Jones2010-03-081-0/+2
| | | | This ensures the list of applications is stable.
* List application in Debian based vm imagesGuido Günther2010-02-241-0/+17
| | | | | | | | | | | | | Hi, attached patch adds the code to list applications installed in Debian based vm images. Cheers, -- Guido >From 9427a14725b33415058a0713923c62bd231504ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org> Date: Tue, 23 Feb 2010 21:05:02 +0100 Subject: [PATCH 2/2] Add application listing for Debian
* Debian package formatGuido Günther2010-02-241-2/+2
| | | | | | | | | | | | Hi, Minor nitpick: the Debian folks usually refer to deb as the package format not dpkg. Cheers, -- Guido >From 7a9665d40e0a3109833de10f17831ae06fc8885a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org> Date: Tue, 23 Feb 2010 21:04:37 +0100 Subject: [PATCH 1/2] Debina package format is called 'deb' not 'dpkg'
* check for grub/menu.lst tooGuido Günther2010-02-241-2/+8
| | | | | | | | | | | | | | | | | On Tue, Feb 23, 2010 at 08:07:14PM +0100, Guido Günther wrote: > On Tue, Feb 23, 2010 at 07:52:43PM +0100, Guido Günther wrote: > > Hi, > > attached patch makes virt-inspector find the kernels on Debian systems. > > Since there is no /etc/grub.conf it falls back to > > $grubpartition/grub/menu.lst. > Patch got somehow broken. New version fortchcoming. Sorry for the noise. Attached now. No idea where the 'if' went in the first version ;) -- Guido >From d30b4946f017ff8bde9d4ff62f93c418a707d9e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org> Date: Tue, 23 Feb 2010 19:50:40 +0100 Subject: [PATCH] Check for grub/menu.lst if /etc/grub.conf can't be found
* Sys::Guestfs::Lib::open_guest: Add interface parameter.Richard Jones2010-02-121-2/+15
| | | | This allows you to override the default QEMU block device emulation.
* Sys::Guestfs::Lib::open_guest: Remove freeform parameters.Richard Jones2010-02-121-6/+9
| | | | | | | | | Remove the ability to pass freeform parameters to Sys::Virt->new. We don't use it, it makes the code more complex to modify, and indeed there are no other args that Sys::Virt->new supports so this would never be used. Also change $readwrite to $rw to match parameter name.
* Use mount-options instead of mount to avoid implicit -o sync.Richard Jones2010-02-101-1/+1
| | | | | | | | | | | | | | | guestfs_mount adds -o sync implicitly. This causes a very large performance problem for write-intensive programs (eg. virt-v2v). Document this as a "gotcha". Change the tests, guestfish, Sys::Guestfs::Lib, guestmount to use mount-options instead. (Note that this gotcha does not affect mount-ro). The source of the performance problem was first identified by Matthew Booth.
* inspector: Make RPM application data more specific (RHBZ#552718).Richard Jones2010-01-051-1/+1
| | | | | | | List applications with epoch, release and arch data. If epoch is 0, don't store this as an empty string, but as undefined, and don't output empty <epoch/> element in the XML.
* perl: Add Sys::Guestfs::Lib::feature_availableRichard Jones2009-11-201-3/+29
| | | | | | | This is a nicer Perl wrapper around $g->available call. Update the other code in Sys::Guestfs::Lib to use it before using LVM, Augeas.
* Modify Sys::Guestfs::Lib::resolve_windows_path to use case_sensitive_path.Richard Jones2009-10-261-29/+3
|
* inspector: Canonicalize device names (fix RHBZ#526717).Richard Jones2009-10-011-1/+11
| | | | | Make filesystem device names canonical, so they are /dev/sd* instead of /dev/vd*.
* Remove guestfs_wait_ready (turn it into a no-op).Richard Jones2009-09-211-1/+1
| | | | | | | | | | | | | | This commit changes guestfs_launch so that it both launches the appliance and waits until it is ready (ie. the daemon communicates back to us). Since we removed the pretence that we could implement a low-level asynchronous API, the need to call launch() followed by wait_ready() has looked a bit silly. Now guestfs_wait_ready() is basically a no-op. It is left in the API for backwards compatibility. Any calls to guestfs_wait_ready() can be removed from client code.
* Cleanup initialisation of hash entries in Lib.pmMatthew Booth2009-08-191-13/+4
|
* Export inspect_linux_kernel in Lib.pmMatthew Booth2009-08-191-13/+25
|
* Add boot/grub_fs to outputMatthew Booth2009-08-191-1/+7
| | | | | If present, this gives the mount point of the filesystem which contains grub. All entries in grub.conf will be relative to this filesystem.
* Don't assume grub is on a separate boot filesystemMatthew Booth2009-08-131-2/+54
| | | | | | | | | | | Paths in grub.conf are relative to the filesystem containing it. grub parsing currently assumes that it is on /boot, and will fail if it isn't, for example because a guest only has a single partition. This patch makes grub parsing work harder to work out what grub paths are relative to. Firstly, it looks for a previous detected 'linux-grub' filesystem. If this isn't found, it tries to work out which filesystem contains /boot/grub/menu.lst and uses that.
* Convert all TABs-as-indentation to spaces.Jim Meyering2009-08-031-355/+355
| | | | | | | | | | | Do it by running this command: [exempted files are matched via .x-sc_TAB_in_indentation] git ls-files \ | pcregrep -vf .x-sc_TAB_in_indentation \ | xargs pcregrep -l '^ *\t' \ | xargs perl -MText::Tabs -ni -le \ '$m=/^( *\t[ \t]*)(.*)/; print $m ? expand($1) . $2 : $_'
* Cleanup whitespace warnings in Lib.pmMatthew Booth2009-08-031-4/+4
|
* Use grub entries to find Linux kernelsMatthew Booth2009-08-031-89/+252
| | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds grub parsing to Lib.pm. It adds the following structure to $os: {boot} ->{configs} ->[0] ->{title} = "Fedora (2.6.29.6-213.fc11.i686.PAE)" ->{kernel} = \kernel ->{cmdline} = "ro root=/dev/mapper/vg_mbooth-lv_root rhgb" ->{initrd} = \initrd ->{default} = 0 The kernel and initrd entries are just references to their top level entries under kernels and initrd_modules respectively. It also changes the way Linux kernels and initrd are discovered. Instead of searching /lib/modules and /boot for files with matching names, kernels and initrds are scanned as they are discovered in grub.conf. Additionally, the following attributes are added to the kernels top level entry: * path The path to the kernel's vmlinuz file. * package The name of the package which installed the kernel. The xml output of virt-inspector is updated to reflect all of the above changes.
* Update incorrect comment in Lib.pmMatthew Booth2009-07-311-10/+8
| | | | | Related: change the name of the function the comment describes to be more accurate.
* On RHEL 5, 'file' command prints 'AMD x86-64' for 'x86-64' arch.Richard W.M. Jones2009-07-291-0/+2
|
* Run cpio with --quiet option so it doesn't print 'xx blocks'Richard Jones2009-07-291-1/+1
|
* Lib.pm: Use Perl backtick instead of slurp (Aron Griffis).Richard Jones2009-07-291-3/+1
|
* inspector: Determine guest architecture.Richard Jones2009-07-291-3/+61
| | | | | | | This commit adds kernel and userspace architecture detection (fully for Linux, partially for Windows). It adds an architecture for each kernel detected, and an architecture for each root (ie. userspace) found.
* Lib.pm: Add file_architecture command.Richard Jones2009-07-291-2/+159
| | | | | This command detects the architecture of some types of binaries, libraries, kernel modules and initrd images.
* Lib: Document the $ro parameter for mount_operating_system properly.Richard Jones2009-07-291-4/+5
|
* Lib.pm: Use 'file' as replacement for 'zfile'.Richard Jones2009-07-281-4/+4
|
* Make read-only optional in mount_operating_system()Matthew Booth2009-07-241-2/+10
|
* Split $os->{version} into $os->{major_version} and $os->{minor_version}Matthew Booth2009-07-211-14/+36
|
* virt-inspector --fish: Fix incorrect '-a' parameter (RHBZ#512709)Richard Jones2009-07-201-6/+6
| | | | | | | | | | | | | | | | | virt-inspector --fish dom virt-inspector --ro-fish dom Both of the above commands give incorrect results if run on a libvirt domain, eg: $ virt-inspector --ro-fish RHEL54Betax64 ==> --ro -a RHEL54Betax64 -m /dev/VolGroup00/LogVol00:/ -m /dev/sda1:/boot ^^^^^^^^^^^^^ This is because the current code just prints back the original @ARGV parameters. This patch fixes this by getting the image names instead.
* Replace 'distrofamily' with feature tagsMatthew Booth2009-07-201-9/+30
| | | | | | | | | | | | | It turns out that the distribution hierarchy is not as reliable concept as you might think. This patch removes distrofamily again. Instead of distrofamily, we will add feature tags. This patch adds 2 feature tags for Linux distributions: package_format (eg rpm/dpkg) package_management (eg rhn/yum/apt) This change is reflected in the output of virt-inspector