VirtualBox

Ticket #12458 (closed defect: worksforme)

Opened 9 years ago

Last modified 6 years ago

Vbox 4.3.4 not starting 64 bit guests

Reported by: Nils Owned by:
Component: other Version: VirtualBox 4.3.4
Keywords: 64bit Cc:
Guest type: Linux Host type: Linux

Description

Debian 64 bit host, debian 64 bit guest. Vbox 4.2 ran everything fine Vbox 4.3.4 didn't start the 64 bit guests. It also (in the settings) didn't even have the option of selecting 64 bit guests. Starting the VM let it run Grub, and then it hung after the message about loading the initial ramdisk. Compiling the kernel modules didn't change anything (except allow the kernel module to load via modprobe) Downgrading to 4.2 ran everything fine again.

Attachments

VBox.log.3 Download (75.9 KB) - added by Nils 9 years ago.
Log file from boot attempt
ms7521_bios.txt Download (20.8 KB) - added by Nils 9 years ago.
ms7521 dmidecode output
VBox.log Download (78.9 KB) - added by Nils 9 years ago.
4.3.4 Logfile after VBoxManage modifyvm dmin64 --longmode on
VBox.log-4.3.6 Download (76.1 KB) - added by Nils 9 years ago.
4.3.6 / i386 host kernel / amd64 guest
VBoxSVC.log Download (3.3 KB) - added by jcespejog 8 years ago.
VBox file from C:\Users\myusr\.VirtualBox
VBox.2.log Download (89.8 KB) - added by jcespejog 8 years ago.
log from my VM
VBoxStartup.log Download (446.8 KB) - added by jcespejog 8 years ago.
startup log from my vm

Change History

Changed 9 years ago by Nils

Log file from boot attempt

comment:1 Changed 9 years ago by frank

Please do

VBoxManage modifyvm dmin64 --longmode on

I wonder how this VM could be boot in 64-bit mode on your 32-bit host because the OS type you selected is 'Debian' (a 32-bit guest type) and not 'Debian_64' (a 64-bit guest type).

comment:2 Changed 9 years ago by Nils

The host is a 64 bit Debian... Processor is a Q9550s Quad Core. I could not select a 64 bit guest when I had 4.3.4 installed, even though the guest images were 64 bit.

longmode doesn't seem to exist in 4.2:

# VBoxManage modifyvm dmin64 --longmode on gives... VBoxManage: error: Unknown option: --longmode

comment:3 Changed 9 years ago by frank

The --longmode option was introduced with VBox 4.3.0. With VBox 4.2.x, you can only execute 64-bit guests if you selected an 64-bit OS type if you run VBox on a 32-bit host. On a 64-bit host, with VBox 4.2.x you was able to execute a 64-bit guest even if you selected a normal 32-bit guest OS type (a name without _64).

According to the VBox.log file you provided your host runs in 32-bit mode (it has PAE enabled but still, each address space is 32-bit).

And you are currently not able to select a 64-bit guest OS type because of the following line in the VBox.log file:

HMR3Init: Falling back to raw-mode: VT-x is disabled in the BIOS for Safer-Mode/Trusted Extensions.

So it's actually a BIOS setting which prevents you from enabling VT-x.

comment:4 Changed 9 years ago by Nils

Linux blackbox 3.2.0-4-686-pae #1 SMP Debian 3.2.51-1 i686 GNU/Linux ...I've attached the dmidecode output

Changed 9 years ago by Nils

ms7521 dmidecode output

comment:5 Changed 9 years ago by Nils

Here is the result after changing to 4.3.4 and doing the VBoxManage modifyvm dmin64 --longmode on:

Failed to open a session for the virtual machine dmin64.

VT-x is disabled in the BIOS for Safer-Mode/Trusted Extensions. (VERR_VMX_MSR_SMX_VMXON_DISABLED).

Result Code: NS_ERROR_FAILURE (0x80004005) Component: Console Interface: IConsole {8ab7c520-2442-4b66-8d74-4ff1e195d2b6}

...strange thing is, I don't see ANYTHING related to VT-x in the BIOS settings...

Changed 9 years ago by Nils

4.3.4 Logfile after VBoxManage modifyvm dmin64 --longmode on

comment:6 Changed 9 years ago by Nils

According to cpuinfo the extensions are enabled (vmx):

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 nx lm constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm dtherm tpr_shadow vnmi flexpriority

comment:7 Changed 9 years ago by frank

Your box runs in 32-bit mode. The DMI output does not provide additional information. But the real problem is that with VBox 4.3.4 VBox cannot use VT-x on your host while it wasn't a problem with 4.2.20.

comment:8 Changed 9 years ago by Nils

Some info at  http://blog.stefan-macke.com/2012/07/01/vboxmanage-error-vt-x-features-locked-or-unavailable-in-msr-verr_vmx_msr_locked_or_disabled/

From lscpu:
Architecture:          i686
CPU op-mode(s):        32-bit, 64-bit
nils@blackbox:~$ sudo modprobe msr
nils@blackbox:~$ sudo rdmsr 0x3a
5

comment:9 Changed 9 years ago by Nils

IRC Help:

Tekn0	in the SMX case, VirtualBox thinks your CPU is in SMX mode which it probably is (CR4. SMXE) and checks the SMX VT-x allowed bit. Perhaps something goes wrong here.
Tekn0	SMX= Safer Mode Extensions part of Trusted Extensions (TXT)
Tekn0	You could check your BIOS for TXT/SMX and see if that's set

comment:10 Changed 9 years ago by ramshankar

Part of the problem is with VirtualBox... and Intel. The problem is there is no way to tell if the CPU is in SMX mode or not. If anyone finds a legal, reliable way to do this, do let me know ;)

VirtualBox 4.3, over ambitiously treats CR4.SMXE bit to mean the CPU is in SMX mode, which strictly speak is not correct. That bit only indicates that SMX mode can be used but not whether the CPU is in SMX mode or not. Normally, this bit should not be set unless the OS runs in trusted boot SMX mode.

We might relax our checks a bit but the problem really is that Intel doesn't provide software with the necessary information to do proper sanity checking and error reporting in this area.

In fact, VMXON will #GP fault if invoked with the wrong combination of bits, so unless something fails earlier, VirtualBox might crash your host kernel if the CPU is really in SMX mode but the BIOS (through the feature MSR) prevents using VT-x in SMX mode.

Last edited 9 years ago by ramshankar (previous) (diff)

comment:11 Changed 9 years ago by LocutusOfBorg

I'm affected too by this bug, will anybody please relax the check for the intel architectures? I'm forced to use 4.2.20

comment:12 Changed 9 years ago by frank

Should be fixed in VBox 4.3.6. Please confirm.

comment:13 Changed 9 years ago by Nils

 http://download.virtualbox.org/virtualbox/debian/ wheezy/contrib virtualbox-4.3 i386 4.3.6-91406~Debian~wheezy [69.9 MB]

VT-x/AMD-V hardware acceleration is not available on your system. Your 64-bit guest will fail to detect a 64-bit CPU and will not be able to boot.

...and then it stops (as announded) after the "Loading initial ramdisk" as before

comment:14 Changed 9 years ago by frank

Nils, please could you attach a VBox.log file from such a VM session running on VBox 4.3.6? Thanks!

Changed 9 years ago by Nils

4.3.6 / i386 host kernel / amd64 guest

comment:15 Changed 9 years ago by frank

The reason is Falling back to raw-mode: VT-x is disabled in the BIOS for Safer-Mode/Trusted Extensions.

comment:16 Changed 9 years ago by frank

  • Status changed from new to closed
  • Resolution set to worksforme

Therefore it's a BIOS setting. Closing.

comment:17 Changed 8 years ago by Nils

  • Status changed from closed to reopened
  • Resolution worksforme deleted

Sorry, I don't agree with this resolution:  https://stackoverflow.com/questions/11116704/check-if-vt-x-is-activated-without-having-to-reboot-in-linux

"On Intel, which has the most complicated logic, kvm-ok checks that if bit 0 of rdmsr 0x3a (the lock bit) is set, bit 2 (which allows virt use outside of SMX mode, something to do with trusted boot) must also be set. If the output of rdmsr 0x3a is anything but 1 or 3, you will be able to use kvm. kvm will set bit 2 of the msr if necessary, I expect virtualbox and the rest have the same logic."

This post would agree with that:  http://www.thomas-krenn.com/en/wiki/Activating_the_Intel_VT_Virtualization_Feature

Quotes: Do the BIOS Settings permit VT-x usage?

If the BIOS will permit the usage of VT-x can be determined with the help of the rdmsr (read msr) utility from the msr-tools tool package[3] MSR stands for machine-specific register, although sometimes model-specific register is used.[4] MSRs are used to set specific values for the hardware in use or to transfer values between the BIOS and the kernel.

The VT-x lock function is stored in the IA32_FEATURE_CONTROL machine-specific register (MSR address 0x3a).[5] This MSR contains the following three bits:[6]

Bit 0: lock bit Bit 1: activate VMXON in SMX mode Bit 2: activate VMXON outside of SMX mode

The BIOS must set Bits 1 and 2, or all three bits (including Bit 0) so that VT-x support will be enabled.

Example 1: Deactivating Intel VT-x in the BIOS If Intel VT-x has been deactivated in the BIOS (or the server was not turned off and back on after the setting was activated), the rdmsr 0x3a command will return 1 (meaning that only Bit 0 has been set).

Example 2: Activating Intel VT-x in the BIOS With the example server (an Intel SR2500), the rdmsr 0x3a command returns 5, if Intel VT-x has been activated in the BIOS (Bits 0 and 2 have therefore been set).


root@blackbox:~# uname -a Linux blackbox 3.2.0-4-686-pae #1 SMP Debian 3.2.54-2 i686 GNU/Linux root@blackbox:~# modprobe msr root@blackbox:~# rdmsr 0x3a 5 root@blackbox:~#


...so either Bit1 is not set and Vbox needs it, or Vbox is reading something wrong. And Vbox 4.3 is handling it differently from Vbox 4.2 because that works fine with the PAE Kernel.

Sorry to bug you, but this issue still doesn't make 100% sense to me and I'd like to understand WHAT exactly in the BIOS is causing this as I can't find any other settings to change there.

comment:18 Changed 8 years ago by Nils

Sorry for the misformatting...

root@blackbox:~# uname -a
Linux blackbox 3.2.0-4-686-pae #1 SMP Debian 3.2.54-2 i686 GNU/Linux
root@blackbox:~# modprobe msr
root@blackbox:~# rdmsr 0x3a
5
root@blackbox:~#

comment:19 Changed 8 years ago by Nils

Info from IRC Diskussion

Tekn0	The MSR has nothing to do with whether SMX mode is being used or not, it only allows VMXON to be used in SMX mode. You first need to check the corresponding bit depending on which mode the CPU is in, but that is not possible.
Tekn0	The "hint" we use is CR4.SMXE bit but that too is not sufficient proof that the CPU is in SMX mode.
MichalN	CQ: The short story is that it's possible to determine when the CPU is not in SMX mode (CR4.SMXE not set) but not whether it really is in SMX mode (CR4.SMXE set).
Tekn0	Basically 4.2.x ignored SMX altogether and that worked in most cases. Unfortunately, we tried to tighten things up with 4.3 to get things right, but apparently not good enough.
MichalN	The design is incredibly stupid, when CR4.SMXE is set then all we know is that the CPU may or may not be in SMX mode.
Tekn0	The "workaround" we will have to put in place is to simply assume the CPU is never in SMX mode and go ahead and try VMXON. If it crashes your system, we can't do much about it.
Tekn0	We could make it slightly nicer by 'predicting' we may be in SMX depending on CR4. but probably not enough

comment:20 Changed 8 years ago by ramshankar

Please try VBox 4.3.8 RC1  http://download.virtualbox.org/virtualbox/4.3.8_RC1.

If that doesn't work, I'll provide you with a trunk build where I've relaxed the SMX checks which just goes ahead and try it regardless.

comment:21 Changed 8 years ago by frank

Actually better test VBox 4.3.8 which was released yesterday.

comment:22 Changed 8 years ago by frank

  • Status changed from reopened to closed
  • Resolution set to fixed

No response, closing.

comment:23 Changed 8 years ago by jcespejog

  • Status changed from closed to reopened
  • Resolution fixed deleted

comment:24 Changed 8 years ago by jcespejog

Hello guys My VB 4.3.18 (on windows 7.Pro x64 sp1 host) is no longer supporting 64bits guest systems, First I could create/load 64 bit VM but after I reinstalled VB, 64 bit guest system couldn't load and I realized VB does not allow me to create new 64bit guest system and the previous 64 bit guest system I successfully created was being recognized as 32 bit. please help me on this issue... What is happening? how can this be corrected? why my VB is no longer supporting 64 bits? see bellow some notes about this issue and please let me know if there is something to do to get VB fully functional supporting 64 bits thanks

  1. VB v4.3.18 successfully installed
  2. I was able to successfully create and load a windows 7.Pro-x64 guest (which was named as 'Win7x64_Template')
  3. Since USB was not being recognized on the guest I reinstalled VB v4.3.18 (using 'run as administrator' option)
  4. I tried to load the guest ('Win7x64_Template') but it couldn't load displaying a message loop 'Windows is loading files'. After some research, I realized that it is due VB is not supporting 64bits. Indeed, I could see VB doesn't allow to create 64 bit VM; also the 64 bit VM I previously created ('Win7x64_Template') was not being recognized as 64 bit system but 32 bit. Besides, 'acceleration' options is grayed-out on settings of VM 'Win7x64_Template'
  5. I found on internet that issue w/ 64 bit support is related to Virtualization support on BIOS ('Virtualization technology' option). However, I also found this BIOS option comes deactivated by default and it is not mandatory for 64 bit support (BTW that option was deactivated on my BIOS). Notice 64 bit support issue persist with either 'Virtualization technology' BIOS option activated or deactivated. So, why 64 bit is no longer supported on my VB if I made no changes on HW nor any configuration (like BIOS level) and considering that this was working prety well prior I reinstalled VB?
  6. I am using a laptop proBook 6460b
  7. Per internet article, I tried to downgrade VBox from 4.3.18 to '4.2.18', so I did it and afterwards (with either 'Virtualization technology' BIOS option ativated or deactivated) I could see 64 bit system support was available again, however I couldn't load a 64bit VM ('Win7x64_Template') and an error message pops-up ('VT-x/AMD-V hardware acceleration has been enabled, but is not operational. Your 64-bit guest will fail to detect a 64-bit CPU and will not be able to boot. Please ensure that you have enabled VT-x/AMD-V properly in the BIOS of your host computer.)
Last edited 8 years ago by jcespejog (previous) (diff)

comment:25 follow-up: ↓ 26 Changed 8 years ago by frank

jcespejog, I don't know which template you are talking about but to start a Windows 7 guest in 64-bit mode you need to set the guest OS type in the VM settings to Windows 7 (64-bit) -- did you do that?

comment:26 in reply to: ↑ 25 Changed 8 years ago by jcespejog

@frank thanks for replying Apologize, I think my explanation wasn't clear enough.. I just updated it, hope it is clear enough now

BTW, that template is the WIN7x64 VM I successfully created and loaded in VB (of course I set windows 7 x64 prior to create that VM).... the problem is that once I reinstalled VB that VM couldn't be loaded and unfortunately x64 was no longer supported... please let me know if any question on my explanation....

Replying to frank:

jcespejog, I don't know which template you are talking about but to start a Windows 7 guest in 64-bit mode you need to set the guest OS type in the VM settings to Windows 7 (64-bit) -- did you do that?

comment:27 follow-up: ↓ 28 Changed 8 years ago by frank

Could you actually answer my question: Which OS type did you chose for your VM? Did I get you correctly that 64-bit OS types are not available in your VirtualBox installation?

comment:28 in reply to: ↑ 27 Changed 8 years ago by jcespejog

I chose Windows 7 x64 when I created my VM and it worked as expected.... yes, now (after VB was reinstalled) 64 bit OS types are not available in VBox

Replying to frank:

Could you actually answer my question: Which OS type did you chose for your VM? Did I get you correctly that 64-bit OS types are not available in your VirtualBox installation?

comment:29 follow-up: ↓ 30 Changed 8 years ago by frank

Please be aware that for running 64-bit guests, VirtualBox strictly depends on VT-x/AMD-V on the host. If the 64-bit OS type is not available that strongly hints that VT-x is deactivated on your system. Either in the BIOS or by any other system software. So please double check that VT-x is enabled in your BIOS and that you don't run any other hypervisor in parallel to VirtualBox.

Also, please attach a VBox.log file for such a VM which can't run in 64-bit mode anymore, this will show us the configuration of your system.

Changed 8 years ago by jcespejog

VBox file from C:\Users\myusr\.VirtualBox

Changed 8 years ago by jcespejog

log from my VM

Changed 8 years ago by jcespejog

startup log from my vm

comment:30 in reply to: ↑ 29 Changed 8 years ago by jcespejog

#1 Please keep in mind VBOX 4.3.18 was working fine w/ 64 support on my host system, however it stopped working w/64 bit support after VBox was reinstalled. This is why I think there is nothing to change on my BIOS, #2 in the other hand w/ earlier version of Vbox (4.2.18), I can see 64 bit systems are supported. Indeed 'acceleration' tab (on setting of the VM) is grayed-out

what do you mean w/ 'don't run any other hypervisor in parallel to VirtualBox.'??

I attached the 3 log files I found on my Vbox

thanks in advance for your help!

Replying to frank:

Please be aware that for running 64-bit guests, VirtualBox strictly depends on VT-x/AMD-V on the host. If the 64-bit OS type is not available that strongly hints that VT-x is deactivated on your system. Either in the BIOS or by any other system software. So please double check that VT-x is enabled in your BIOS and that you don't run any other hypervisor in parallel to VirtualBox.

Also, please attach a VBox.log file for such a VM which can't run in 64-bit mode anymore, this will show us the configuration of your system.

comment:31 Changed 8 years ago by frank

See log file: "HMR3Init: Falling back to raw-mode: VT-x is disabled in the BIOS.". Again, please double-check your BIOS settings!

comment:32 Changed 8 years ago by jcespejog

@Frank you right!, I just enabled virtualization parameters into the BIOS and now my VB can support 64 bit (I just openned a 64-bit VM with no issues). Thank you so much I really appreciated!!! My issue can be considered as closed

However, I am still kind of confused.. I don't know why my VB stopped supporting 64 bit if I made NO changes on BIOS at all before 64 bit issue arises Does it mean VB was supporting 64 bits while BIOS virtualization parameters were inactivated?

comment:33 follow-up: ↓ 34 Changed 8 years ago by frank

  • Status changed from reopened to closed
  • Resolution set to fixed

No, VBox did never support 64-bit guests without VT-x. One explanation could be that the BIOS setting was re-set by a tool or perhaps the BIOS detected a problem and felt back to default settings.

comment:34 in reply to: ↑ 33 Changed 8 years ago by jcespejog

Replying to frank:

No, VBox did never support 64-bit guests without VT-x. One explanation could be that the BIOS setting was re-set by a tool or perhaps the BIOS detected a problem and felt back to default settings.

that would explain it..... thank you

#1 I am having issue with Usb as it is not being recognized... can I ask you here? i posted the question/issue on  https://forums.virtualbox.org/viewtopic.php?f=6&t=57371&p=304042#p304042

comment:35 Changed 6 years ago by EliotLeo

Just upgraded to 5.0, same exact issue. Went into BIOS and Virtualization is still enabled. Was able to make 64bit OSes before.

comment:36 Changed 6 years ago by EliotLeo

  • Status changed from closed to reopened
  • Resolution fixed deleted

comment:37 Changed 6 years ago by EliotLeo

The error's on my end, downgrading and the error was still there. Trying to find what suddenly caused the change though.

comment:38 Changed 6 years ago by frank

  • Status changed from reopened to closed
  • Resolution set to worksforme

comment:39 Changed 6 years ago by EliotLeo

VMARE enabled hyper-v. Disabling that fixed the issue.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use