[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTest Nested v12 03/21] Allow runvars to specify guest disk and ram size (turning previous values into defaults)
1. The default disk size for guest is '10000M' which is not sufficient for nested HVM guest, using larger disk size for nested guest to accommodate to nested test requirement, the specific disk_size is defined by make-flight. 2. Also, also allow ram size to be defined by runvar. It takes precedence over the calculation formula. 3. Add comment at the interface code. Signed-off-by: Robert Ho <robert.hu@xxxxxxxxx> --- 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 5bf0284..b7963af 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -1726,7 +1726,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 864f038..f9bc5a5 100755 --- a/ts-debian-hvm-install +++ b/ts-debian-hvm-install @@ -200,13 +200,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.8.3.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |