search for: guestfs_command

Displaying 20 results from an estimated 73 matches for "guestfs_command".

2016 Jun 01
2
[PATCH v2] rescue: add --autosysroot option RHBZ#1183493
--autosysroot option uses suggestions to user on how to mount filesystems and change root suggested by --suggest option in virt-rescue. Commands are passed on kernel command line in format guestfs_command=command;. Command ends with a semicolon and there can be multiple commands specified. These are executed just before bash starts. On successfull run user is presented directly with bash in chroot environment. Resolves RFE: RHBZ#1183493 Maros Zatko (1): rescue: add --autosysroot option RHBZ#1183...
2016 May 24
1
[PATCH] rescue: add --autosysroot option RHBZ#1183493
--autosysroot option uses suggestions to user on how to mount filesystems and change root suggested by --suggest option in virt-rescue. Commands are passed on kernel command line in format guestfs_command=command;. Command ends with a semicolon and there can be multiple commands specified. These are executed just before bash starts. On successfull run user is presented directly with bash in chroot environment. RFE: RHBZ#1183493 Depends on commit: utils: make guestfs_int_count_strings return 0 on NU...
2016 Jun 01
0
[PATCH v2] rescue: add --autosysroot option RHBZ#1183493
--autosysroot option uses suggestions to user on how to mount filesystems and change root suggested by --suggest option in virt-rescue. Commands are passed on kernel command line in format guestfs_command=command;. Command ends with a semicolon and there can be multiple commands specified. These are executed just before bash starts. On successfull run user is presented directly with bash in chroot environment. Resolves RFE: RHBZ#1183493 --- appliance/init | 5 ++ rescue/rescue.c | 169 +++++++++...
2016 Jun 09
2
Re: [PATCH v2] rescue: add --autosysroot option RHBZ#1183493
...oot option uses suggestions to user on how to mount filesystems > and change root suggested by --suggest option in virt-rescue. IMHO it should be called -i, like in the other tools, as what --autosysroot does is basically the same. > Commands are passed on kernel command line in format > guestfs_command=command;. Command ends with a semicolon and there can be > multiple commands specified. These are executed just before bash starts. Passing arbitrary commands might not be the best idea ever -- other than potentially running into issues such as quoting and escaping, the length of the boot comma...
2016 Jun 16
0
Re: [PATCH v2] rescue: add --autosysroot option RHBZ#1183493
...-suggest option in virt-rescue. > IMHO it should be called -i, like in the other tools, as what > --autosysroot does is basically the same. We can call it -i, I don't mind, I've implemented this as was in RFE. > >> Commands are passed on kernel command line in format >> guestfs_command=command;. Command ends with a semicolon and there can be >> multiple commands specified. These are executed just before bash starts. > Passing arbitrary commands might not be the best idea ever -- other than > potentially running into issues such as quoting and escaping, the length >...
2020 Aug 27
1
Re: Weird results from g.sh()
...; However, "g.command([self.mkconfig, '-o', self.config])" shouldn't > > have the appliances /sys available (I looked briefly in command.c and > > I don't see the same bind-mount code), or maybe I'm missing something. > > guestfs_sh, guestfs_sh_lines, guestfs_command, guestfs_command_lines > all attempt to bind-mount /sys and other directories into the chroot > while running the command. (See daemon/sh.c) > > Anyway I misunderstood before - I thought you were trying to run grub > to install the bootloader. Running grub2-mkconfig as done in virt...
2020 Aug 27
2
Re: Weird results from g.sh()
On Thu, Aug 27, 2020 at 11:08 AM Richard W.M. Jones <rjones@redhat.com> wrote: > > On Thu, Aug 27, 2020 at 10:50:12AM +0300, Sam Eiderman wrote: > > Hi, > > > > I'm using libguestfs 1.42, > > > > When I run the following python3 commands on a rhel7.8: > > > > print(g.ls('/sys')) > > [] > > This lists the files in /sys in
2020 Aug 27
0
Re: Weird results from g.sh()
...commands. > > However, "g.command([self.mkconfig, '-o', self.config])" shouldn't > have the appliances /sys available (I looked briefly in command.c and > I don't see the same bind-mount code), or maybe I'm missing something. guestfs_sh, guestfs_sh_lines, guestfs_command, guestfs_command_lines all attempt to bind-mount /sys and other directories into the chroot while running the command. (See daemon/sh.c) Anyway I misunderstood before - I thought you were trying to run grub to install the bootloader. Running grub2-mkconfig as done in virt-v2v should be fine sinc...
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.
2012 Dec 13
1
[PATCH] daemon: fix directory outside current root when executing commands
...* + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +/* This program, which must be statically linked, is used to test the + * guestfs_command and guestfs_command_lines functions. + */ + +#include <config.h> +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> + +int +main (int argc, char *argv[]) +{ + char *cwd = get_current_dir_name(); + printf("%s", cwd); + + exit (EXIT_SUCCESS); +} -- 1.7...
2009 Nov 19
2
Windows port of daemon?
...on Windows. So I'm creating this thread to discuss the issue. The reason to want a Windows appliance at all is twofold: (1) better support for NTFS filesystems and Windows-native filesystem features (attributes, volume management etc), and (2) so we can run Windows CMD.EXE commands using the guestfs_command/guestfs_run API. The alternate architecture seems like it would be something like this: +-----------------+ +-----------------+ | libguestfs.so | <--------> | guestfsd | | (library) | | (appliance) | +-----------------+ | Windows k...
2009 Aug 03
1
use gnulib, and begin to pass its "make syntax-check" tests
...examples/to-xml.c | 1 + ocaml/guestfs_c.c | 1 + 4 files changed, 4 insertions(+), 0 deletions(-) diff --git a/capitests/test-command.c b/capitests/test-command.c index 1e29ee9..d451ebe 100644 --- a/capitests/test-command.c +++ b/capitests/test-command.c @@ -20,6 +20,7 @@ * guestfs_command and guestfs_command_lines functions. */ +#include <config.h> #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/examples/hello.c b/examples/hello.c index a4cc43d..a8649f3 100644 --- a/examples/hello.c +++ b/examples/hello.c @@ -4,6 +4,7 @@ * he...
2017 Mar 31
6
[PATCH 0/3] Fix some quoting issues.
Fix some quoting issues by introducing Unicode quotes. Note this intentionally only affects end-user messages and documentation. Rich.
2017 May 04
4
[PATCH 0/3] generator: Allow returned strings to be annotated as devices.
If we want to permit more than 255 drives to be added, then we will have to add the disks to the same virtio-scsi target using different unit (LUN) numbers. Unfortunately SCSI LUN enumeration in the Linux is not deterministic (eg. two disks with target=0, lun=[0,1] can be enumerated as /dev/sda or /dev/sdb randomly). Dealing with that will require some very complex device name translation on the
2017 Feb 18
8
[PATCH 0/6] generator: Split up generator/actions.ml
Split up the huge generator/actions.ml into several smaller files. Rich.
2015 Oct 29
16
[PATCH 00/16] Refactoring of configure.ac and guestfs.pod
Two (not related to each other) refactorings: Patches 1-12 split configure.ac into smaller files using the m4_include mechanism. Patches 13-15 split out parts of guestfs.pod (ie. guestfs(3)) into three new manual pages: guestfs-hacking(3) - how to extend and contribute to libguestfs guestfs-internals(3) - architecture and internals guestfs-security(3) - security and CVEs Patch 16 is a
2017 Feb 21
1
[PATCH] generator: Put all the daemon procedure numbers (proc_nr)
This is a follow-up to the other generator changes in: https://www.redhat.com/archives/libguestfs/2017-February/msg00217.html Rich.
2015 Jun 14
2
[PATCH] pod: Use F<> for filenames instead of C<>.
...; }; @@ -5743,7 +5743,7 @@ L<ntfs-3g.probe(8)> manual page." }; shortdesc = "run a command via the shell"; longdesc = "\ This call runs a command from the guest filesystem via the -guest's C</bin/sh>. +guest's F</bin/sh>. This is like C<guestfs_command>, but passes the command to: @@ -5809,7 +5809,7 @@ with flags C<GLOB_MARK|GLOB_BRACE>. See that manual page for more details. Notice that there is no equivalent command for expanding a device -name (eg. C</dev/sd*>). Use C<guestfs_list_devices>, +name (eg. F</dev/sd*&...
2017 Apr 21
0
[PATCH 1/2] generator: Simplify the handling of string parameters.
...mmand"], []; + style = RString "output", [String (PlainString, "command")], []; shortdesc = "run a command via the shell"; longdesc = "\ This call runs a command from the guest filesystem via the @@ -3624,7 +3624,7 @@ All the provisos about C<guestfs_command> apply to this call." }; { defaults with name = "sh_lines"; added = (1, 0, 50); - style = RStringList "lines", [String "command"], []; + style = RStringList "lines", [String (PlainString, "command")], []; shortdesc = &qu...
2017 Apr 21
4
[PATCH 0/2] generator: Simplify the handling of string parameters.
Very large but mechanical change to the generator. Rich.