summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* New internal APIs: internal-test-set-output, internal-test-close-output.Richard W.M. Jones2012-08-152-0/+7
| | | | | | | | These internal (testing) APIs allow the bindtests output to be sent to some other place than stdout. This is necessary for Erlang, since stdout is used to communicate with the Erlang interpreter.
* Convert release notes to a POD file / man page.Richard W.M. Jones2012-08-111-1/+1
| | | | | Note that we add the text version to git so that it's available for people to read without requiring any special tools.
* New APIs: rsync, rsync-in, rsync-outRichard W.M. Jones2012-08-111-1/+1
| | | | Implement rsync.
* Document problems copying long filenames from NTFS to Linux filesystems ↵Richard W.M. Jones2012-08-031-0/+22
| | | | (RHBZ#845488).
* grep: Add optargs to grep API and deprecate fgrep etc.Richard W.M. Jones2012-08-021-3/+10
| | | | | | | | This commit makes grep into an optargs API, with flags for extended, fixed, [case-]insensitive and compressed. At the same time it deprecates: egrep, fgrep, grepi, egrepi, fgrepi, zgrep, zegrep, zfgrep, zgrepi, zegrepi and zfgrepi.
* xfs: add new api xfs-growfsWanlong Gao2012-08-021-1/+1
| | | | | | New api xfs_growfs for expanding a XFS filesystem. Signed-off-by: Wanlong Gao <[email protected]>
* Revert "appliance: Add '-drive detect-zero=on' flag if qemu supports it."Richard W.M. Jones2012-08-011-2/+1
| | | | This reverts commit fe2253088ff51b51e2586f27a9408a38655170e3.
* New API: utsnameRichard W.M. Jones2012-07-301-1/+1
| | | | | | | | | | Typical output: ><fs> utsname uts_sysname: Linux uts_release: 3.5.0-1.fc18.x86_64 uts_version: #1 SMP Mon Jul 23 17:43:39 UTC 2012 uts_machine: x86_64
* appliance: Add '-drive detect-zero=on' flag if qemu supports it.Richard W.M. Jones2012-07-261-1/+2
| | | | | | | NB: The patch to implement this feature in qemu is not upstream, and may never make it upstream. However this is so useful for virt-sparsify that I decided to add this to libguestfs while we see what qemu decides to do.
* New APIs: pvchange-uuid, pvchange-uuid-all, vgchange-uuid, vgchange-uuid-all.Richard W.M. Jones2012-07-251-1/+1
| | | | | | | | These APIs will allow sysprep to change the UUIDs of all PVs and VGs in the system. LVs don't have UUIDs AFAICT, or at least there seems to be no way to change them if they do have them.
* Mac OS X: Use u_int64_t/uint64_t instead of unsigned hyper in .x fileMasami HIRATA2012-07-241-2/+11
| | | | | | | Signed-off-by: Masami HIRATA <[email protected]> RWMJ: Fixed whitespace in generator_xdr.ml
* lib: Use <sys/socket.h> and <sys/un.h> for sockaddr_unMasami HIRATA2012-07-242-0/+4
| | | | Signed-off-by: Masami HIRATA <[email protected]>
* Mac OS X: #define UNIX_PATH_MAX 104Masami HIRATA2012-07-241-0/+4
| | | | | | See http://developer.apple.com/library/mac/documentation/Darwin/Reference/Manpages/man4/unix.4.html Signed-off-by: Masami HIRATA <[email protected]>
* Mac OS X: Added check of #include <endian.h>Masami HIRATA2012-07-247-0/+21
| | | | | | Mac OS X doesn't have endian.h Signed-off-by: Masami HIRATA <[email protected]>
* launch: libvirt: Suppress printing of libvirt errors to stderr and other ↵Richard W.M. Jones2012-07-241-4/+19
| | | | cleanups.
* launch: libvirt: Use SELinux-mandated directory for sockets (RHBZ#842307).Richard W.M. Jones2012-07-241-31/+147
| | | | | | Note this does not yet enable sVirt confinement of the appliance. That requires at least that SELinux policy goes upstream, plus there may still be bugs.
* launch: libvirt: Move free to end of function.Richard W.M. Jones2012-07-241-11/+6
| | | | This is just code motion.
* launch: libvirt: Add is_blk utility.Richard W.M. Jones2012-07-241-6/+12
| | | | This is just code motion.
* launch: libvirt: Set <emulator> in libvirt XML if g->qemu is not the default.Richard W.M. Jones2012-07-241-0/+9
|
* lib: Initialize libvirt and libxml2 once when the library loads.Richard W.M. Jones2012-07-232-11/+36
|
* launch: Make get-pid and max-disks APIs into virtual methods of the current ↵Richard W.M. Jones2012-07-234-29/+73
| | | | attach-method.
* tests: Move debug-drives testing API to launch.c and change the output.Richard W.M. Jones2012-07-232-21/+31
| | | | It should work with any attach-method.
* launch: libvirt: Use <driver name="qemu" type=[format] />.Richard W.M. Jones2012-07-231-3/+99
| | | | | | | | We were using format= which was bogus and libvirt was ignoring it and forcing raw format instead. Also in its default configuration libvirt won't do disk format autodetection at all, so we must do it instead.
* launch: libvirt: You can't set O_CLOEXEC flag using fcntl + F_SETFL.Richard W.M. Jones2012-07-231-1/+1
| | | | | | | And in any case there is no point, since proto.c already sets the SOCK_CLOEXEC flag (using accept4) on this socket. The code now matches the code in launch-appliance.c.
* launch: libvirt: Use accept4 to set socket flags correctly.Richard W.M. Jones2012-07-231-5/+1
|
* launch: libvirt: Add <on_reboot>destroy</on_reboot> to libvirt XML.Richard W.M. Jones2012-07-231-0/+17
| | | | | This causes libvirt to add the qemu -no-reboot option, which reflects existing behaviour.
* launch: Allow default attach-method to be set in environment or configure.Richard W.M. Jones2012-07-232-6/+40
| | | | | | | | | | You can now choose the default attach method in two ways: (1) Set the LIBGUESTFS_ATTACH_METHOD environment variable. (2) ./configure --with-default-attach-method=appliance|libvirt|... Note that (1) overrides (2).
* launch: libvirt: Move remaining to-do items to TODO file.Richard W.M. Jones2012-07-231-18/+0
|
* launch: libvirt: Add a hack to detect if KVM is available.Richard W.M. Jones2012-07-231-1/+5
| | | | | | | | We need to select the <domain type=...> attribute depending on whether KVM is detected in the libvirt capabilities. This is a hack because it doesn't try to parse the libvirt capabilities XML.
* launch: libvirt: Use <cpu model="host-model"/> (thanks Dan Berrange).Richard W.M. Jones2012-07-231-0/+6
| | | | | This ensures maximum performance of the appliance, particularly for things like MD where the guest needs to use optimal SSE instructions.
* launch: libvirt: Change disk XML according to whether host path is device or ↵Richard W.M. Jones2012-07-231-10/+39
| | | | file (thanks Dan Berrange).
* launch: libvirt: Use "guestfs-" prefix on random names (thanks Dan Berrange).Richard W.M. Jones2012-07-231-1/+1
|
* launch: libvirt: Enforce minimum version of libvirt 0.9.13.Richard W.M. Jones2012-07-231-0/+13
|
* launch: libvirt: Use snapshot=on instead of <readonly/>.Richard W.M. Jones2012-07-231-9/+33
| | | | | | | For compatibility with the appliance backend, devices added readonly are in fact added writable with snapshots on top. This is necessary because options like 'mount -o ro' usually require write access to the disk (eg. to replay journals).
* launch: Add libvirt backend.Richard W.M. Jones2012-07-224-2/+1061
| | | | | | | | | | | | Complete the attach-method libvirt backend. This backend uses libvirt to create a transient KVM domain to run the appliance. Note that this still will only work with local libvirt URIs since the <kernel>, <initrd> and appliance links in the libvirt XML refer to local files, and virtio serial only works locally (limitation of libvirt). Remote support will be added later.
* Add attach-method "libvirt" or "libvirt:<URI>".Richard W.M. Jones2012-07-214-1/+28
| | | | | With this commit, you can set the attach method to libvirt, but calling launch will give an error.
* launch: Make 'drive_name' into a common function.Richard W.M. Jones2012-07-212-5/+5
| | | | This is just code motion.
* appliance: Push appliance building lock into guestfs___build_appliance.Richard W.M. Jones2012-07-212-17/+27
| | | | | | | | | Since we will be calling guestfs___build_appliance from the libvirt code in future, there's no point having two places where we have to acquire the lock. Push the lock down into this function instead. Because "glthread/lock.h" includes <errno.h> we have to add this header to the file too.
* fuse:remove the unused macro when fuse is not availableWanlong Gao2012-07-211-1/+1
| | | | | | Just make gcc happy when fuse is not available. Signed-off-by: Wanlong Gao <[email protected]>
* launch: Abstract attach method operations.Richard W.M. Jones2012-07-206-111/+171
| | | | | | g->attach_ops points to a structure which contains the operations supported by each attach method backend (ie. appliance, unix, etc.).
* launch: Move the command line building code entirely into launch-appliance.c.Richard W.M. Jones2012-07-203-47/+19
| | | | | Although we still use the handle as convenient temporary storage.
* launch: Move guestfs_config API and build list of qemu parameters in handle.Richard W.M. Jones2012-07-205-32/+67
| | | | | | Move and rewrite guestfs_config so it accumulates a list of qemu parameters in the handle. These are added to the appliance at launch time (with attach method == unix:... you'll now get an error).
* launch: Move launch timing / messages code into launch.c.Richard W.M. Jones2012-07-204-77/+78
|
* lib: Use bool (from <stdbool.h>) for a few fields in the handle.Richard W.M. Jones2012-07-201-10/+12
|
* lib: Rearrange fields in guestfs handle.Richard W.M. Jones2012-07-201-39/+38
| | | | Arrange the fields more logically. This is just code motion.
* launch: Remove some dead code from the appliance method.Richard W.M. Jones2012-07-191-42/+0
|
* lib: Split launch.c into separate files.Richard W.M. Jones2012-07-195-1245/+1272
| | | | | | | | | | | | | | | | | | | | | | launch-appliance.c contains the code associated with the 'appliance' attach-method. Mostly. In fact there are a few APIs which don't fit so nicely: - config: deprecated API which fiddles with the qemu command line directly - max-disks: depends on the qemu implementation (virtio-scsi or not) - debug-drives: used for testing only launch-unix.c contains the code associated with 'unix:<path>'. launch.c is the common code for launching, along with a few other APIs such as guestfs_add_drive_opts. This commit also reduces the number of headers to just those which are required.
* Remove debug-cmdline API.Richard W.M. Jones2012-07-191-20/+0
| | | | | Note that debug* calls are not part of the stable API and can be removed or changed at any time.
* lib: Use safe_asprintf when constructing attach_method.Richard W.M. Jones2012-07-192-6/+2
| | | | Just a small code cleanup / simplification.
* build: Rename most C files that contain underscore with dash.Richard W.M. Jones2012-07-197-10/+10
| | | | | | | This is just code motion. Some files cannot be renamed. Notably rpcgen input and output files must not contain dash characters, else rpcgen breaks.
OSZAR »