search for: 1024l

Displaying 20 results from an estimated 70 matches for "1024l".

Did you mean: 1024
2017 Oct 08
0
[PATCH v2 4/4] common/mltools: xpath_helpers: Get rid of xpath_*_default functions.
...main/@type" with @@ -92,7 +90,8 @@ let parse_libvirt_xml ?conn xml = | None | Some "" -> error (f_"in the libvirt XML metadata, <name> is missing or empty") | Some s -> s in - let memory = xpath_int64_default "/domain/memory/text()" (1024L *^ 1024L) in + let memory = + Option.default (1024L *^ 1024L) (xpath_int64 "/domain/memory/text()") in let memory = memory *^ 1024L in let cpu_vendor = xpath_string "/domain/cpu/vendor/text()" in @@ -317,7 +316,7 @@ let parse_libvirt_xml ?conn xml = (* Th...
2015 Oct 08
0
[PATCH] v2v: Add xpath_int64 functions, and use them to read memory values.
...virt_xml ?conn xml = | None | Some "" -> error (f_"in the libvirt XML metadata, <name> is missing or empty") | Some s -> s in - let memory = xpath_int_default "/domain/memory/text()" (1024 * 1024) in - let memory = Int64.of_int memory *^ 1024L in + let memory = xpath_int64_default "/domain/memory/text()" (1024L *^ 1024L) in + let memory = memory *^ 1024L in let vcpu = xpath_int_default "/domain/vcpu/text()" 1 in let features = diff --git a/v2v/input_ova.ml b/v2v/input_ova.ml index a758e94..cd26160 100644 ---...
2017 Mar 16
2
[PATCH v2] v2v: -i libvirt: If <vcpu> is missing, calculate it from CPU topology.
...t xpathctx + (*and xpath_int_default = xpath_int_default xpathctx*) and xpath_int64_default = xpath_int64_default xpathctx in let hypervisor = @@ -65,7 +65,6 @@ let parse_libvirt_xml ?conn xml = | Some s -> s in let memory = xpath_int64_default "/domain/memory/text()" (1024L *^ 1024L) in let memory = memory *^ 1024L in - let vcpu = xpath_int_default "/domain/vcpu/text()" 1 in let cpu_vendor = xpath_string "/domain/cpu/vendor/text()" in let cpu_model = xpath_string "/domain/cpu/model/text()" in @@ -73,6 +72,21 @@ let parse_libvi...
2015 Jul 13
2
[PATCH 1/2] utils: import parse_size from libguestfs
--- src/utils.ml | 21 +++++++++++++++++++++ src/utils.mli | 3 +++ 2 files changed, 24 insertions(+) diff --git a/src/utils.ml b/src/utils.ml index 3e81c21..7ae24bd 100644 --- a/src/utils.ml +++ b/src/utils.ml @@ -204,3 +204,24 @@ let compare_architecture a1 a2 = exit 1 in compare (index_of_architecture a1) (index_of_architecture a2) + +(* Parse a size field, eg. "10G".
2015 Jul 13
0
[PATCH 2/2] Add --size for ext2 filesystem
...ial disk is that the * fixed overhead of ext2 is larger (since ext2 calculates it based on * the size of the disk). For a 4GB disk the overhead is * approximately 66MB. - * - * In future, make this configurable, or determine it from the input - * files (XXX). *) -let appliance_size = 4L *^ 1024L *^ 1024L *^ 1024L +let default_appliance_size = 4L *^ 1024L *^ 1024L *^ 1024L -let build_ext2 debug basedir files modpath kernel_version appliance = +let build_ext2 debug basedir files modpath kernel_version appliance size = if debug >= 1 then printf "supermin: ext2: creating empt...
2008 Jul 21
3
Wine memory limitation for malloc?
...11 x64/gcc -m32) #include <stdlib.h> #include <stdio.h> #include <time.h> main(int argc, char **argv) {unsigned long n,m,i; int *p,*p1,*p2,*p3; clock_t time1,time2; i=4095; if (argc == 2) i = (size_t) strtoul(argv[1], NULL, 0); m=i*1024*1024; while( (p=(int*)malloc(m)) ==0 ) m-=1024l*1024l; printf("Allocated %u MB ( %u bytes )\n",m/1024l/1024l,m); getchar(); free(p); exit(0); }
2017 Apr 26
0
[PATCH 2/2] v2v: -o glance: factorize common properties
...x cfb19b4..3feb2e4 100644 --- a/v2v/output_glance.ml +++ b/v2v/output_glance.ml @@ -66,6 +66,78 @@ object ) targets method create_metadata source targets _ guestcaps inspect target_firmware = + (* Collect the common properties for all the disks. *) + let min_ram = source.s_memory /^ 1024L /^ 1024L in + let common_properties = + let properties = ref [ + "hw_disk_bus", + (match guestcaps.gcaps_block_bus with + | Virtio_blk -> "virtio" + | Virtio_SCSI -> "scsi" + | IDE -> "ide"); + &qu...
2016 Sep 13
1
[PATCH] v2v: -o glance: set all properties during creation (RHBZ#1374405)
...t;--container-format=bare"; "--file"; target_file ] in - if run_command cmd <> 0 then - error (f_"glance: image upload to glance failed, see earlier errors"); - (* Set the properties (ie. metadata). *) let min_ram = source.s_memory /^ 1024L /^ 1024L in let properties = [ @@ -114,26 +108,18 @@ object | x, 0 -> ("os_version", string_of_int x) :: properties | x, y -> ("os_version", sprintf "%d.%d" x y) :: properties in - (* Glance doesn't appear to check the...
2017 Mar 17
0
Re: [PATCH v2] v2v: -i libvirt: If <vcpu> is missing, calculate it from CPU topology.
...default = xpath_int_default xpathctx*) > and xpath_int64_default = xpath_int64_default xpathctx in > > let hypervisor = > @@ -65,7 +65,6 @@ let parse_libvirt_xml ?conn xml = > | Some s -> s in > let memory = xpath_int64_default "/domain/memory/text()" (1024L *^ 1024L) in > let memory = memory *^ 1024L in > - let vcpu = xpath_int_default "/domain/vcpu/text()" 1 in > > let cpu_vendor = xpath_string "/domain/cpu/vendor/text()" in > let cpu_model = xpath_string "/domain/cpu/model/text()" in > @@ -...
2023 Feb 20
2
[PATCH v2v v2 3/3] -o qemu: Always use -cpu host unless overridden by source hypervisor
...rtio-1.0 > diff --git a/output/output_qemu.ml b/output/output_qemu.ml > index 491906ebf9..2bbacb6eda 100644 > --- a/output/output_qemu.ml > +++ b/output/output_qemu.ml > @@ -175,11 +175,7 @@ module QEMU = struct > > arg "-m" (Int64.to_string (source.s_memory /^ 1024L /^ 1024L)); > > - (match source.s_cpu_model, guestcaps.gcaps_arch_min_version with > - | None, 0 -> () > - | None, _ -> arg "-cpu" "host" > - | Some model, _ -> arg "-cpu" model > - ); > + arg "-cpu" (Op...
2018 Jul 05
4
[PATCH] v2v: Preserve VM Generation ID (RHBZ#1598350).
...@@ let create_libvirt_xml ?pool source target_buses guestcaps e "name" [] [PCData source.s_name]; ]; + (match source.s_genid with + | None -> () + | Some genid -> List.push_back body (e "genid" [] [PCData genid]) + ); + let memory_k = source.s_memory /^ 1024L in List.push_back_list body [ e "memory" ["unit", "KiB"] [PCData (Int64.to_string memory_k)]; diff --git a/v2v/input_disk.ml b/v2v/input_disk.ml index 624644532..43b901a88 100644 --- a/v2v/input_disk.ml +++ b/v2v/input_disk.ml @@ -80,6 +80,7 @@ class input_disk...
2017 Apr 26
2
[PATCH 1/2] v2v: -o glance: add property for UEFI firmware (RHBZ#1445659)
When converting a guest with UEFI firmware, set the also hw_firmware_type=uefi property for all the disks of the guest, so Nova can properly boot the guest. --- v2v/output_glance.ml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/v2v/output_glance.ml b/v2v/output_glance.ml index b712d68..cfb19b4 100644 --- a/v2v/output_glance.ml +++ b/v2v/output_glance.ml @@ -41,7
2018 Jul 05
0
Re: [PATCH] v2v: Preserve VM Generation ID (RHBZ#1598350).
...uses > guestcaps > e "name" [] [PCData source.s_name]; > ]; > > + (match source.s_genid with > + | None -> () > + | Some genid -> List.push_back body (e "genid" [] [PCData genid]) > + ); > + > let memory_k = source.s_memory /^ 1024L in > List.push_back_list body [ > e "memory" ["unit", "KiB"] [PCData (Int64.to_string memory_k)]; > diff --git a/v2v/input_disk.ml b/v2v/input_disk.ml > index 624644532..43b901a88 100644 > --- a/v2v/input_disk.ml > +++ b/v2v/input_disk.ml >...
2017 Mar 13
0
[PATCH 2/2] v2v: -i ova: Factor out the OVF parsing into a separate module.
...:Name from OVF document"); - name_from_disk ova - | Some name -> name in - - (* Search for memory. *) - let memory = xpath_int64_default "/ovf:Envelope/ovf:VirtualSystem/ovf:VirtualHardwareSection/ovf:Item[rasd:ResourceType/text()=4]/rasd:VirtualQuantity/text()" (1024L *^ 1024L) in - let memory = memory *^ 1024L *^ 1024L in - - (* Search for number of vCPUs. *) - let vcpu = xpath_int_default "/ovf:Envelope/ovf:VirtualSystem/ovf:VirtualHardwareSection/ovf:Item[rasd:ResourceType/text()=3]/rasd:VirtualQuantity/text()" 1 in - - (* BIOS or EFI fi...
2017 Mar 16
2
[PATCH] v2v: -i libvirt: If <vcpu> is missing, calculate it from CPU topology.
...t xpathctx + (*and xpath_int_default = xpath_int_default xpathctx*) and xpath_int64_default = xpath_int64_default xpathctx in let hypervisor = @@ -65,7 +65,6 @@ let parse_libvirt_xml ?conn xml = | Some s -> s in let memory = xpath_int64_default "/domain/memory/text()" (1024L *^ 1024L) in let memory = memory *^ 1024L in - let vcpu = xpath_int_default "/domain/vcpu/text()" 1 in let cpu_vendor = xpath_string "/domain/cpu/vendor/text()" in let cpu_model = xpath_string "/domain/cpu/model/text()" in @@ -73,6 +72,21 @@ let parse_libvi...
2016 Feb 16
3
[PATCH 0/2] v2v: glance: Allow Glance backend to import multiple disks
This patch series lifts the previous restriction that virt-v2v would refuse to convert a guest to Glance that had more than one disk. The first patch is just better documentation for the Glance output mode. The second patch contains the change (best viewed with 'git diff -w' since it is mostly a whitespace change). virt-v2v -o glance will now create multiple disks called: - guestname
2017 Mar 16
0
[PATCH 4/4] v2v: Pass CPU vendor, model and topology from source to target.
...ware with | TargetBIOS -> None diff --git a/v2v/input_disk.ml b/v2v/input_disk.ml index 27f8553..d28f45e 100644 --- a/v2v/input_disk.ml +++ b/v2v/input_disk.ml @@ -80,6 +80,11 @@ class input_disk input_format disk = object s_name = name; s_orig_name = name; s_memory = 2048L *^ 1024L *^ 1024L; (* 2048 MB *) s_vcpu = 1; (* 1 vCPU is a safe default *) + s_cpu_vendor = None; + s_cpu_model = None; + s_cpu_sockets = None; + s_cpu_cores = None; + s_cpu_threads = None; s_features = [ "acpi"; "apic"; &qu...
2017 Mar 13
4
[PATCH 0/2] v2v: -i ova: A couple of cleanup patches.
A couple of patches cleaning up the -i ova code. These are both just refactoring (or should be at any rate). The second patch is best viewed with 'git show -w' to exclude whitespace changes. Rich.
2023 Feb 17
3
[PATCH v2v v2 0/3] Use host-model
Version 1 was here: https://listman.redhat.com/archives/libguestfs/2023-February/thread.html#30694 I made a few changes in v2 but overall decided to keep the now unused gcaps_arch_min_version capability. This doesn't preclude removing it in future if we think it's never going to be useful. I changed patch 1 so that to remove the long comment about how the field is used, anticipating the
2017 Mar 17
7
[PATCH v2 0/6] v2v: Pass CPU vendor, model and topology from source to target.
v1 -> v2: - Support for passing topology through -o glance. - Support for passing topology through -o rhv. - Use bool for acpi/apic/pae struct fields in virt-p2v. - Write the xpath expression in error messages instead of file/line. - Fix more memory leaks in virt-p2v cpuid.c. - Passes make check & check-valgrind. There may be some other minor changes. I believe that everything