search for: set_memsize

Displaying 20 results from an estimated 68 matches for "set_memsize".

2015 Nov 10
0
[PATCH] customize, dib, resize, sysprep: Use 'may' pattern in various places.
...in.ml index e161e82..13d40bc 100644 --- a/customize/customize_main.ml +++ b/customize/customize_main.ml @@ -166,9 +166,8 @@ read the man page virt-customize(1). (* Connect to libguestfs. *) let g = let g = open_guestfs () in - - (match memsize with None -> () | Some memsize -> g#set_memsize memsize); - (match smp with None -> () | Some smp -> g#set_smp smp); + may g#set_memsize memsize; + may g#set_smp smp; g#set_network network; (* Make sure to turn SELinux off to avoid awkward interactions * between the appliance kernel and applications/libraries inter...
2017 Oct 08
0
[PATCH v2 3/4] common/mlstdutils: Introduce Option submodule.
...| 6 ++--- 17 files changed, 107 insertions(+), 99 deletions(-) diff --git a/builder/builder.ml b/builder/builder.ml index 8b4c20765..9b907ac8e 100644 --- a/builder/builder.ml +++ b/builder/builder.ml @@ -688,8 +688,8 @@ let main () = let g = let g = open_guestfs () in - may g#set_memsize cmdline.memsize; - may g#set_smp cmdline.smp; + Option.may g#set_memsize cmdline.memsize; + Option.may g#set_smp cmdline.smp; g#set_network cmdline.network; (* The output disk is being created, so use cache=unsafe here. *) @@ -781,6 +781,6 @@ let main () = Pervasives.flush P...
2015 Nov 10
1
[PATCH] OCaml tools: use open_guestfs everywhere
...so we can make changes. *) message (f_"Opening the new disk"); let g = - let g = new G.guestfs () in - if trace () then g#set_trace true; - if verbose () then g#set_verbose true; + let g = open_guestfs () in (match memsize with None -> () | Some memsize -> g#set_memsize memsize); (match smp with None -> () | Some smp -> g#set_smp smp); diff --git a/customize/customize_main.ml b/customize/customize_main.ml index 49d510c..e161e82 100644 --- a/customize/customize_main.ml +++ b/customize/customize_main.ml @@ -165,9 +165,7 @@ read the man page virt-customize...
2014 Jan 16
0
[PATCH 2/3] builder: add --list-format
...format arg = + list_format := match arg with + | "short" -> `Short + | "long" -> `Long + | fmt -> + eprintf (f_"%s: invalid --list-format type '%s', see the man page.\n") prog fmt; + exit 1 in let memsize = ref None in let set_memsize arg = memsize := Some arg in @@ -256,7 +263,9 @@ let parse_cmdline () = "--link", Arg.String add_link, "target:link.." ^ " " ^ s_"Create symbolic links"; "-l", Arg.Unit list_mode, " " ^ s_"List availab...
2020 Sep 18
1
Re: [PATCH v2v] v2v: Set the number of vCPUs to same as host number of pCPUs.
On Friday, 18 September 2020 11:44:04 CEST Richard W.M. Jones wrote: > let g = open_guestfs ~identifier:"v2v" () in > g#set_memsize (g#get_memsize () * 14 / 5); > + (* Setting the number of vCPUs allows parallel mkinitrd. *) > + g#set_smp (Sysconf.nr_processors_online ()); IMHO this is not a good idea, for few reasons: a) it unconditionally uses all the available CPUs with no way to change it to any other value b) vi...
2015 Feb 26
1
[PATCH] builder: handle -v and -x flags like in other tools (RHBZ#1196100)
...608,7 +609,8 @@ let main () = msg (f_"Opening the new disk"); let g = let g = new G.guestfs () in - if verbose then g#set_trace true; + if trace then g#set_trace true; + if verbose then g#set_verbose true; (match memsize with None -> () | Some memsize -> g#set_memsize memsize); (match smp with None -> () | Some smp -> g#set_smp smp); -- 2.1.0
2014 Jan 16
5
[PATCH 0/3] Add JSON output for virt-builder
Hi, This small patch serie adds a JSON output for virt-builder. This way it is possible to parse the list of available templates, with no need to parse the unstructured and possibly changing short and long outputs of virt-builder. Pino Toscano (3): builder: small refactor of the list output builder: add --list-format builder: add a JSON output for --list builder/builder.ml
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
2012 Feb 23
1
[PATCH v2] Add a flag to make some functions called only at CONFIG state(RHBZ796520)
...[Bool "autosync"], []), -1, [FishAlias "autosync"; ConfigOnly], [], "set autosync mode", "\ @@ -373,7 +373,7 @@ only useful for printing debug and internal error messages. For more information on states, see L<guestfs(3)>."); - ("set_memsize", (RErr, [Int "memsize"], []), -1, [FishAlias "memsize"], + ("set_memsize", (RErr, [Int "memsize"], []), -1, [FishAlias "memsize"; ConfigOnly], [InitNone, Always, TestOutputInt ( [["set_memsize"; "500"];...
2017 Feb 01
2
[PATCH] v2v: Further increase memory allocated to the appliance (RHBZ#1418283).
...ml | 2 +- v2v/virt-v2v.pod | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/v2v/v2v.ml b/v2v/v2v.ml index e85e96f..a711121 100644 --- a/v2v/v2v.ml +++ b/v2v/v2v.ml @@ -75,7 +75,7 @@ let rec main () = ); let g = open_guestfs ~identifier:"v2v" () in - g#set_memsize (g#get_memsize () * 8 / 5); + g#set_memsize (g#get_memsize () * 20 / 5); (* The network is only used by the unconfigure_vmware () function. *) g#set_network true; (match conversion_mode with diff --git a/v2v/virt-v2v.pod b/v2v/virt-v2v.pod index 4614888..88bfd7f 100644 --- a/v2v/virt-v2v....
2020 Sep 18
4
[PATCH v2v] v2v: Set the number of vCPUs to same as host number of pCPUs.
So it didn't make any noticable difference in my test. I wonder if the test guest I'm using (Fedora 32 using dracut) doesn't use parallel compression? However I don't think it can cause a problem and it seems obvious that it could benefit some cases. Rich.
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
2016 Feb 12
2
[PATCH] python: tests: use more targeted assert*() functions/checks
...00-explicit-close.py +++ b/python/t/800-explicit-close.py @@ -37,11 +37,7 @@ class Test800ExplicitClose (unittest.TestCase): # Expect an exception if we call a method on a closed handle. g = guestfs.GuestFS (python_return_dict=True) g.close () - try: - g.set_memsize (512) - raise Exception("expected an exception from previous statement") - except guestfs.ClosedHandle: - pass + self.assertRaises (guestfs.ClosedHandle, g.set_memsize, 512) del g # Verify that the handle is really being closed by g....
2020 Sep 16
2
Re: virt-v2v: Virtio-Scsi patch
...> looking forward also to the SMP changes. The SMP 'change' is quite stupid atm :) diff --git a/v2v/v2v.ml b/v2v/v2v.ml index 73edff2c..271e2b03 100644 --- a/v2v/v2v.ml +++ b/v2v/v2v.ml @@ -88,6 +88,7 @@ let rec main () =    let g = open_guestfs ~identifier:"v2v" () in    g#set_memsize (g#get_memsize () * 14 / 5); +  g#set_smp 4;    (* The network is only used by the unconfigure_vmware () function. *)    g#set_network true;    (match conversion_mode with No commandline flag or so (for now). > > - - - > > I think this patch as it stands has two problems: > >...
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(-)
2015 Aug 31
2
[PATCH 1/2] mllib: add and use set_standard_options
...t;List short options"; - "--long-options", Arg.Unit display_long_options, " " ^ s_"List long options"; "--machine-readable", Arg.Set machine_readable, " " ^ s_"Make output machine readable"; "-m", Arg.Int set_memsize, "mb" ^ " " ^ s_"Set memory size"; "--memsize", Arg.Int set_memsize, "mb" ^ " " ^ s_"Set memory size"; @@ -143,26 +141,12 @@ let parse_cmdline () = "--smp", Arg.Int set_smp, "vcp...
2016 Jun 27
0
Re: [PATCH] RFC: OCaml tools: add and use a Getopt module
..."short|long|json" ^ " " ^ s_"Set the format for --list (default: short)"; > - "--machine-readable", Arg.Set machine_readable, " " ^ s_"Make output machine readable"; > - "-m", Arg.Int set_memsize, "mb" ^ " " ^ s_"Set memory size"; > - "--memsize", Arg.Int set_memsize, "mb" ^ " " ^ s_"Set memory size"; > - "--network", Arg.Set network, " " ^ s_"Enable appliance net...
2015 Nov 10
7
[PATCH 0/4]: mllib: Add 'may' function, and refactoring.
The 'may' function is a higher-order function (HOF) that replaces: match x with | None -> () | Some x -> f x with: may f x The idea comes from lablgtk (OCaml Gtk bindings) where it is widely used. If this change is clearer than previous code, then this could be used in many more places. However I previously steered clear from using HOFs like this because they can be
2015 Nov 11
0
[PATCH] builder: Make the interface between cmdline.ml and builder.ml explicit.
...not output_is_block_dev) in + ref (cmdline.delete_on_failure && not output_is_block_dev) in let delete_file () = if !delete_output_file then try unlink output_filename with _ -> () @@ -626,9 +623,9 @@ let main () = let g = let g = open_guestfs () in - may g#set_memsize memsize; - may g#set_smp smp; - g#set_network network; + may g#set_memsize cmdline.memsize; + may g#set_smp cmdline.smp; + g#set_network cmdline.network; (* Make sure to turn SELinux off to avoid awkward interactions * between the appliance kernel and applications/librar...
2016 Jun 24
2
[PATCH] RFC: OCaml tools: add and use a Getopt module
..."short|long|json" ^ " " ^ s_"Set the format for --list (default: short)"; - "--machine-readable", Arg.Set machine_readable, " " ^ s_"Make output machine readable"; - "-m", Arg.Int set_memsize, "mb" ^ " " ^ s_"Set memory size"; - "--memsize", Arg.Int set_memsize, "mb" ^ " " ^ s_"Set memory size"; - "--network", Arg.Set network, " " ^ s_"Enable appliance network (defa...