search for: guestfs_set_memsize

Displaying 20 results from an estimated 25 matches for "guestfs_set_memsize".

Did you mean: guestfs_get_memsize
2018 May 23
2
Re: [PATCH] lib: Increase default memory assigned to the appliance.
On Wednesday, 16 May 2018 14:43:09 CEST Richard W.M. Jones wrote: > With recent Linux kernels, adding and partitioning 255 disks causes > the appliance to run out of memory. This causes a test failure in > tests/disks/test-255-disks.sh. This change gives the appliance enough > memory to complete the test. TBH raising the amount of memory only for those tests is the solution IMHO,
2018 May 16
3
[PATCH] tests: Increase appliance memory when testing 256+ disks.
Currently the tests fail on x86 with recent kernels: FAIL: test-255-disks.sh This confused me for a while because our other test program (utils/max-disks/max-disks.pl) reports that it should be possible to add 255 disks. Well it turns out that the default amount of appliance memory is sufficient if you're just adding disks, but if you try to add _and_ partition those disks there's
2014 Aug 07
3
[PATCH] rescue: fix sscanf placeholders for --smp and --memsize
Use %d to parse them as int (since the variables for them as int) instead of %u, even if they both need to be at least > 0. --smp was already checked to be >= 1 while --memsize not, so check that the specified memory size is not < 128 (which is semi-arbitrary, but enough as a minimum threshold). --- rescue/rescue.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
2018 May 16
0
[PATCH] tests: Increase appliance memory when testing 256+ disks.
...tfs_create (); if (g == NULL) @@ -158,6 +159,14 @@ main (int argc, char *argv[]) } ndisks = n; + /* Increase memory available to the appliance. On x86 the default + * is not enough to both detect and partition 256 disks. + */ + m = guestfs_get_memsize (g); + if (m == -1 || + guestfs_set_memsize (g, m * 20 / 5) == -1) + error (EXIT_FAILURE, 0, "get or set memsize failed"); + tmpdir = guestfs_get_cachedir (g); if (tmpdir == NULL) exit (EXIT_FAILURE); diff --git a/utils/max-disks/max-disks.pl b/utils/max-disks/max-disks.pl index f7fe5bca2..714357fbb 100755 --- a/utils...
2018 May 23
0
Re: [PATCH] lib: Increase default memory assigned to the appliance.
I wonder why not to set required amount of memory using guestfs_set_memsize or setting LIBGUESTFS_MEMSIZE environment variable just for this test? -- +380979184774 Mykola Ivanets ср, 23 трав. 2018 о 11:28 Pino Toscano <ptoscano@redhat.com> пише: > On Wednesday, 16 May 2018 14:43:09 CEST Richard W.M. Jones wrote: > > With recent Linux kernels, add...
2018 May 16
1
Re: [PATCH] tests: Increase appliance memory when testing 256+ disks.
...59,14 @@ main (int argc, char *argv[]) > } > ndisks = n; > > + /* Increase memory available to the appliance. On x86 the default > + * is not enough to both detect and partition 256 disks. > + */ > + m = guestfs_get_memsize (g); > + if (m == -1 || > + guestfs_set_memsize (g, m * 20 / 5) == -1) > + error (EXIT_FAILURE, 0, "get or set memsize failed"); > + > tmpdir = guestfs_get_cachedir (g); > if (tmpdir == NULL) > exit (EXIT_FAILURE); This is OK. > diff --git a/utils/max-disks/max-disks.pl b/utils/max-disks/max-disks.pl &...
2016 Jul 18
2
Re: [PATCH] mllib: Getopt: fix integer parsing
On Monday, 18 July 2016 09:38:43 CEST Richard W.M. Jones wrote: > On Mon, Jul 18, 2016 at 10:13:30AM +0200, Pino Toscano wrote: > > Since we are using gnulib already, make use of xstrtol to parse the > > integer arguments to avoid extra suffixes, etc. > > > > Fixes commit 0f7bf8f714898c606e5d5015fff5b7803dcd1aee. > > --- > > mllib/getopt-c.c | 34
2017 Jul 21
0
[PATCH v3 REPOST 5/5] threads: Add a test.
...err = guestfs_last_error (g); + if (!err || !STRPREFIX (err, "set_program: program: ")) { + fprintf (stderr, "invalid error message: %s\n", err ? err : "NULL"); + pthread_exit ((void *)-1); + } + + guestfs_push_error_handler (g, NULL, NULL); + guestfs_set_memsize (g, 1); /* deliberately cause an error */ + guestfs_pop_error_handler (g); + err = guestfs_last_error (g); + if (!err || strstr (err, "memsize") == NULL) { + fprintf (stderr, "invalid error message: %s\n", err ? err : "NULL"); + pthread_exit ((void *...
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.
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
2016 Jun 01
0
[PATCH v2] rescue: add --autosysroot option RHBZ#1183493
.../* These are really constants, but they have to be variables for the @@ -313,6 +378,11 @@ main (int argc, char *argv[]) } } + /* Now it's time to set suggestions. */ + if (autosysroot) { + use_suggestions (cmds); + } + /* Set other features. */ if (memsize > 0) if (guestfs_set_memsize (g, memsize) == -1) @@ -367,14 +437,34 @@ compare_keys_len (const void *p1, const void *p2) return strlen (key1) - strlen (key2); } +/* Use autodetected suggested filesystems */ +static void +use_suggestions (char **cmds) +{ + size_t i; + if (cmds == NULL) return; + read_only = 0; + + /*...
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
2016 Jun 09
2
Re: [PATCH v2] rescue: add --autosysroot option RHBZ#1183493
...for the > @@ -313,6 +378,11 @@ main (int argc, char *argv[]) > } > } > > + /* Now it's time to set suggestions. */ > + if (autosysroot) { > + use_suggestions (cmds); > + } > + > /* Set other features. */ > if (memsize > 0) > if (guestfs_set_memsize (g, memsize) == -1) > @@ -367,14 +437,34 @@ compare_keys_len (const void *p1, const void *p2) > return strlen (key1) - strlen (key2); > } > > +/* Use autodetected suggested filesystems */ > +static void > +use_suggestions (char **cmds) > +{ > + size_t i; > + if...
2016 Jun 16
0
Re: [PATCH v2] rescue: add --autosysroot option RHBZ#1183493
...char *argv[]) >> } >> } >> >> + /* Now it's time to set suggestions. */ >> + if (autosysroot) { >> + use_suggestions (cmds); >> + } >> + >> /* Set other features. */ >> if (memsize > 0) >> if (guestfs_set_memsize (g, memsize) == -1) >> @@ -367,14 +437,34 @@ compare_keys_len (const void *p1, const void *p2) >> return strlen (key1) - strlen (key2); >> } >> >> +/* Use autodetected suggested filesystems */ >> +static void >> +use_suggestions (char **cmds) >&...
2014 Oct 02
4
[PATCH 0/3] RFC: appliance flavours
Hi, this is a prototype of something I've around for some time. Basically it is about adding new appliances in addition to the main one currently used and kept up-to-date automatically: this way it is possible to create new appliances with extra packages, to be used in specific contexts (like virt-rescue, with more network/recovery tools) without filling the main appliance. It's still
2014 Jun 27
3
[PATCH WIP] Can't generate argv variant
Hi everyone, lately I've been getting familiar with library and working on slight re-layering of the library. It's about having locking layer in public API and tracing one layer below that (let's call it __t_ layer. I'm not very good at making up names, so this is temporary:) ). Then making sure that all generated public stuff call __t_ layer and all other internal stuff
2017 Mar 03
5
[PATCH WIP 0/5] Fix virt-rescue.
This set of patches fixes virt-rescue rather cleanly. In particular the problems with handling ^C are completely fixed. Work still to be done before this can go upstream: - Shutdown doesn't work properly if you exit the shell. At the moment to exit you must do 'reboot -f'. Future improvements: - An escape sequence and escape commands that could be handled by virt-rescue,
2017 Mar 03
5
[PATCH 0/5] Fix virt-rescue.
This fixes the main issues in virt-rescue and is usable. There are some enhancements which could be made (in follow up work): - An escape sequence and escape commands that could be handled by virt-rescue, eg. to shut down the appliance, mount or unmount filesystems. - `virt-rescue -i' could be implemented cleanly by performing the right API calls before handing control to the
2015 Jun 16
5
[PATCH threads v2 0/5] Add support for thread-safe handle.
Previous discussion here: https://www.redhat.com/archives/libguestfs/2015-June/thread.html#00048 v2: - Use a cleanup handler to release the lock. - Rebase to upstream. Note I have not fixed the problem(s) with error handling (patch 3).
2017 Jun 27
9
[PATCH v3 0/5] threads: Add support for thread-safe handle.
Previously posted in 2015: v1: https://www.redhat.com/archives/libguestfs/2015-June/msg00048.html v2: https://www.redhat.com/archives/libguestfs/2015-June/msg00118.html I have rebased and tidied up the patches, fixing a few spelling mistakes, but they are broadly the same as before. I also ran all the tests, which pass. As with the previous versions, this makes a change to the API, where you