Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Can't start virtual machine...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
vcmota
Tux's lil' helper
Tux's lil' helper


Joined: 19 Jun 2017
Posts: 108

PostPosted: Sat Apr 07, 2018 4:16 am    Post subject: [SOLVED] Can't start virtual machine... Reply with quote

Hello everybody.

I just installed virtualbox, virtualbox additions and virtualbox extpack oracle as described here . It is the first time that I am installing virtualbox in a gentoo host, although I had gentoo as guest multiple times in an old fedora install. I setup all modules mentioned in the gentoo page in openrc to be loaded in the boot as described (modules="vboxdrv vboxnetadp vboxnetflt vboxpci"), since I wasn't sure of which one I was going to need. So I open the virtual box and created a fedora virtual machine, with the most basic setup as possible. When I first order it to start it I got and error, with a checkbox that reads

Code:

The virtual machine 'fedora 27' has terminated unexpectedly during startup because of signal 9.


Result Code:
NS_ERROR_FAILURE (0x80004005)
Component:
MachineWrap
Interface:
IMachine {b2547866-a0a1-4391-8b86-6952d82efaa0}


and that corresponds to the following in the log file inside the .VirtualBox folder:

Code:

VirtualBox XPCOM Server 5.1.32_Gentoo r120294 linux.amd64 (Apr  7 2018 00:44:20) release log
00:00:00.009232 main     Log opened 2018-04-07T00:58:43.689870000Z
00:00:00.009233 main     Build Type: release
00:00:00.009235 main     OS Product: Linux
00:00:00.009236 main     OS Release: 4.9.76-gentoo-r1
00:00:00.009237 main     OS Version: #6 SMP Fri Apr 6 22:37:37 GMT 2018
00:00:00.009260 main     DMI Product Name: Inspiron 5557
00:00:00.009267 main     DMI Product Version:
00:00:00.009382 main     Host RAM: 15744MB (15.3GB) total, 15544MB (15.1GB) available
00:00:00.009387 main     Executable: /usr/lib64/virtualbox/VBoxSVC
00:00:00.009388 main     Process ID: 5002
00:00:00.009389 main     Package type: LINUX_64BITS_GENERIC (OSE)
00:00:00.010917 main     IPC socket path: /tmp/.vbox-vinicius-ipc/ipcd
00:00:00.152715 nspr-2   VirtualBox: object creation starts
00:00:00.156343 nspr-2   Home directory: '/home/vinicius/.VirtualBox'
00:00:00.156884 nspr-2   Loading settings file "/home/vinicius/.VirtualBox/VirtualBox.xml" with version "1.12-linux"
00:00:00.186469 nspr-2   USB: Unknown USB device detected (idVendor: 0x0cf3, idProduct: 0xe007)
00:00:00.186600 nspr-2   Successfully initialised host USB using sysfs
00:00:00.192913 nspr-2   NetIfAdpCtlOut: VBoxNetAdpCtl: Error while retrieving link speed for wlp2s0: VBoxNetAdpCtl: ioctl failed: Operation not supported
00:00:00.210630 nspr-2   NAT: resolv.conf: nameserver 162.242.211.137
00:00:00.210645 nspr-2   NAT: resolv.conf: nameserver 78.46.223.24
00:00:00.210649 nspr-2   NAT: resolv.conf: nameserver 187.36.192.38
00:00:00.210652 nspr-2   NAT: resolv.conf: too many nameserver lines, ignoring 187.36.192.43
00:00:00.210662 nspr-2   HostDnsMonitor: old information
00:00:00.210665 nspr-2     no server entries
00:00:00.210667 nspr-2     no domain set
00:00:00.210669 nspr-2     no search string entries
00:00:00.210671 nspr-2   HostDnsMonitor: new information
00:00:00.210674 nspr-2     server 1: 162.242.211.137
00:00:00.210676 nspr-2     server 2: 78.46.223.24
00:00:00.210678 nspr-2     server 3: 187.36.192.38
00:00:00.210680 nspr-2     domain: vta.virtua.com.br
00:00:00.210683 nspr-2     no search string entries
00:00:00.210686 nspr-2   HostDnsMonitorProxy::notify
00:00:00.262259 nspr-2   VD: VDInit finished
00:00:00.287453 nspr-2   Loading settings file "/home/vinicius/.VirtualBox/Machines/fedora 27/fedora 27.vbox" with version "1.16-linux"
00:00:00.364884 nspr-2   VirtualBox: object created
00:00:07.402827 Watcher  ERROR [COM]: aRC=NS_ERROR_FAILURE (0x80004005) aIID={b2547866-a0a1-4391-8b86-6952d82efaa0} aComponent={MachineWrap} aText={The virtual machine 'fedora 27' has terminated unexpectedly during startup because of signal 9}, preserve=false aResultDetail=0


Then I kill all related process as shown below

Code:

vinicius@reds ~ $ ps x | grep virtual
 4937 ?        Sl     0:02 gedit file:///home/vinicius/gentoovirtualbox
 4975 ?        Sl     0:00 /usr/lib64/virtualbox/VirtualBox
 4994 ?        S      0:00 /usr/lib64/virtualbox/VBoxXPCOMIPCD
 5002 ?        Sl     0:00 /usr/lib64/virtualbox/VBoxSVC --auto-shutdown
 5068 pts/1    S+     0:00 grep --colour=auto virtual
vinicius@reds ~ $ kill -9 4975 4994 5002
vinicius@reds ~ $ ps x | grep virtual
 4937 ?        Sl     0:02 gedit file:///home/vinicius/gentoovirtualbox
 5070 pts/1    S+     0:00 grep --colour=auto virtual
vinicius@reds ~ $


and simply try again. Now there is no error but the machine never loads, showing a checkbox saying "Creating process for virtual machine "fedora 27" (GUI/Qt)...1/2" and with the log file reading:


Code:
VirtualBox XPCOM Server 5.1.32_Gentoo r120294 linux.amd64 (Apr  7 2018 00:44:20) release log
00:00:00.000149 main     Log opened 2018-04-07T01:02:24.904897000Z
00:00:00.000151 main     Build Type: release
00:00:00.000152 main     OS Product: Linux
00:00:00.000153 main     OS Release: 4.9.76-gentoo-r1
00:00:00.000153 main     OS Version: #6 SMP Fri Apr 6 22:37:37 GMT 2018
00:00:00.000168 main     DMI Product Name: Inspiron 5557
00:00:00.000172 main     DMI Product Version:
00:00:00.000207 main     Host RAM: 15744MB (15.3GB) total, 15505MB (15.1GB) available
00:00:00.000210 main     Executable: /usr/lib64/virtualbox/VBoxSVC
00:00:00.000210 main     Process ID: 5104
00:00:00.000211 main     Package type: LINUX_64BITS_GENERIC (OSE)
00:00:00.001200 main     IPC socket path: /tmp/.vbox-vinicius-ipc/ipcd
00:00:00.103995 nspr-2   VirtualBox: object creation starts
00:00:00.104066 nspr-2   Home directory: '/home/vinicius/.VirtualBox'
00:00:00.104183 nspr-2   Loading settings file "/home/vinicius/.VirtualBox/VirtualBox.xml" with version "1.12-linux"
00:00:00.104975 nspr-2   USB: Unknown USB device detected (idVendor: 0x0cf3, idProduct: 0xe007)
00:00:00.105019 nspr-2   Successfully initialised host USB using sysfs
00:00:00.110223 nspr-2   NetIfAdpCtlOut: VBoxNetAdpCtl: Error while retrieving link speed for wlp2s0: VBoxNetAdpCtl: ioctl failed: Operation not supported
00:00:00.113776 nspr-2   NAT: resolv.conf: nameserver 162.242.211.137
00:00:00.113792 nspr-2   NAT: resolv.conf: nameserver 78.46.223.24
00:00:00.113796 nspr-2   NAT: resolv.conf: nameserver 187.36.192.38
00:00:00.113799 nspr-2   NAT: resolv.conf: too many nameserver lines, ignoring 187.36.192.43
00:00:00.113808 nspr-2   HostDnsMonitor: old information
00:00:00.113810 nspr-2     no server entries
00:00:00.113813 nspr-2     no domain set
00:00:00.113814 nspr-2     no search string entries
00:00:00.113817 nspr-2   HostDnsMonitor: new information
00:00:00.113819 nspr-2     server 1: 162.242.211.137
00:00:00.113821 nspr-2     server 2: 78.46.223.24
00:00:00.113823 nspr-2     server 3: 187.36.192.38
00:00:00.113826 nspr-2     domain: vta.virtua.com.br
00:00:00.113828 nspr-2     no search string entries
00:00:00.113831 nspr-2   HostDnsMonitorProxy::notify
00:00:00.114231 nspr-2   VD: VDInit finished
00:00:00.115230 nspr-2   Loading settings file "/home/vinicius/.VirtualBox/Machines/fedora 27/fedora 27.vbox" with version "1.16-linux"
00:00:00.117056 nspr-2   VirtualBox: object created


Than I try to kill all related process again but one of them just won't die:


Code:
vinicius@reds ~ $ ps x | grep virtual
 4937 ?        Sl     0:11 gedit file:///home/vinicius/gentoovirtualbox
 5080 ?        Sl     0:01 /usr/lib64/virtualbox/VirtualBox
 5099 ?        S      0:00 /usr/lib64/virtualbox/VBoxXPCOMIPCD
 5104 ?        Sl     0:00 /usr/lib64/virtualbox/VBoxSVC --auto-shutdown
 5129 ?        D      0:00 /usr/lib64/virtualbox/VirtualBox --comment fedora 27 --startvm 3c436c11-379e-4cd8-8273-27c5273b318e --no-startvm-errormsgbox
 5138 pts/1    S+     0:00 grep --colour=auto virtual
