You are not logged in.

#1 2024-07-21 11:32:24

BollerwagenPicard
Member
From: Grimma | Germany
Registered: 2021-07-30
Posts: 36

Oracle VirtualBox nested virtualization not working

I am not sure if I have chosen the right category in the forum, but I am optimistic.

I have been having a problem with Virtuelbox on my Intel system for some time now. Since I rarely recreate virtual systems, I'm not sure when the problem started.
Unfortunately, I can no longer select the option for passing through the virtualization functions.

However, I would like to use this for a Windows VM.

% LANG=C virt-host-validate
  QEMU: Checking for hardware virtualization                                 : PASS
  QEMU: Checking if device '/dev/kvm' exists                                 : PASS
  QEMU: Checking if device '/dev/kvm' is accessible                          : PASS
  QEMU: Checking if device '/dev/vhost-net' exists                           : PASS
  QEMU: Checking if device '/dev/net/tun' exists                             : PASS
  QEMU: Checking for cgroup 'cpu' controller support                         : PASS
  QEMU: Checking for cgroup 'cpuacct' controller support                     : PASS
  QEMU: Checking for cgroup 'cpuset' controller support                      : PASS
  QEMU: Checking for cgroup 'memory' controller support                      : PASS
  QEMU: Checking for cgroup 'devices' controller support                     : WARN (Enable 'devices' in kernel Kconfig file or mount/enable cgroup controller in your system)
  QEMU: Checking for cgroup 'blkio' controller support                       : PASS
  QEMU: Checking for device assignment IOMMU support                         : PASS
  QEMU: Checking if IOMMU is enabled by kernel                               : PASS
  QEMU: Checking for secure guest support                                    : WARN (Unknown if this platform has Secure Guest support)
   LXC: Checking for Linux >= 2.6.26                                         : PASS
   LXC: Checking for namespace 'ipc'                                         : PASS
   LXC: Checking for namespace 'mnt'                                         : PASS
   LXC: Checking for namespace 'pid'                                         : PASS
   LXC: Checking for namespace 'uts'                                         : PASS
   LXC: Checking for namespace 'net'                                         : PASS
   LXC: Checking for namespace 'user'                                        : PASS
   LXC: Checking for cgroup 'cpu' controller support                         : PASS
   LXC: Checking for cgroup 'cpuacct' controller support                     : PASS
   LXC: Checking for cgroup 'cpuset' controller support                      : PASS
   LXC: Checking for cgroup 'memory' controller support                      : PASS
   LXC: Checking for cgroup 'devices' controller support                     : FAIL (Enable 'devices' in kernel Kconfig file or mount/enable cgroup controller in your system)
   LXC: Checking for cgroup 'freezer' controller support                     : FAIL (Enable 'freezer' in kernel Kconfig file or mount/enable cgroup controller in your system)
   LXC: Checking for cgroup 'blkio' controller support                       : PASS
   LXC: Checking if device '/sys/fs/fuse/connections' exists                 : PASS
    CH: Checking for hardware virtualization                                 : PASS
    CH: Checking if device '/dev/kvm' exists                                 : PASS
    CH: Checking if device '/dev/kvm' is accessible                          : PASS
% uname -a
Linux [hostname removed] 6.9.9-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 12 Jul 2024 00:06:53 +0000 x86_64 GNU/Linux
% lsmod | grep vbox
vboxnetadp             32768  0
vboxnetflt             40960  0
vboxdrv               655360  2 vboxnetadp,vboxnetflt
% pikaur -Qs virtualbox    
local/libvirt 1:10.5.0-1
    API for controlling virtualization engines (openvz,kvm,qemu,virtualbox,xen,etc)
local/linux 6.9.9.arch1-1
    The Linux kernel and modules
local/vdfuse 82a-12
    A FUSE module for mounting VirtualBox disk images (VDI/VMDK/VHD) on the host
local/virtualbox 7.0.20-1
    Powerful x86 virtualization for enterprise as well as home use
local/virtualbox-ext-oracle 7.0.20-1
    Oracle VM VirtualBox Extension Pack
local/virtualbox-guest-iso 7.0.20-1
    The official VirtualBox Guest Additions ISO image
local/virtualbox-host-dkms 7.0.20-1
    VirtualBox Host kernel modules sources
local/virtualbox-sdk 7.0.20-1
    VirtualBox Software Developer Kit (SDK)
% cat /proc/cmdline
initrd=intel-ucode.img initrd=\initramfs-linux.img clocksource=hpet root=UUID=[UUID removed] rootflags=subvol=/__current/ArchLinux rw resume=UUID=[UUID removed] video=efifb:auto nvidia-drm.modeset=1 intel_iommu=on
% LANG=C lscpu
Architecture:             x86_64
  CPU op-mode(s):         32-bit, 64-bit
  Address sizes:          46 bits physical, 48 bits virtual
  Byte Order:             Little Endian
CPU(s):                   24
  On-line CPU(s) list:    0-23
Vendor ID:                GenuineIntel
  Model name:             Intel(R) Xeon(R) CPU E5-2640 0 @ 2.50GHz
    CPU family:           6
    Model:                45
    Thread(s) per core:   2
    Core(s) per socket:   6
    Socket(s):            2
    Stepping:             7
    CPU(s) scaling MHz:   50%
    CPU max MHz:          3000.0000
    CPU min MHz:          1200.0000
    BogoMIPS:             5002.38
    Flags:                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonst
                          op_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm epb pti ssbd ibrs ibpb stibp tpr_shado
                          w flexpriority ept vpid xsaveopt dtherm ida arat pln pts vnmi md_clear flush_l1d
Virtualization features:  
  Virtualization:         VT-x
Caches (sum of all):      
  L1d:                    384 KiB (12 instances)
  L1i:                    384 KiB (12 instances)
  L2:                     3 MiB (12 instances)
  L3:                     30 MiB (2 instances)
NUMA:                     
  NUMA node(s):           2
  NUMA node0 CPU(s):      0-5,12-17
  NUMA node1 CPU(s):      6-11,18-23
Vulnerabilities:          
  Gather data sampling:   Not affected
  Itlb multihit:          KVM: Mitigation: VMX disabled
  L1tf:                   Mitigation; PTE Inversion; VMX conditional cache flushes, SMT vulnerable
  Mds:                    Mitigation; Clear CPU buffers; SMT vulnerable
  Meltdown:               Mitigation; PTI
  Mmio stale data:        Unknown: No mitigations
  Reg file data sampling: Not affected
  Retbleed:               Not affected
  Spec rstack overflow:   Not affected
  Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl
  Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization
  Spectre v2:             Mitigation; Retpolines; IBPB conditional; IBRS_FW; STIBP conditional; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected
  Srbds:                  Not affected
  Tsx async abort:        Not affected
 % egrep -c '(vmx|svm)' /proc/cpuinfo
48
# dmesg | grep -i vbox
[   11.170476] vboxdrv: Found 24 processor cores/threads
[   11.191358] vboxdrv: TSC mode is Invariant, tentative frequency 2499975451 Hz
[   11.191365] vboxdrv: Successfully loaded version 7.0.20 r163906 (interface 0x00330004)
[   11.233288] VBoxNetFlt: Successfully started.
[   11.239787] VBoxNetAdp: Successfully started.

My user is part of vboxusers

I am open to suggestions for solutions. Many thanks in advance

Offline

#2 2024-07-21 11:43:20

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,873

Re: Oracle VirtualBox nested virtualization not working

virt-host-validate is a command from libvirt, not from virtualbox .

are you using libvirt / virtmanager to administer virtualbox VMs ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2024-07-21 11:51:16

BollerwagenPicard
Member
From: Grimma | Germany
Registered: 2021-07-30
Posts: 36

Re: Oracle VirtualBox nested virtualization not working

Lone_Wolf wrote:

are you using libvirt / virtmanager to administer virtualbox VMs ?

only for QEMU but there are currently no QEMU VMs

Lone_Wolf wrote:

virt-host-validate is a command from libvirt, not from virtualbox .

I thought it would still be a good test tool to show the hardware support

Offline

#4 2024-07-22 10:09:55

BollerwagenPicard
Member
From: Grimma | Germany
Registered: 2021-07-30
Posts: 36

Re: Oracle VirtualBox nested virtualization not working

I did run: VBoxManage modifyvm MeinWindows11 --nested-hw-virt on

no errors in bash... VBox logs for VT-x looks like this:

00:00:02.093946 HM: HMR3Init: VT-x w/ nested paging and unrestricted guest execution hw support
00:00:02.546631 HM: Using VT-x implementation 3.0
00:00:02.546751 HM: VT-x/AMD-V init method: Global
00:00:02.551749 *********************** VT-x features ***********************
00:00:02.551750 Nested hardware virtualization - VMX features
00:00:02.551750   Mnemonic - Description                                  = guest (host)
00:00:02.551751   VMX - Virtual-Machine Extensions                        = 1 (1)
00:00:02.551752   InsOutInfo - INS/OUTS instruction info.                 = 1 (1)
00:00:02.551752   ExtIntExit - External interrupt exiting                 = 1 (1)
00:00:02.551753   NmiExit - NMI exiting                                   = 1 (1)
00:00:02.551753   VirtNmi - Virtual NMIs                                  = 1 (1)
00:00:02.551754   PreemptTimer - VMX preemption timer                     = 0 (1)
00:00:02.551755   PostedInt - Posted interrupts                           = 0 (0)
00:00:02.551755   IntWindowExit - Interrupt-window exiting                = 1 (1)
00:00:02.551756   TscOffsetting - TSC offsetting                          = 1 (1)
00:00:02.551757   HltExit - HLT exiting                                   = 1 (1)
00:00:02.551757   InvlpgExit - INVLPG exiting                             = 1 (1)
00:00:02.551758   MwaitExit - MWAIT exiting                               = 1 (1)
00:00:02.551758   RdpmcExit - RDPMC exiting                               = 1 (1)
00:00:02.551759   RdtscExit - RDTSC exiting                               = 1 (1)
00:00:02.551759   Cr3LoadExit - CR3-load exiting                          = 1 (1)
00:00:02.551760   Cr3StoreExit - CR3-store exiting                        = 1 (1)
00:00:02.551761   TertiaryExecCtls - Activate tertiary controls           = 0 (0)
00:00:02.551761   Cr8LoadExit  - CR8-load exiting                         = 1 (1)
00:00:02.551762   Cr8StoreExit - CR8-store exiting                        = 1 (1)
00:00:02.551762   UseTprShadow - Use TPR shadow                           = 1 (1)
00:00:02.551763   NmiWindowExit - NMI-window exiting                      = 1 (1)
00:00:02.551764   MovDRxExit - Mov-DR exiting                             = 1 (1)
00:00:02.551764   UncondIoExit - Unconditional I/O exiting                = 1 (1)
00:00:02.551765   UseIoBitmaps - Use I/O bitmaps                          = 1 (1)
00:00:02.551766   MonitorTrapFlag - Monitor Trap Flag                     = 0 (1)
00:00:02.551766   UseMsrBitmaps - MSR bitmaps                             = 1 (1)
00:00:02.551767   MonitorExit - MONITOR exiting                           = 1 (1)
00:00:02.551767   PauseExit - PAUSE exiting                               = 1 (1)
00:00:02.551768   SecondaryExecCtl - Activate secondary controls          = 1 (1)
00:00:02.551769   VirtApic - Virtualize-APIC accesses                     = 1 (1)
00:00:02.551769   Ept - Extended Page Tables                              = 1 (1)
00:00:02.551770   DescTableExit - Descriptor-table exiting                = 1 (1)
00:00:02.551770   Rdtscp - Enable RDTSCP                                  = 1 (1)
00:00:02.551771   VirtX2ApicMode - Virtualize-x2APIC mode                 = 0 (1)
00:00:02.551772   Vpid - Enable VPID                                      = 1 (1)
00:00:02.551772   WbinvdExit - WBINVD exiting                             = 1 (1)
00:00:02.551773   UnrestrictedGuest - Unrestricted guest                  = 1 (1)
00:00:02.551773   ApicRegVirt - APIC-register virtualization              = 0 (0)
00:00:02.551774   VirtIntDelivery - Virtual-interrupt delivery            = 0 (0)
00:00:02.551775   PauseLoopExit - PAUSE-loop exiting                      = 1 (1)
00:00:02.551775   RdrandExit - RDRAND exiting                             = 0 (0)
00:00:02.551776   Invpcid - Enable INVPCID                                = 0 (0)
00:00:02.551776   VmFuncs - Enable VM Functions                           = 0 (0)
00:00:02.551777   VmcsShadowing - VMCS shadowing                          = 0 (0)
00:00:02.551778   RdseedExiting - RDSEED exiting                          = 0 (0)
00:00:02.551778   PML - Page-Modification Log (PML)                       = 0 (0)
00:00:02.551779   EptVe - EPT violations can cause #VE                    = 0 (0)
00:00:02.551779   ConcealVmxFromPt - Conceal VMX from Processor Trace     = 0 (0)
00:00:02.551780   XsavesXRstors - Enable XSAVES/XRSTORS                   = 0 (0)
00:00:02.551781   ModeBasedExecuteEpt - Mode-based execute permissions    = 0 (0)
00:00:02.551781   SppEpt - Sub-page page write permissions for EPT        = 0 (0)
00:00:02.551782   PtEpt - Processor Trace address' translatable by EPT    = 0 (0)
00:00:02.551782   UseTscScaling - Use TSC scaling                         = 0 (0)
00:00:02.551783   UserWaitPause - Enable TPAUSE, UMONITOR and UMWAIT      = 0 (0)
00:00:02.551784   EnclvExit - ENCLV exiting                               = 0 (0)
00:00:02.551784   LoadIwKeyExit - LOADIWKEY exiting                       = 0 (0)
00:00:02.551785   EntryLoadDebugCtls - Load debug controls on VM-entry    = 1 (1)
00:00:02.551785   Ia32eModeGuest - IA-32e mode guest                      = 1 (1)
00:00:02.551786   EntryLoadEferMsr - Load IA32_EFER MSR on VM-entry       = 1 (1)
00:00:02.551787   EntryLoadPatMsr - Load IA32_PAT MSR on VM-entry         = 1 (1)
00:00:02.551787   ExitSaveDebugCtls - Save debug controls on VM-exit      = 1 (1)
00:00:02.551788   HostAddrSpaceSize - Host address-space size             = 1 (1)
00:00:02.551788   ExitAckExtInt - Acknowledge interrupt on VM-exit        = 1 (1)
00:00:02.551789   ExitSavePatMsr - Save IA32_PAT MSR on VM-exit           = 0 (1)
00:00:02.551790   ExitLoadPatMsr - Load IA32_PAT MSR on VM-exit           = 1 (1)
00:00:02.551790   ExitSaveEferMsr - Save IA32_EFER MSR on VM-exit         = 1 (1)
00:00:02.551791   ExitLoadEferMsr - Load IA32_EFER MSR on VM-exit         = 1 (1)
00:00:02.551791   SavePreemptTimer - Save VMX-preemption timer            = 0 (1)
00:00:02.551792   SecondaryExitCtls - Secondary VM-exit controls          = 0 (0)
00:00:02.551793   ExitSaveEferLma - Save IA32_EFER.LMA on VM-exit         = 1 (1)
00:00:02.551793   IntelPt - Intel PT (Processor Trace) in VMX operation   = 0 (0)
00:00:02.551794   VmwriteAll - VMWRITE to any supported VMCS field        = 0 (0)
00:00:02.551794   EntryInjectSoftInt - Inject softint. with 0-len instr.  = 0 (0)
00:00:02.551795 
00:00:02.551795 ******************* End of VT-x features ********************

but in the windows guest I got thist:

Get-ComputerInfo -property "HyperV*"

HyperVisorPresent                                 : True
HyperVRequirementDataExecutionPreventionAvailable :
HyperVRequirementSecondLevelAddressTranslation    :
HyperVRequirementVirtualizationFirmwareEnabled    :
HyperVRequirementVMMonitorModeExtensions          :

Offline

#5 2024-07-22 10:22:21

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,873

Re: Oracle VirtualBox nested virtualization not working

The last few comments from https://bbs.archlinux.org/viewtopic.php?id=288756 may be relevant .

Try disabling hyper-V support in the windows install and also check 'core isolation' setting of windows defender.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#6 2024-07-27 12:18:54

BollerwagenPicard
Member
From: Grimma | Germany
Registered: 2021-07-30
Posts: 36

Re: Oracle VirtualBox nested virtualization not working

sorry for the late answer... I think it is a misunderstanding

I do not want to route hardware into the VBox, I want to use WSL2 inside a Box... WSL2 need HyperV

so ArchLinux Host --> Vbox --> Windows 11 --> WSL2

Offline

#7 2024-07-27 13:36:13

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,873

Re: Oracle VirtualBox nested virtualization not working

The main reason I posted that was it shows hyper-V causes problems when running in a windows guest VM.

Atleast it's now clear what you meant with nested virtualization as WSL2 is in essence a Virtual Machine running as a linux guest on a windows Host.
The main difference between WSL2 and other VM systems is the hypervisor and the special software MS uses to improve the interaction between host & guest.

Does creating a simple windows VM with default settings using Hyper-V work ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#8 2024-07-27 13:45:32

BollerwagenPicard
Member
From: Grimma | Germany
Registered: 2021-07-30
Posts: 36

Re: Oracle VirtualBox nested virtualization not working

I would like to understand the problem step by step. And I do not understand why the GUI of Virtualbox does not allow me to activate it. regardless of why it does not work in the VM... Because even with the VM that Microsoft provides it does not work on a system where this checkbox works.
thumb.php?image=20240727134201_202407271541.png
Sorry for the german GUI

Offline

#9 2024-07-27 14:18:48

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,873

Re: Oracle VirtualBox nested virtualization not working

Sorry for the german GUI

Try prepending LC_ALL=C  to the start command for the gui.

It seems that is a setting that is disabled by default in the gui.

An old(er) thread  with lots of info https://stackoverflow.com/questions/542 … greyed-out

An example of the command needed to allow selecting the option from gui is at https://www.how2shout.com/how-to/how-to … amd-v.html


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#10 2024-07-27 14:22:57

BollerwagenPicard
Member
From: Grimma | Germany
Registered: 2021-07-30
Posts: 36

Re: Oracle VirtualBox nested virtualization not working

I cannot confirm this, on my laptop with Intel CPU I can activate the function in the GUI and the system is installed very similarly with regard to VBox.

Offline

#11 2024-07-27 14:28:39

-thc
Member
Registered: 2017-03-15
Posts: 639

Re: Oracle VirtualBox nested virtualization not working

Since your processor (Intel(R) Xeon(R) CPU E5-2640 0 @ 2.50GHz) was released 12 years ago it may not support a critical virtualization feature named VMCS - which was introduced in 2013.

Without VMCS the option in VirtualBox will stay grayed out.

Offline

#12 2024-07-27 14:47:15

BollerwagenPicard
Member
From: Grimma | Germany
Registered: 2021-07-30
Posts: 36

Re: Oracle VirtualBox nested virtualization not working

I agree with you based on the logs, but I have read that vPro processors have VMCS and Intel lists the processor as vPro.
And from my memory, it worked in the past... But okay, dependencies change too

Offline

Board footer

Powered by FluxBB