search for: guestfs_mount

Displaying 20 results from an estimated 57 matches for "guestfs_mount".

2010 Feb 09
1
[PATCH] Use mount-options instead of mount to avoid implicit -o sync.
...red_hat_and_fedora -------------- next part -------------- >From 3ec1380eb6425b4f73024200817bd6b192d3b0b0 Mon Sep 17 00:00:00 2001 From: Richard Jones <rjones at redhat.com> Date: Tue, 9 Feb 2010 18:00:24 +0000 Subject: [PATCH] Use mount-options instead of mount to avoid implicit -o sync. 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). T...
2013 Jan 24
0
Libguestfs with Perl 6 :-)
...ot;Defining stubs"; sub guestfs_create() returns OpaquePointer is native('libguestfs') {} sub guestfs_add_drive(OpaquePointer $handle, Str $path) returns Int is native('libguestfs') {} sub 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 gu...
2014 Dec 22
1
Re: does guestfs_list_partitions() work with Windows 95 images?
...itioned, ie. that what you've > got here is a straight filesystem. You could see if libguestfs can > mount it: > > guestfish --ro -a disk.img -m /dev/sda > ><fs> ll / > > That worked! Thanks for the help. Now I'm tweaking my old code and just replacing my guestfs_mount() call with a hard-coded "guestfs_mount(g, "/dev/sda",'/"); Next task is to review my registry changes and see if those registries even exist in Win95. What this code does is open the image, tweaks some registry settings to use some "generic" drivers and uploads...
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
...--git a/generator/actions_core.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...
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.
2017 Feb 09
3
Extract VHD using guestfs
Hi, I have tried to extract *.vhd* file using guestfs library. I am able to list all files inside my archive using *guestfs_ls* also * guestfs_list_filesystems()* retruns right File system information. I am trying to extract files from inside archive using *guestfs_copy_device_to_file() * but it returns following error (error: copy_device_to_file: unknown option 689330304 (this can happen if a
2016 Feb 26
1
Displaying mountables in the error output of guestfish etc
..." format, and shouldn't be displayed to end users for a couple of reasons: (1) It's not intended that people would "know about" these strings. You're only compliant with the API if you get a string from an API like guestfs_list_filesystems and pass it to another API like guestfs_mount. (2) These strings aren't actually useful, because you cannot pass them back to the guestfish/guestmount `-m' option. Instead you have to use the non-obvious form: -m /dev/sda1:/:subvol=/@/tmp How do we solve this? Trickier than it seems. The first attempt to Cédric tried was to cal...
2017 Jul 14
0
[PATCH 19/27] daemon: Reimplement ‘list_filesystems’ API in the daemon, in OCaml.
...ot; - \"/dev/sda2\" => \"ext2\" - \"/dev/vg_guest/lv_root\" => \"ext4\" - \"/dev/vg_guest/lv_swap\" => \"swap\" - -The key is not necessarily a block device. It may also be an opaque -‘mountable’ string which can be passed to 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>,...
2012 Nov 14
1
Notes on compiling libguestfs 1.19.59 on Debian 7 (Wheezy) beta
In no particular order. Some of these need further investigation. ---------------------------------------------------------------------- I had to patch libguestfs not to use febootstrap-supermin-helper --copy-kernel option. See attachment #1. This could be avoided by providing a newer febootstrap in Wheezy. I had to patch libguestfs to make it not use the (not working) virtio-scsi in old
2017 Jul 14
0
[PATCH 09/27] daemon: Reimplement ‘mount’, ‘mount_ro’, ‘mount_options’, ‘mount_vfs’ APIs in OCaml.
...ainString, "options"); String (Mountable, "mountable"); String (PlainString, "mountpoint")], []; + impl = OCaml "Mount.mount_options"; shortdesc = "mount a guest disk with mount options"; longdesc = "\ This is the same as the C<guestfs_mount> command, but it @@ -2954,6 +2957,7 @@ the filesystem uses)." }; { defaults with name = "mount_vfs"; added = (1, 0, 10); style = RErr, [String (PlainString, "options"); String (PlainString, "vfstype"); String (Mountable, "mountable"); Str...
2017 Feb 09
0
Re: Extract VHD using guestfs
...(this can happen if a program is compiled against a newer > version of libguestfs, then dynamically linked to an older version)). > Please see attached main.c for my sample code. I don't know about the above error, but the way you've used copy-device-to-file is clearly wrong: > guestfs_mount (g, "/dev/sda1", "/"); > > //guestfs_mount_local (g, "/home/mohsin/VHD/"); > guestfs_ls(g, "/"); > guestfs_copy_device_to_file(g, "/dev/sda1/file-to extract.exe", "/abc.exe"); It's actually not clear to me what...
2015 Feb 09
1
Re: getting guestfs_rsync_out to work
...he kernel to initialize itself. > Even if you use the User-mode Linux backend (which just runs vmlinux > as a userspace process) you'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 gue...
2011 Jun 16
1
Comment on libguestfs code in https://bitbucket.org/swamiyeswanth/pyti
...estfs.3.html#guestfs_add_drive_opts https://bugzilla.redhat.com/642934 (3) Instead of using 'mount', use 'mount_options'. The 'mount' call adds some flags to the mountpoint which are not very useful and also make disk writes very slow. http://libguestfs.org/guestfs.3.html#guestfs_mount http://libguestfs.org/guestfs.3.html#guestfs_mount_options http://libguestfs.org/guestfs.3.html#libguestfs_gotchas (4) After line 33 ('umount_all') you should also call 'self.disk_fs.sync()' which causes the libguestfs drive to be fully synced. Alternatively you can delete the han...
2017 Feb 13
2
Re: Extract VHD using guestfs
...gainst a > newer > > version of libguestfs, then dynamically linked to an older version)). > > Please see attached main.c for my sample code. > > I don't know about the above error, but the way you've used > copy-device-to-file is clearly wrong: > > > guestfs_mount (g, "/dev/sda1", "/"); > > > > //guestfs_mount_local (g, "/home/mohsin/VHD/"); > > guestfs_ls(g, "/"); > > guestfs_copy_device_to_file(g, "/dev/sda1/file-to extract.exe", > "/abc.exe"); >...
2016 Jun 09
2
Re: [PATCH v2] rescue: add --autosysroot option RHBZ#1183493
...ands might not be the best idea ever -- other than potentially running into issues such as quoting and escaping, the length of the boot command line of the Linux kernel is limited [1], and we are already using more than 200 characters. An alternative approach with the cmdline could be passing like guestfs_mount=/dev:/mntpoint:opts, which is slightly more complex to parse, although provide a more strict interface and requires no eval. [1] https://www.kernel.org/doc/Documentation/kernel-parameters.txt > On successfull run user is presented directly with bash in chroot > environment. I'd not do...
2014 Sep 23
0
[PATCH 02/13] syntax-check: fix error_message_period check
...diff --git a/src/fuse.c b/src/fuse.c index 08a8784..f7a6e71 100644 --- a/src/fuse.c +++ b/src/fuse.c @@ -1065,7 +1065,7 @@ guestfs__mount_local_run (guestfs_h *g) r = guestfs_exists (g, "/"); guestfs_pop_error_handler (g); if (r == -1) { - error (g, _("you must call 'guestfs_mount' first to mount a filesystem on '/'.\nNote: '%s' is still mounted. Use 'guestunmount %s' to clean up."), + error (g, _("you must call 'guestfs_mount' first to mount a filesystem on '/'.\nNote: '%s' is still mounted. Use 'guestun...
2009 Nov 20
1
fix new failures from latest-from-gnulib syntax-check
...te ())) exit (1); + if (!(g = guestfs_create ())) exit (EXIT_FAILURE); - if (guestfs_add_drive (g, argv[1]) == -1) exit (1); + if (guestfs_add_drive (g, argv[1]) == -1) exit (EXIT_FAILURE); - if (guestfs_launch (g) == -1) exit (1); + if (guestfs_launch (g) == -1) exit (EXIT_FAILURE); - if (guestfs_mount (g, argv[2], "/") == -1) exit (1); + if (guestfs_mount (g, argv[2], "/") == -1) exit (EXIT_FAILURE); - if (guestfs_touch (g, "/hello") == -1) exit (1); + if (guestfs_touch (g, "/hello") == -1) exit (EXIT_FAILURE); guestfs_sync (g); guestfs_close (g...
2015 Feb 10
1
host Linux - guest Win7 fast file sharing [was: getting guestfs_rsync_out to work]
...that long for the kernel to initialize itself. Even if you use the User-mode Linux backend (which just runs vmlinux as a userspace process) you'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...
2015 May 06
0
Re: libguestfs init problem
...titions\n"); > exit (EXIT_FAILURE); > } > > /* Create a filesystem on the partition. */ > if (guestfs_mkfs (g, "ext4", partitions[0]) == -1) > exit (EXIT_FAILURE); > > /* Now mount the filesystem so that we can add files. */ > if (guestfs_mount (g, partitions[0], "/") == -1) > exit (EXIT_FAILURE); > > /* Create some files and directories. */ > if (guestfs_touch (g, "/empty") == -1) > exit (EXIT_FAILURE); > const char *message = "Hello, world\n"; > if (guestfs_write...
2015 Feb 09
2
Re: getting guestfs_rsync_out to work
...install a backup agent in the >> > Windows guest and use a regular network backup. >> >> We don't need to 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(...