vinicius@reds ~ $ kill -9 5080 5099 5104 5129
vinicius@reds ~ $ ps x | grep virtual
 4937 ?        Sl     0:11 gedit file:///home/vinicius/gentoovirtualbox
 5129 ?        D      0:00 /usr/lib64/virtualbox/VirtualBox --comment fedora 27 --startvm 3c436c11-379e-4cd8-8273-27c5273b318e --no-startvm-errormsgbox
 5140 pts/1    S+     0:00 grep --colour=auto virtual
vinicius@reds ~ $


Then I try again to restart the virtual machine, again without success and same error as before. Any ideas? There is nothing related in the throubleshooting in the gentoo pages and I could not find anithing related anywhere in the internet. Thank you all.

[Moderator edit: changed some [quote] tags to [code] tags to preserve output layout. -Hu]


Last edited by vcmota on Sun Apr 08, 2018 2:30 am; edited 1 time in total
Back to top
View user's profile Send private message
C5ace
Apprentice
Apprentice


Joined: 23 Dec 2013
Posts: 237
Location: Brisbane, Australia

PostPosted: Sat Apr 07, 2018 10:45 am    Post subject: Reply with quote

I use VirtualBox on a number of 64 bit Gentoo Xfce hosts with various Windoze, Gentoo, Debian and a 32 bit Suse guests.

Code:

Host kernels are build using 'genkernel all'.
/etc/portage/package.use/virtualbox contains: app-emulation/virtualbox qt5
/etc/conf.d/modules contains: modules="vboxdrv vboxnetadp vboxnetflt vboxpci"

Run: emerge -vp app-emulation/virtualbox app-emulation/virtualbox-additions app-emulation/virtualbox-extpack-oracle app-emulation/virtualbox-modules

Fix errors if any.

Run: emerge -av app-emulation/virtualbox app-emulation/virtualbox-additions app-emulation/virtualbox-extpack-oracle app-emulation/virtualbox-modules

create the desktop launcher. Reboot the host, login and start the VirtualBox Gui.


Create the client configuration.
For a Gentoo 64-bit client select:
Type = Linux,
Version = Gentoo (64-bit)

For a Windows 32-bit client select:
Type = Microsoft Windows
Version = Windows XP (32-bit)

Then continue with creating the "Hard Drive" and remaining configuration as required for the intended use of the client......

The VirtualBox Help is very educating and interesting to read.
Back to top
View user's profile Send private message
vcmota
Tux's lil' helper
Tux's lil' helper


Joined: 19 Jun 2017
Posts: 108

PostPosted: Sun Apr 08, 2018 2:24 am    Post subject: Reply with quote

Thank you C5ace for your reply.

I eventually found out what was going on. There were a few incorrect configurations, but the main reason for all evil was that I was using all the modules indicated by the gentoo page, although the only mandatory one seems to be vboxdrv. I suspected of that due to some error lines in the log file, such as "00:00:00.192913 nspr-2 NetIfAdpCtlOut: VBoxNetAdpCtl: Error while retrieving link speed for wlp2s0: VBoxNetAdpCtl: ioctl failed: Operation not supported". After removing all optional modules from /etc/conf.d/modules and restarting the computer the problem was solved. There were still a few hurdles, such as a lot of time wasted trying to make virtual guest additions working on the guests, but apparently they were caused mostly be the guest OS rather than gentoo.

Than you again.
Back to top
View user's profile Send private message
C5ace
Apprentice
Apprentice


Joined: 23 Dec 2013
Posts: 237
Location: Brisbane, Australia

PostPosted: Sun Apr 08, 2018 10:15 am    Post subject: Reply with quote

vcmota:

Use modules="vboxdrv vboxnetadp vboxnetflt vboxpci". They apparently are required by some Windows and other guests.

What guests OS's do you want to install?
Back to top
View user's profile Send private message
vcmota
Tux's lil' helper
Tux's lil' helper


Joined: 19 Jun 2017
Posts: 108

PostPosted: Mon Apr 09, 2018 2:10 am    Post subject: Reply with quote

The problem occurred for Fedora as guest. After I removed the modules and successfully added fedora (not so successfully, guest additions did not worked properly) then I installed Ubuntu 16.04 64 and had no issues whatsoever, the Ubuntu guest is working flawlessly. There will be a time when I am going to need to install windows and also gentoo as guest (for testing stuff), so it would be nice to see whether those modules are working properly on my host...
Back to top
View user's profile Send private message
C5ace
Apprentice
Apprentice


Joined: 23 Dec 2013
Posts: 237
Location: Brisbane, Australia

PostPosted: Mon Apr 09, 2018 2:30 am    Post subject: Reply with quote

vcmota wrote:
The problem occurred for Fedora as guest. After I removed the modules and successfully added fedora (not so successfully, guest additions did not worked properly) then I installed Ubuntu 16.04 64 and had no issues whatsoever, the Ubuntu guest is working flawlessly. There will be a time when I am going to need to install windows and also gentoo as guest (for testing stuff), so it would be nice to see whether those modules are working properly on my host...


I can provide you with the full setup and *.vdi of a Gentoo Xfce guest with local domain "gentoo.home.lan and static Ip. 192.168.1.106. Contact me by private message. I will then make the *.tar.bz available for download.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum