@@ -62,12 +62,6 @@ async fn frontpage<T: PetriVmmBackend>(config: PetriVmBuilder<T>) -> anyhow::Res
6262 openvmm_uefi_x64( vhd( ubuntu_2204_server_x64) ) ,
6363 openvmm_openhcl_uefi_x64( vhd( windows_datacenter_core_2022_x64) ) ,
6464 openvmm_openhcl_uefi_x64( vhd( ubuntu_2204_server_x64) ) ,
65- hyperv_pcat_x64( vhd( windows_datacenter_core_2022_x64) ) ,
66- hyperv_pcat_x64( vhd( ubuntu_2204_server_x64) ) ,
67- hyperv_uefi_aarch64( vhd( windows_11_enterprise_aarch64) ) ,
68- hyperv_uefi_aarch64( vhd( ubuntu_2404_server_aarch64) ) ,
69- hyperv_uefi_x64( vhd( windows_datacenter_core_2022_x64) ) ,
70- hyperv_uefi_x64( vhd( ubuntu_2204_server_x64) ) ,
7165 hyperv_openhcl_uefi_aarch64( vhd( windows_11_enterprise_aarch64) ) ,
7266 hyperv_openhcl_uefi_aarch64( vhd( ubuntu_2404_server_aarch64) ) ,
7367 hyperv_openhcl_uefi_x64( vhd( windows_datacenter_core_2022_x64) ) ,
@@ -84,12 +78,10 @@ async fn boot<T: PetriVmmBackend>(config: PetriVmBuilder<T>) -> anyhow::Result<(
8478}
8579
8680/// Basic boot test without agent
87- // TODO: investigate why the shutdown ic doesn't work reliably with hyper-v
88- // in our ubuntu image
89- // TODO: re-enable TDX ubuntu tests once issues are resolved (here and below)
9081#[ vmm_test_no_agent(
9182 openvmm_pcat_x64( vhd( freebsd_13_2_x64) ) ,
9283 openvmm_pcat_x64( iso( freebsd_13_2_x64) ) ,
84+ openvmm_openhcl_uefi_x64[ vbs] ( vhd( windows_datacenter_core_2022_x64) ) ,
9385 openvmm_openhcl_uefi_x64[ vbs] ( vhd( ubuntu_2204_server_x64) ) ,
9486 hyperv_openhcl_uefi_x64[ vbs] ( vhd( ubuntu_2404_server_x64) ) ,
9587 // hyperv_openhcl_uefi_x64[tdx](vhd(ubuntu_2404_server_x64)),
@@ -102,7 +94,7 @@ async fn boot_no_agent<T: PetriVmmBackend>(config: PetriVmBuilder<T>) -> anyhow:
10294 Ok ( ( ) )
10395}
10496
105- // Basic vp "heavy" boot test with 16 VPs.
97+ // Basic vp "heavy" boot test with 16 VPs and 2 NUMA nodes .
10698#[ vmm_test(
10799 openvmm_linux_direct_x64,
108100 openvmm_openhcl_linux_direct_x64,
@@ -117,13 +109,17 @@ async fn boot_no_agent<T: PetriVmmBackend>(config: PetriVmBuilder<T>) -> anyhow:
117109 hyperv_openhcl_uefi_aarch64( vhd( windows_11_enterprise_aarch64) ) ,
118110 hyperv_openhcl_uefi_aarch64( vhd( ubuntu_2404_server_aarch64) ) ,
119111 hyperv_openhcl_uefi_x64( vhd( windows_datacenter_core_2022_x64) ) ,
120- hyperv_openhcl_uefi_x64( vhd( ubuntu_2204_server_x64) )
112+ hyperv_openhcl_uefi_x64( vhd( ubuntu_2204_server_x64) ) ,
113+ hyperv_openhcl_uefi_x64[ vbs] ( vhd( windows_datacenter_core_2025_x64_prepped) ) ,
114+ hyperv_openhcl_uefi_x64[ snp] ( vhd( windows_datacenter_core_2025_x64_prepped) ) ,
115+ hyperv_openhcl_uefi_x64[ tdx] ( vhd( windows_datacenter_core_2025_x64_prepped) ) ,
121116) ]
122117async fn boot_heavy < T : PetriVmmBackend > ( config : PetriVmBuilder < T > ) -> anyhow:: Result < ( ) > {
123118 let is_openhcl = config. is_openhcl ( ) ;
124119 let ( vm, agent) = config
125120 . with_processor_topology ( ProcessorTopology {
126121 vp_count : 16 ,
122+ vps_per_socket : Some ( 8 ) ,
127123 ..Default :: default ( )
128124 } )
129125 // multiarch::openvmm_uefi_x64_windows_datacenter_core_2022_x64_boot_heavy
@@ -139,21 +135,19 @@ async fn boot_heavy<T: PetriVmmBackend>(config: PetriVmBuilder<T>) -> anyhow::Re
139135 Ok ( ( ) )
140136}
141137
142- // Basic vp "heavy" boot test without agent with 16 VPs.
138+ // Basic vp "heavy" boot test without agent with 16 VPs and 2 NUMA nodes .
143139#[ vmm_test_no_agent(
144140 openvmm_openhcl_uefi_x64[ vbs] ( vhd( windows_datacenter_core_2022_x64) ) ,
145141 openvmm_openhcl_uefi_x64[ vbs] ( vhd( ubuntu_2204_server_x64) ) ,
146- hyperv_openhcl_uefi_x64[ vbs] ( vhd( windows_datacenter_core_2025_x64) ) ,
147142 hyperv_openhcl_uefi_x64[ vbs] ( vhd( ubuntu_2404_server_x64) ) ,
148- hyperv_openhcl_uefi_x64[ tdx] ( vhd( windows_datacenter_core_2025_x64) ) ,
149143 // hyperv_openhcl_uefi_x64[tdx](vhd(ubuntu_2404_server_x64)),
150- hyperv_openhcl_uefi_x64[ snp] ( vhd( windows_datacenter_core_2025_x64) ) ,
151144 hyperv_openhcl_uefi_x64[ snp] ( vhd( ubuntu_2404_server_x64) )
152145) ]
153146async fn boot_no_agent_heavy < T : PetriVmmBackend > ( config : PetriVmBuilder < T > ) -> anyhow:: Result < ( ) > {
154147 let mut vm = config
155148 . with_processor_topology ( ProcessorTopology {
156149 vp_count : 16 ,
150+ vps_per_socket : Some ( 8 ) ,
157151 ..Default :: default ( )
158152 } )
159153 . run_without_agent ( )
@@ -163,15 +157,32 @@ async fn boot_no_agent_heavy<T: PetriVmmBackend>(config: PetriVmBuilder<T>) -> a
163157 Ok ( ( ) )
164158}
165159
160+ /// Basic boot test with a single VP.
161+ #[ vmm_test(
162+ hyperv_openhcl_uefi_x64[ vbs] ( vhd( windows_datacenter_core_2025_x64_prepped) ) ,
163+ hyperv_openhcl_uefi_x64[ tdx] ( vhd( windows_datacenter_core_2025_x64_prepped) ) ,
164+ hyperv_openhcl_uefi_x64[ snp] ( vhd( windows_datacenter_core_2025_x64_prepped) ) ,
165+ ) ]
166+ #[ cfg_attr( not( windows) , expect( dead_code) ) ]
167+ async fn boot_single_proc < T : PetriVmmBackend > ( config : PetriVmBuilder < T > ) -> anyhow:: Result < ( ) > {
168+ let ( vm, agent) = config
169+ . with_processor_topology ( ProcessorTopology {
170+ vp_count : 1 ,
171+ ..Default :: default ( )
172+ } )
173+ . run ( )
174+ . await ?;
175+ agent. power_off ( ) . await ?;
176+ vm. wait_for_clean_teardown ( ) . await ?;
177+ Ok ( ( ) )
178+ }
179+
166180/// Basic boot test without agent and with a single VP.
167181#[ vmm_test_no_agent(
168182 openvmm_openhcl_uefi_x64[ vbs] ( vhd( windows_datacenter_core_2022_x64) ) ,
169183 openvmm_openhcl_uefi_x64[ vbs] ( vhd( ubuntu_2204_server_x64) ) ,
170- hyperv_openhcl_uefi_x64[ vbs] ( vhd( windows_datacenter_core_2025_x64) ) ,
171184 hyperv_openhcl_uefi_x64[ vbs] ( vhd( ubuntu_2404_server_x64) ) ,
172- hyperv_openhcl_uefi_x64[ tdx] ( vhd( windows_datacenter_core_2025_x64) ) ,
173185 // hyperv_openhcl_uefi_x64[tdx](vhd(ubuntu_2404_server_x64)),
174- hyperv_openhcl_uefi_x64[ snp] ( vhd( windows_datacenter_core_2025_x64) ) ,
175186 hyperv_openhcl_uefi_x64[ snp] ( vhd( ubuntu_2404_server_x64) )
176187) ]
177188async fn boot_no_agent_single_proc < T : PetriVmmBackend > (
@@ -260,25 +271,11 @@ async fn reboot<T: PetriVmmBackend>(config: PetriVmBuilder<T>) -> Result<(), any
260271}
261272
262273/// Basic reboot test without agent
263- // TODO: Reenable guests that use the framebuffer once #74 is fixed.
264274#[ vmm_test_no_agent(
265- openvmm_linux_direct_x64,
266- openvmm_openhcl_linux_direct_x64,
267- // openvmm_pcat_x64(vhd(windows_datacenter_core_2022_x64)),
268- // openvmm_pcat_x64(vhd(ubuntu_2204_server_x64)),
269- // openvmm_uefi_aarch64(vhd(windows_11_enterprise_aarch64)),
270- // openvmm_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)),
271- // openvmm_uefi_x64(vhd(windows_datacenter_core_2022_x64)),
272- // openvmm_uefi_x64(vhd(ubuntu_2204_server_x64)),
273- // openvmm_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)),
274- // openvmm_openhcl_uefi_x64(vhd(ubuntu_2204_server_x64)),
275275 openvmm_openhcl_uefi_x64[ vbs] ( vhd( windows_datacenter_core_2022_x64) ) ,
276276 openvmm_openhcl_uefi_x64[ vbs] ( vhd( ubuntu_2204_server_x64) ) ,
277- hyperv_openhcl_uefi_x64[ vbs] ( vhd( windows_datacenter_core_2025_x64) ) ,
278277 hyperv_openhcl_uefi_x64[ vbs] ( vhd( ubuntu_2404_server_x64) ) ,
279- hyperv_openhcl_uefi_x64[ tdx] ( vhd( windows_datacenter_core_2025_x64) ) ,
280278 // hyperv_openhcl_uefi_x64[tdx](vhd(ubuntu_2404_server_x64)),
281- hyperv_openhcl_uefi_x64[ snp] ( vhd( windows_datacenter_core_2025_x64) ) ,
282279 hyperv_openhcl_uefi_x64[ snp] ( vhd( ubuntu_2404_server_x64) )
283280) ]
284281async fn reboot_no_agent < T : PetriVmmBackend > ( config : PetriVmBuilder < T > ) -> anyhow:: Result < ( ) > {
@@ -290,6 +287,83 @@ async fn reboot_no_agent<T: PetriVmmBackend>(config: PetriVmBuilder<T>) -> anyho
290287 Ok ( ( ) )
291288}
292289
290+ /// Configure Guest VSM and reboot the VM to verify it works.
291+ // TODO: Enable TDX once our runner has support for it.
292+ #[ vmm_test(
293+ hyperv_openhcl_uefi_x64[ vbs] ( vhd( windows_datacenter_core_2025_x64_prepped) ) ,
294+ hyperv_openhcl_uefi_x64[ snp] ( vhd( windows_datacenter_core_2025_x64_prepped) ) ,
295+ //hyperv_openhcl_uefi_x64[tdx](vhd(windows_datacenter_core_2025_x64_prepped)),
296+ ) ]
297+ #[ cfg_attr( not( windows) , expect( dead_code) ) ]
298+ async fn reboot_into_guest_vsm < T : PetriVmmBackend > (
299+ config : PetriVmBuilder < T > ,
300+ ) -> Result < ( ) , anyhow:: Error > {
301+ let ( mut vm, agent) = config. run ( ) . await ?;
302+ let shell = agent. windows_shell ( ) ;
303+
304+ // Enable VBS
305+ cmd ! ( shell, "reg" )
306+ . args ( [
307+ "add" ,
308+ "HKLM\\ SYSTEM\\ CurrentControlSet\\ Control\\ DeviceGuard" ,
309+ "/v" ,
310+ "EnableVirtualizationBasedSecurity" ,
311+ "/t" ,
312+ "REG_DWORD" ,
313+ "/d" ,
314+ "1" ,
315+ "/f" ,
316+ ] )
317+ . run ( )
318+ . await ?;
319+ // Enable Credential Guard
320+ cmd ! ( shell, "reg" )
321+ . args ( [
322+ "add" ,
323+ "HKLM\\ SYSTEM\\ CurrentControlSet\\ Control\\ Lsa" ,
324+ "/v" ,
325+ "LsaCfgFlags" ,
326+ "/t" ,
327+ "REG_DWORD" ,
328+ "/d" ,
329+ "2" ,
330+ "/f" ,
331+ ] )
332+ . run ( )
333+ . await ?;
334+ // Enable HVCI
335+ cmd ! ( shell, "reg" )
336+ . args ( [
337+ "add" ,
338+ "HKLM\\ SYSTEM\\ CurrentControlSet\\ Control\\ DeviceGuard\\ Scenarios\\ HypervisorEnforcedCodeIntegrity" ,
339+ "/v" ,
340+ "Enabled" ,
341+ "/t" ,
342+ "REG_DWORD" ,
343+ "/d" ,
344+ "1" ,
345+ "/f" ,
346+ ] )
347+ . run ( )
348+ . await ?;
349+
350+ agent. reboot ( ) . await ?;
351+ let agent = vm. wait_for_reset ( ) . await ?;
352+ let shell = agent. windows_shell ( ) ;
353+
354+ // Verify VBS is running
355+ let output = cmd ! ( shell, "systeminfo" ) . output ( ) . await ?;
356+ let output_str = String :: from_utf8_lossy ( & output. stdout ) ;
357+ assert ! ( output_str. contains( "Virtualization-based security: Status: Running" ) ) ;
358+ let output_running = & output_str[ output_str. find ( "Services Running:" ) . unwrap ( ) ..] ;
359+ assert ! ( output_running. contains( "Credential Guard" ) ) ;
360+ assert ! ( output_running. contains( "Hypervisor enforced Code Integrity" ) ) ;
361+
362+ agent. power_off ( ) . await ?;
363+ vm. wait_for_clean_teardown ( ) . await ?;
364+ Ok ( ( ) )
365+ }
366+
293367/// Basic boot test with secure boot enabled and a valid template.
294368#[ vmm_test(
295369 openvmm_uefi_aarch64( vhd( ubuntu_2404_server_aarch64) ) ,
@@ -401,83 +475,6 @@ async fn guest_test_uefi<T: PetriVmmBackend>(config: PetriVmBuilder<T>) -> anyho
401475 Ok ( ( ) )
402476}
403477
404- /// Configure Guest VSM and reboot the VM to verify it works.
405- // TODO: Enable TDX once our runner has support for it.
406- #[ vmm_test(
407- hyperv_openhcl_uefi_x64[ vbs] ( vhd( windows_datacenter_core_2025_x64_prepped) ) ,
408- hyperv_openhcl_uefi_x64[ snp] ( vhd( windows_datacenter_core_2025_x64_prepped) ) ,
409- //hyperv_openhcl_uefi_x64[tdx](vhd(windows_datacenter_core_2025_x64_prepped)),
410- ) ]
411- #[ cfg_attr( not( windows) , expect( dead_code) ) ]
412- async fn reboot_into_guest_vsm < T : PetriVmmBackend > (
413- config : PetriVmBuilder < T > ,
414- ) -> Result < ( ) , anyhow:: Error > {
415- let ( mut vm, agent) = config. run ( ) . await ?;
416- let shell = agent. windows_shell ( ) ;
417-
418- // Enable VBS
419- cmd ! ( shell, "reg" )
420- . args ( [
421- "add" ,
422- "HKLM\\ SYSTEM\\ CurrentControlSet\\ Control\\ DeviceGuard" ,
423- "/v" ,
424- "EnableVirtualizationBasedSecurity" ,
425- "/t" ,
426- "REG_DWORD" ,
427- "/d" ,
428- "1" ,
429- "/f" ,
430- ] )
431- . run ( )
432- . await ?;
433- // Enable Credential Guard
434- cmd ! ( shell, "reg" )
435- . args ( [
436- "add" ,
437- "HKLM\\ SYSTEM\\ CurrentControlSet\\ Control\\ Lsa" ,
438- "/v" ,
439- "LsaCfgFlags" ,
440- "/t" ,
441- "REG_DWORD" ,
442- "/d" ,
443- "2" ,
444- "/f" ,
445- ] )
446- . run ( )
447- . await ?;
448- // Enable HVCI
449- cmd ! ( shell, "reg" )
450- . args ( [
451- "add" ,
452- "HKLM\\ SYSTEM\\ CurrentControlSet\\ Control\\ DeviceGuard\\ Scenarios\\ HypervisorEnforcedCodeIntegrity" ,
453- "/v" ,
454- "Enabled" ,
455- "/t" ,
456- "REG_DWORD" ,
457- "/d" ,
458- "1" ,
459- "/f" ,
460- ] )
461- . run ( )
462- . await ?;
463-
464- agent. reboot ( ) . await ?;
465- let agent = vm. wait_for_reset ( ) . await ?;
466- let shell = agent. windows_shell ( ) ;
467-
468- // Verify VBS is running
469- let output = cmd ! ( shell, "systeminfo" ) . output ( ) . await ?;
470- let output_str = String :: from_utf8_lossy ( & output. stdout ) ;
471- assert ! ( output_str. contains( "Virtualization-based security: Status: Running" ) ) ;
472- let output_running = & output_str[ output_str. find ( "Services Running:" ) . unwrap ( ) ..] ;
473- assert ! ( output_running. contains( "Credential Guard" ) ) ;
474- assert ! ( output_running. contains( "Hypervisor enforced Code Integrity" ) ) ;
475-
476- agent. power_off ( ) . await ?;
477- vm. wait_for_clean_teardown ( ) . await ?;
478- Ok ( ( ) )
479- }
480-
481478#[ vmm_test_no_agent(
482479 hyperv_openhcl_uefi_x64[ tdx] ( vhd( windows_datacenter_core_2025_x64) ) ,
483480 hyperv_openhcl_uefi_x64[ snp] ( vhd( windows_datacenter_core_2025_x64) ) ,
0 commit comments