ERROR: std::bad_alloc
Posted: 9. Oct 2015, 17:16
Possible cause "kernel: warning: `VBoxHeadless' uses 32-bit capabilities (legacy support in use)" - looking for a solution.
Situation: an OVA (OVF 2.0 with manifest) exported on a Windows Server with VB 5.0.6 imports successfully on a minimal CentOS 7 with VB 5.0.6 (Linux server1 3.10.0-229.14.1.el7.x86_64 #1 SMP Tue Sep 15 15:05:51 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux), but when running (VBoxHeadless --startvm ”<vmName>” --vrde=off), it always gives an error when the guest OS is 64 bit:
Oracle VM VirtualBox Headless Interface 5.0.6
(C) 2008-2015 Oracle Corporation
All rights reserved.
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
THERE iS ONE INTERESTING BIT in: /var/log/messages
Oct 9 16:06:55 server1 kernel: vboxdrv: module verification failed: signature and/or required key missing - tainting kernel
Oct 9 16:06:55 server1 kernel: vboxdrv: TSC mode is Invariant, tentative frequency 2393852264 Hz
Oct 9 16:06:55 server1 kernel: VBoxNetFlt: Successfully started.
Oct 9 16:06:55 server1 kernel: VBoxNetAdp: Successfully started.
Oct 9 16:06:55 server1 kernel: VBoxPciLinuxInit
Oct 9 16:06:55 server1 kernel: vboxpci: IOMMU not found (not registered)
Oct 9 16:32:48 server1 kernel: warning: `VBoxHeadless' uses 32-bit capabilities (legacy support in use)
Oct 9 16:32:48 server1 kernel: SUPR0GipMap: fGetGipCpu=0x3
Here is the server install script used:
yum upgrade
yum install gcc kernel-devel kernel-headers dkms wget
cd /etc/yum.repos.d/
wget downloadvirtualboxorg/virtualbox/rpm/el/virtualbox.repo
yum install VirtualBox-5.0
useradd virtualbox
usermod -G vboxusers virtualbox
reboot
systemctl status vboxdrv
/sbin/rcvboxdrv setup
su virtualbox
mkdir /home/virtualbox/ova
VBoxManage setproperty machinefolder /home/virtualbox/vms
VBoxManage import /home/virtualbox/ova/<vmName>.ova --dry-run
if different settings are needed, rerun till happy
VBoxManage import /home/virtualbox/ova/<vmName>.ova
VBoxManage list bridgedifs
VBoxManage modifyvm "<vmName>" --nic1 bridged --bridgeadapter1 em1
VBoxManage list vms
nohup VBoxHeadless --startvm ”<vmName>” --vrde=off &
VBoxManage list runningvms
The /var/log/vbox-install.log looks fine, except for:
echo >&2 " ERROR: Kernel configuration is invalid."; \
echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it.";
Situation: an OVA (OVF 2.0 with manifest) exported on a Windows Server with VB 5.0.6 imports successfully on a minimal CentOS 7 with VB 5.0.6 (Linux server1 3.10.0-229.14.1.el7.x86_64 #1 SMP Tue Sep 15 15:05:51 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux), but when running (VBoxHeadless --startvm ”<vmName>” --vrde=off), it always gives an error when the guest OS is 64 bit:
Oracle VM VirtualBox Headless Interface 5.0.6
(C) 2008-2015 Oracle Corporation
All rights reserved.
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
THERE iS ONE INTERESTING BIT in: /var/log/messages
Oct 9 16:06:55 server1 kernel: vboxdrv: module verification failed: signature and/or required key missing - tainting kernel
Oct 9 16:06:55 server1 kernel: vboxdrv: TSC mode is Invariant, tentative frequency 2393852264 Hz
Oct 9 16:06:55 server1 kernel: VBoxNetFlt: Successfully started.
Oct 9 16:06:55 server1 kernel: VBoxNetAdp: Successfully started.
Oct 9 16:06:55 server1 kernel: VBoxPciLinuxInit
Oct 9 16:06:55 server1 kernel: vboxpci: IOMMU not found (not registered)
Oct 9 16:32:48 server1 kernel: warning: `VBoxHeadless' uses 32-bit capabilities (legacy support in use)
Oct 9 16:32:48 server1 kernel: SUPR0GipMap: fGetGipCpu=0x3
Here is the server install script used:
yum upgrade
yum install gcc kernel-devel kernel-headers dkms wget
cd /etc/yum.repos.d/
wget downloadvirtualboxorg/virtualbox/rpm/el/virtualbox.repo
yum install VirtualBox-5.0
useradd virtualbox
usermod -G vboxusers virtualbox
reboot
systemctl status vboxdrv
/sbin/rcvboxdrv setup
su virtualbox
mkdir /home/virtualbox/ova
VBoxManage setproperty machinefolder /home/virtualbox/vms
VBoxManage import /home/virtualbox/ova/<vmName>.ova --dry-run
if different settings are needed, rerun till happy
VBoxManage import /home/virtualbox/ova/<vmName>.ova
VBoxManage list bridgedifs
VBoxManage modifyvm "<vmName>" --nic1 bridged --bridgeadapter1 em1
VBoxManage list vms
nohup VBoxHeadless --startvm ”<vmName>” --vrde=off &
VBoxManage list runningvms
The /var/log/vbox-install.log looks fine, except for:
echo >&2 " ERROR: Kernel configuration is invalid."; \
echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it.";