http://bugs.winehq.org/show_bug.cgi?id=31784
Bug #: 31784 Summary: Add support for VM snapshots Product: Wine-Testbot Version: unspecified Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: unknown AssignedTo: wine-bugs@winehq.org ReportedBy: fgouget@codeweavers.com Classification: Unclassified
As we expand the number of configurations to test it seems wasteful to have to create and maintain a brand new VM just for them. In a lot of cases all we need is to slightly reconfigure a VM to add a CD image, add network interfaces or change the locale and run the test with these changes settings.
That's where snapshots can be useful: take a snapshot for each configuration we need to test and then let the TestBot start the VM from the right snapshot.
There is a catch though: while it's possible to run the tests in two VMs in parallel, for a given VM only one snapshot can be active at a time. There's two consequences: * TestBot must know about snapshot and not try to simultaneously run the tests in two snapshots belonging to the same VM. * If in the base configurations (those all Wine patches run on) we have a VM with ten snapshots, it means we will need to run the tests ten times *sequentially*. That VM is quickly going to become a bottleneck. So we should still limit the number of snapshots per VM, at least in the base configurations.
http://bugs.winehq.org/show_bug.cgi?id=31784
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED AssignedTo|wine-bugs@winehq.org |fgouget@codeweavers.com
--- Comment #1 from François Gouget fgouget@codeweavers.com 2012-09-24 12:23:56 CDT --- This is on my todo list.
http://bugs.winehq.org/show_bug.cgi?id=31784
Qian Hong fracting@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fracting@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=31784
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|fgouget@codeweavers.com |wine-bugs@winehq.org
--- Comment #2 from François Gouget fgouget@codeweavers.com --- My todo list is overflowing with non-WineTestBot tasks.
https://bugs.winehq.org/show_bug.cgi?id=31784
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEW
--- Comment #3 from François Gouget fgouget@codeweavers.com --- The central issue with having multiple snapshots per VM is that the WineTestBot needs to realize it cannot start tests in both snapshots at the same time.
However currently the WineTestBot is configured to never start more than one VM per host (4 to 8 cores, 16GB and all that to run just one VM! :-( ). So I thought we could take a shortcut: have two entries in the VMS table both referencing the same domain but different snapshots: win7u domain=wtbw7u snapshot=ie11-wtb-ja win7u-ko domain=wtbw7u snapshot=ie11-wtb-ko
Since we never start more than one VM per host there would be no risk of the WineTestBot trying to run tests in both configurations at the same time. Unfortunately this did not work: for some reason the TestBot got confused resulting in one of the VMs getting stuck in the 'reverting' state while there was no qemu process running on the host.
Possibly while reverting win7u-ko the Engine checked the status of the win7u VM (VMs::UpdateStatus() or VMs::IsPoweredOn()), noticed it was running despite not being supposed to, and shut it down which resulted in the win7u-ko revert process being interrupted.
https://bugs.winehq.org/show_bug.cgi?id=31784
--- Comment #4 from François Gouget fgouget@codeweavers.com --- Created attachment 52529 --> https://bugs.winehq.org/attachment.cgi?id=52529 Modified database schema to handle snapshots and more
The attached schema would make it possible to have multiple configurations (snapshots) per VM. * The VMs table entries would only describe the generic properties of a VM. * The VMConfigs table would describe the specific properties of a given VM configuration. * A given VM could have multiple VMConfig entries. For instance the win7u VM could have both ja and ko VMConfigs corresponding to Japanese and Korean locales for instance. * When submitting a job, instead of picking VMs the user would pick VMConfigs which he may see as win7u+ja, win7u+ko, etc. * The VMInstances table is for dealing with failover and load balancing. * In this context what counts is that all instances of a given VM must have the same set of VM configurations, i.e. the same set of snapshots. * When a VM instance is in use, its VMSnapshot field would be set to point to its current configuration (i.e. reference the corresponding VMConfig entry).
https://bugs.winehq.org/show_bug.cgi?id=31784
--- Comment #5 from François Gouget fgouget@codeweavers.com --- Currently we have two VMs that we can configure for additional locales: wvistau64 and w7u (w1064 might be a third one but it's the only Windows 10 VM). One was configured for Arabic, a right-to-left language, and the other for Japanese, a double-byte language.
It turns out that Hebrew and Korean had failures not seen in these two locales. Switching these two VMs to Hebrew and Korean would help fix the known issues. But then bugs could creep in the no longer tested locales
Since we have only two VMs we are currently limited to only testing two non-English locales. Adding support for snapshots would solve this issue: we could configure these two VMs with as many locales as we wish.
https://bugs.winehq.org/show_bug.cgi?id=31784
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #6 from François Gouget fgouget@codeweavers.com --- We now have support for multiple snapshots per VM.
commit 035ad3d5ab6ec66d91d10961bf834db5f0c6d7eb Author: Francois Gouget fgouget@codeweavers.com Date: Thu Mar 1 11:02:25 2018 +0100
testbot: Allow multiple VMs to share access to a hypervisor domain.
This makes it possible to define two or more VM instances that have the same VirtURI and VirtDomain values and differ only in their IdleSnapshot field. This can be used to perform tests on multiple configurations of a given Windows version, such as testing different locales, etc.
However a hypervisor domain only has one current snapshot. So the TestBot can only use one of the VM instances that depend on this hypervisor domain at any time.
An important consequence is that $VM->Status does not necessarily matches the state of the hypervisor domain. So $VM->Status == off does not mean that the TestBot is free to revert the domain to that VM snapshot. The status of the other VMs using the same hypervisor domain much be checked first. This is handled by some extra _CanScheduleOnVM() calls.
Signed-off-by: Francois Gouget fgouget@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
commit 070b78e17a9a0408eb17f01f96860fcd1d846923 Author: Francois Gouget fgouget@codeweavers.com Date: Wed Feb 28 02:01:03 2018 +0100
testbot: Avoid race conditions between LibvirtTool monitor and other tools.
If another tool was trying to connect to the VM's TestAgent server when 'LibvirtTool monitor' powered off the VM, that other tool may mark the VM as offline right after it has been put back online. So wait for other tools to time out after monitor powers off a VM.
Signed-off-by: Francois Gouget fgouget@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
commit cad513a33e9c0f32af427ac2d2caf63f23f168b0 Author: Francois Gouget fgouget@codeweavers.com Date: Wed Feb 28 01:55:41 2018 +0100
testbot: Replace poweroff with checkoff in the Engine's Cleanup().
checkoff verifies that the hypervisor domain state matches that of the current VM instance before powering it off. If the state does not match then the VM is just marked off.
Signed-off-by: Francois Gouget fgouget@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
commit ab35ecaf100d649a8b182e1bfba22c1b754cb8bc Author: Francois Gouget fgouget@codeweavers.com Date: Wed Feb 28 01:54:45 2018 +0100
testbot: Check the current snapshot in LibvirtTool monitor.
If the snapshot does not match when the hypervisor domain becomes accessible again, then don't try to power if off and just mark the VM instance as off.
Signed-off-by: Francois Gouget fgouget@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
commit 98ec6ba6d7aa219201a2defda745af4febfbeef0 Author: Francois Gouget fgouget@codeweavers.com Date: Wed Feb 28 01:54:29 2018 +0100
testbot: Check the current snapshot in LibvirtTool checkidle.
If the snapshot does not match then the current VM instance is not actually using the hypervisor domain so mark it off.
Signed-off-by: Francois Gouget fgouget@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
https://bugs.winehq.org/show_bug.cgi?id=31784
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #7 from Austin English austinenglish@gmail.com --- Closing.