[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH 5/9] Debian HVM guests: Honour guest disk and ram size runvars
From: Robert Ho <robert.hu@xxxxxxxxx> Allow runvars to specify guest disk and ram size, turning previous values into defaults: The default disk size for the guest is `10000M' which is not going to be sufficient for nested HVM tests. We are going to want to use a larger disk size for the nested L1. The appropriate disk_size will be defined in make-flight, in forthcoming changes. Also, also allow ram size to be defined by runvar. The runvar takes precedence over the default (which is calculated based on host RAM etc.) No functional change with current sets of runvars. Signed-off-by: Robert Ho <robert.hu@xxxxxxxxx> Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- Osstest/TestSupport.pm | 3 ++- ts-debian-hvm-install | 14 ++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 7ba51ec..d966fe1 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -1745,7 +1745,8 @@ sub target_put_guest_image ($$;$) { sub more_prepareguest_hvm ($$$$;@) { my ($ho, $gho, $ram_mb, $disk_mb, %xopts) = @_; - + # $ram_mb and $disk_mb are defaults, used if runvars don't say + my $passwd= 'xenvnc'; prepareguest_part_lvmdisk($ho, $gho, $disk_mb); diff --git a/ts-debian-hvm-install b/ts-debian-hvm-install index 5fb6f4c..f2fc31b 100755 --- a/ts-debian-hvm-install +++ b/ts-debian-hvm-install @@ -220,13 +220,19 @@ sub prep () { my $host_freemem_mb = host_get_free_memory($ho); my $ram_minslop = 100; my $ram_lots = 5000; - if ($host_freemem_mb > $ram_lots * 2 + $ram_minslop) { - $ram_mb = $ram_lots; - } else { - $ram_mb = 768; + + $ram_mb = guest_var($gho,'memsize',undef); + if (!$ram_mb) { + if ($host_freemem_mb > $ram_lots * 2 + $ram_minslop) { + $ram_mb = $ram_lots; + } else { + $ram_mb = 768; + } } logm("Host has $host_freemem_mb MB free memory, setting guest memory size to $ram_mb MB"); + $disk_mb= guest_var($gho,'disksize',$disk_mb); + more_prepareguest_hvm($ho,$gho, $ram_mb, $disk_mb, OnReboot => 'preserve', Bios => $r{bios}, -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |