search for: guestfs_umount

Displaying 20 results from an estimated 27 matches for "guestfs_umount".

Did you mean: guestfs_mount
2009 Aug 13
1
[PATCH] Enable device name translation for umount /dev
OK, I believe this is the cause of the 3 related failures on CentOS / RHEL. Calls to guestfs_umount ("/dev/...") didn't have the device path being rewritten. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones New in Fedora 11: Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 70 libraries supprt'...
2013 Jan 24
0
Libguestfs with Perl 6 :-)
...guestfs_launch(OpaquePointer $handle) returns Int is native('libguestfs') {} sub guestfs_mount(OpaquePointer $handle, Str $path, Str $target) returns Int is native('libguestfs') {} sub guestfs_touch(OpaquePointer $handle, Str $path) returns Int is native('libguestfs') {} sub guestfs_umount(OpaquePointer $handle, Str $path) returns Int is native('libguestfs') {} sub guestfs_shutdown(OpaquePointer $handle) returns Int is native('libguestfs') {} sub guestfs_close(OpaquePointer $handle) returns Int is native('libguestfs') {} say "Creating handle"; my $...
2018 Jan 23
1
[PATCH] lib: docs: State that guestfs_list_filesystems is no longer requires to be used soon after launch when nothing is mounted
...ore.ml b/generator/actions_core.ml index ed8cb16..9a695c0 100644 --- a/generator/actions_core.ml +++ b/generator/actions_core.ml @@ -9674,7 +9674,8 @@ content of the device is undetermined or empty. This command runs other libguestfs commands, which might include C<guestfs_mount> and C<guestfs_umount>, and therefore you should -use this soon after launch and only when nothing is mounted. +use this soon after launch and only when nothing is mounted +(it is no longer a requirement since 1.37). Not all of the filesystems returned will be mountable. In particular, swap partitions are return...
2015 Feb 09
2
Re: getting guestfs_rsync_out to work
...o use rsync. We know which files will change. For example even if we do this (error checking removed): while (1) { guestfs_mount_options(g, "sync", "/dev/sda2", "/"); printf("%s\n", guestfs_cat(g, "/HostShared/temp.txt")); guestfs_umount(g, "/"); guestfs_fsync(g); usleep(1000*1000); } temp.txt from the Win7 guest is copied correctly the first time, but afterwards any change we make to it (e.g. using Win7 Notepad) is never seen. That's the issue. Is there any way at all to accomplish this using libg...
2015 Feb 09
2
Re: getting guestfs_rsync_out to work
...s (error checking >> removed): >> >> while (1) { >> >> guestfs_mount_options(g, "sync", "/dev/sda2", "/"); >> >> printf("%s\n", guestfs_cat(g, "/HostShared/temp.txt")); >> >> guestfs_umount(g, "/"); >> >> guestfs_fsync(g); >> >> usleep(1000*1000); >> } >> >> temp.txt from the Win7 guest is copied correctly the first time, but >> afterwards any change we make to it (e.g. using Win7 Notepad) is >> never seen....
2018 Apr 05
5
[nbdkit PATCH 0/3] Test zero callback of python plugin
I'm planning on tweaking the language callbacks to support fua; first up is the python bindings. I want to move from: def zero(h, count, offset, may_trim): to a nicer: def zero(h, count, offset, may_trim=False, fua=False): where the C code passes keywords for the flags (we can add new flags as needed), perhaps by using introspection to learn whether the plugin has a mandatory may_trim
2018 Apr 05
0
[nbdkit PATCH 2/3] tests: Add coverage of zero in language bindings
...tests/test-lang-plugins.c b/tests/test-lang-plugins.c index b695aaf..17e757b 100644 --- a/tests/test-lang-plugins.c +++ b/tests/test-lang-plugins.c @@ -122,6 +122,13 @@ main (int argc, char *argv[]) exit (EXIT_FAILURE); #endif + /* Run fallocate(1) on the device to test zero path. */ + if (guestfs_umount (g, "/") == 01) + exit (EXIT_FAILURE); + const char *cmd[] = { "fallocate", "-nzl", "64k", "/dev/sda", NULL }; + char *s = guestfs_debug (g, "sh", (char **) cmd); + free (s); + if (guestfs_shutdown (g) == -1) exit (EXIT_FAILU...
2015 Feb 09
1
Re: getting guestfs_rsync_out to work
...;ll experience approximately the same > overhead. Ok got it. Thanks again for your reply. We tried guestfs_drop_caches() as follows: while(1) { guestfs_mount(g, "/dev/sda2", "/"); printf("%s\n", guestfs_cat(g, "/HostShared/temp.txt")); guestfs_umount(g, "/"); guestfs_drop_caches(g, 3); usleep(1000*1000); } and still we cannot see changes made to temp.txt (from inside the Win7 guest VM) while this loop continues to run on the host Linux. We still have to re-launch the image to see changes. In general, it would be great...
2015 Feb 09
0
Re: getting guestfs_rsync_out to work
...hange. For example even if we do this (error checking removed): > > while (1) { > > guestfs_mount_options(g, "sync", "/dev/sda2", "/"); > > printf("%s\n", guestfs_cat(g, "/HostShared/temp.txt")); > > guestfs_umount(g, "/"); > > guestfs_fsync(g); > > usleep(1000*1000); > } > > temp.txt from the Win7 guest is copied correctly the first time, but > afterwards any change we make to it (e.g. using Win7 Notepad) is > never seen. That's the issue. This is c...
2015 Feb 10
1
host Linux - guest Win7 fast file sharing [was: getting guestfs_rsync_out to work]
...u'll experience approximately the same overhead. Ok got it. Thanks again for your reply. We tried guestfs_drop_caches() as follows: while(1) { guestfs_mount(g, "/dev/sda2", "/"); printf("%s\n", guestfs_cat(g, "/HostShared/temp.txt")); guestfs_umount(g, "/"); guestfs_drop_caches(g, 3); usleep(1000*1000); } and still we cannot see changes made to temp.txt (from inside the Win7 guest VM) while this loop continues to run on the host Linux. We still have to re-launch the image to see changes. In general, it would be great if...
2015 May 26
6
[PATCH 0/6] Update the way that API versions are generated for the man page.
The existing mechanism was clunky, slow and used ~ 10 MB of local disk. Rich.
2015 Feb 08
1
Re: getting guestfs_rsync_out to work
Richard- >>> Per this page >>> >>> https://rwmj.wordpress.com/2013/04/22/using-rsync-with-libguestfs/ >>> >>> We are trying to get the libguestfs API guestfs_rsync_out to work. We’ve tried combinations similar to: >>> >>> guestfs_rsync_out(g, “/HostShared”, “rsync://root@10.0.1.90:2999/backup/ -av”, -1) >>> >>>
2017 Jul 14
0
[PATCH 19/27] daemon: Reimplement ‘list_filesystems’ API in the daemon, in OCaml.
...C<guestfs_mount>. - -The value can have the special value \"unknown\", meaning the -content of the device is undetermined or empty. -\"swap\" means a Linux swap partition. - -This command runs other libguestfs commands, which might include -C<guestfs_mount> and C<guestfs_umount>, and therefore you should -use this soon after launch and only when nothing is mounted. - -Not all of the filesystems returned will be mountable. In -particular, swap partitions are returned in the list. Also -this command does not check that each filesystem -found is valid and mountable, and...
2018 Aug 20
1
[PATCH nbdkit] tests: Add a root only test of the file plugin with
In libguestfs we have a few tests that require root privileges and they are skipped by default (normally you should not build or test as root), but you can do this to run them: sudo make check-root In nbdkit I wanted to check that the file plugin works with block devices (this is not tested), and the only way I can sensibly think to do this is using a loopback device and root. This commit
2012 Jul 03
8
[PATCH 0/7 v2] Fix and workaround for qcow2 issues in qemu causing data corruption.
https://bugzilla.redhat.com/show_bug.cgi?id=836710 https://bugzilla.redhat.com/show_bug.cgi?id=836913 There are at least two related bugs going on: (1) Linux sync(2) system call doesn't send a write barrier to the disk, so in effect it doesn't force the hard disk to flush its cache. libguestfs used sync(2) to force changes to disk. We didn't expect that qemu was caching anything
2018 Nov 14
5
[PATCH nbdkit v3 0/4] build: Replace ./nbdkit with a C program.
v1 was here: https://www.redhat.com/archives/libguestfs/2018-November/msg00147.html v2 was here: https://www.redhat.com/archives/libguestfs/2018-November/msg00152.html v3: - Use optarg != NULL as a sentinel for has_arg. - Moved some variable decls into the inner loop. - Make nbdkit wrapper depend on config.status, so if srcdir or builddir changes then we rebuild the wrapper. It
2016 Apr 04
0
[PATCH 2/2] Use 'error' function for fprintf followed by exit.
...if (err != EROFS) { - fprintf (stderr, - "guestfs_touch: expected errno == EROFS, but got %d\n", err); - exit (EXIT_FAILURE); - } + if (err != EROFS) + error (EXIT_FAILURE, 0, + "guestfs_touch: expected errno == EROFS, but got %d", err); if (guestfs_umount (g, "/") == -1) exit (EXIT_FAILURE); @@ -85,35 +80,27 @@ main (int argc, char *argv[]) exit (EXIT_FAILURE); stat = guestfs_lstat (g, "/nosuchfile"); - if (stat != NULL) { - fprintf (stderr, - "guestfs_lstat: expected error for missing file\n&q...
2017 Jun 05
19
[PATCH v3 00/19] Allow APIs to be implemented in OCaml.
v2 was here: https://www.redhat.com/archives/libguestfs/2017-June/msg00008.html This series gets as far as a working (and faster) reimplementation of ‘guestfs_list_filesystems’. I also have another patch series on top of this one which reimplements the inspection APIs inside the daemon, but that needs a bit more work still, since inspection turns out to be a very large piece of code. Rich.
2017 Jul 27
23
[PATCH v3 00/23] Reimplement many daemon APIs in OCaml.
I think this fixes everything mentioned: - Added the Optgroups module as suggested. - Remove command temporary files. - Replace command ~flags with ?fold_stdout_on_stderr. - Nest _with_mounted function. - Rebase & retest. Rich.
2017 Jul 21
27
[PATCH v2 00/23] Reimplement many daemon APIs in OCaml.
v1 was posted here: https://www.redhat.com/archives/libguestfs/2017-July/msg00098.html This series now depends on two small patches which I posted separately: https://www.redhat.com/archives/libguestfs/2017-July/msg00207.html https://www.redhat.com/archives/libguestfs/2017-July/msg00209.html v1 -> v2: - Previously changes to generator/daemon.ml were made incrementally through the patch