Skip to content

Commit

Permalink
tests: give more RAM for HVM with in-vm kernel
Browse files Browse the repository at this point in the history
HVM has disabled memory hotplug (due to incompatibility with QEMU), and
so needs more RAM to fit everything + memory accounting for full maxmem.

While at it, adjust the test to check if kernel-related settings are
correctly inherited from the template.
  • Loading branch information
marmarek committed Dec 8, 2024
1 parent bd7b71b commit bff4812
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions qubes/tests/integ/grub.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@ def test_000_standalone_vm(self):
self.loop.run_until_complete(self.testvm1.shutdown(wait=True))

self.testvm1.kernel = self.kernel
if self.virt_mode == "hvm":
# HVM has disabled memory-hotplug, which means VM is started with
# full maxmem and need extra memory for page structures for full
# maxmem
self.testvm1.memory = 450
self.loop.run_until_complete(self.testvm1.start())
(actual_kver, _) = self.loop.run_until_complete(
self.testvm1.run_for_stdio("uname -r")
Expand Down Expand Up @@ -156,15 +161,18 @@ def test_010_template_based_vm(self):
name=self.make_vm_name("vm1"),
label="red",
)
self.testvm1.virt_mode = self.virt_mode
self.loop.run_until_complete(self.testvm1.create_on_disk())
self.loop.run_until_complete(self.test_template.start())
self.install_packages(self.test_template)
kver = self.get_kernel_version(self.test_template)
self.loop.run_until_complete(self.test_template.shutdown(wait=True))

self.test_template.kernel = self.kernel
self.testvm1.kernel = self.kernel
if self.virt_mode == "hvm":
# HVM has disabled memory-hotplug, which means VM is started with
# full maxmem and need extra memory for page structures for full
# maxmem
self.test_template.memory = 450

# Check if TemplateBasedVM boots and has the right kernel
self.loop.run_until_complete(self.testvm1.start())
Expand Down

0 comments on commit bff4812

Please sign in to comment.