Page 1 of 2

virtalbox on ubuntu trusty cant find exixting VM as registerd

Posted: 4. Feb 2017, 05:16
by surajsecpro
i m running into weird issue
if i do vboxmanage startvm win-cuckoo,i get following error
“VBoxManage: error: Could not find a registered machine named ‘win7-cuckoo’”

but if i do
$ VM=’Win7-cuckoo’
then run vboxmanage startvm $VM
it starts the VM
any thoughts

so one would ask go that whats the big deal. My real problem is i m trying to put cuckoo sandbox.so cuckoo sandbox needs to call the VM and when it calls the VM to shut it down or resume it , it gets same message couldnot find a registered machine named 'win7-cuckoo'.

i have reinstalled virtualbox multiple times, tried various combinations, there is no logging where i can find out where the thing is going wrong and i can go in some config file and correct it.

when i try to register the VM manually another wierd thing happens, which i put at github forum for cuckoo sandbox as below
==================================
<surajsecpro@surajsecpro-Vostro-3558:~/VirtualBox VMs$ vboxmanage registervm windows7-cuckoo
<VBoxManage: error: Runtime error opening '/home/surajsecpro/.config/VirtualBox/windows7-cuckoo' <for reading: -102(File not found.).
<VBoxManage: error: /home/vbox/vbox-5.0.32/src/VBox/Main/src-server/MachineImpl.cpp[480] <(nsresult Machine::initFromSettings(VirtualBox*, const com::Utf8Str&, const com::Guid*))
<VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component MachineWrap, <interface IMachine, callee nsISupports
<VBoxManage: error: Context: "OpenMachine(Bstr(a->argv[0]).raw(), machine.asOutParam())" at line <85 of file VBoxManageMisc.cpp

i cannot locate directory " '/home/surajsecpro/.config/VirtualBox" on my machine somehow. i have reinstalled vbox couple of times already

=======================================
NOTE: you will see different machine name in above log as i have reinstalled virtualbox created different VMs but same results so far.
so guys ......PLEASE HELP

Re: virtalbox on ubuntu trusty cant find exixting VM as registerd

Posted: 4. Feb 2017, 15:11
by Perryg
Post the guests log file ( as an attachment ). Right click on the guest in the Main Manager then click show log. Save and post as an attachment. Compress if it is too large to post.

Also do the following in a host terminal:
Run VBoxBugReport and it will create a file called *.bugreport.tgz in the folder as the terminal is in, which I also need posted as an attachment.

Re: virtalbox on ubuntu trusty cant find exixting VM as registerd

Posted: 4. Feb 2017, 19:24
by surajsecpro
Thanks for your reply.

Please find attached the log.
when i ran VBOXBugReport command it said command not found
so i checked my virtualBox instlled version and it is
===============================================
surajsecpro@surajsecpro-Vostro-3558:~$ vboxmanage --version
4.3.36_Ubuntur105129
=============================================
Reason i checked the version is i found in an on virtualbox site that VBOXBugReport feature came with 5.1 version , so i think since i m at 4.3.36 version i may not have that.

edited
--------------------
on second thought, i uninstalled the 4.3.36 version(although i kept my VMs) and then did testing with 5.1 version of virtualbox as well, although result is same but i now have the bugreport in it

Re: virtalbox on ubuntu trusty cant find exixting VM as registerd

Posted: 4. Feb 2017, 19:42
by Perryg
You have several issue I am afraid.

1) You are running the Ubuntu fork which we do not support and might explain why you are having difficulty with VBoxManage and the virtualbox.xml file missing

Code: Select all

00:00:04.682878 Package type: LINUX_64BITS_GENERIC (OSE)
Plus you will have other issues trying to run a later version of the guest additions than the installed version of VirtualBox.

Code: Select all

VirtualBox VM 4.3.36_Ubuntu r105129 linux.amd64 (Jan 27 2016 12:09:06) release log
00:00:24.596061 Guest Additions information report: Version 5.1.14 r112924 '5.1.14'
I would suggest that you remove the install you have and install the version from virtualbox.org or consult Ubuntu for your assistance.

Re: virtalbox on ubuntu trusty cant find exixting VM as registerd

Posted: 4. Feb 2017, 20:15
by surajsecpro
thanks again, I edited my reply, while i guess you were replying to me. there i have bug report after putting 5.1 version of virtualbox

Re: virtalbox on ubuntu trusty cant find exixting VM as registerd

Posted: 4. Feb 2017, 20:38
by Perryg
I see references to vmware in your service log and the virtualbox.xml is actually where it is supposed to be. Are you trying to run this inside vmware or is is installed and active while you are trying to use virtualbox?

You also have not added your user name to the vboxuser group yet.

Re: virtalbox on ubuntu trusty cant find exixting VM as registerd

Posted: 4. Feb 2017, 20:47
by surajsecpro
vmware is installed on same ubuntu box but its lying dead when i m working with virtualbox to get my cuckoo sandbox to run.

edited
----------------------
i checked group membership, i added the users meant for cuckoo in that group but not my own user name i.e. surajsecpro in it.
here is how the membership looks like
++++++++++++++++++++++++++++++
surajsecpro@surajsecpro-Vostro-3558:~$ getent group vboxusers
vboxusers:x:1002:cuckoo,cuckoo1
++++++++++++++++++++++++++++++

do i need to add myself in that group too?

edited
---------------------
i added my self as well, still same issue.
surajsecpro@surajsecpro-Vostro-3558:~/cuckoo$ getent group vboxusers
vboxusers:x:1002:cuckoo,cuckoo1,surajsecpro

Re: virtalbox on ubuntu trusty cant find exixting VM as registerd

Posted: 4. Feb 2017, 20:54
by Perryg
Below are the two errors and you need to get them fixed before you move forward.
Home directory: '/home/surajsecpro/.config/VirtualBox'
00:00:00.120314 nspr-2 Loading settings file "/home/surajsecpro/.config/VirtualBox/VirtualBox.xml" with version "1.12-linux"
00:00:00.142647 nspr-2 NetIfAdpCtlOut: VBoxNetAdpCtl: Error while retrieving link status for vmnet8: VBoxNetAdpCtl: ioctl failed: Operation not supported

WARNING [COM]: aRC=NS_ERROR_FAILURE (0x80004005) aIID={afca788c-4477-787d-60b2-3fa70e56fbbc} aComponent={HostWrap} aText={VirtualBox is not currently allowed to access USB devices. You can change this by adding your user to the 'vboxusers' group. Please see the user manual for a more detailed explanation}, preserve=true aResultDetail=0

When you check for the virtualbox.xml file, how are you doing so? CLI or file manager?

Re: virtalbox on ubuntu trusty cant find exixting VM as registerd

Posted: 4. Feb 2017, 21:06
by surajsecpro
i located the xml file at
++++++++++++++++++++++++++++
surajsecpro@surajsecpro-Vostro-3558:~/cuckoo$ locate virtualbox.xml
/usr/share/mime/packages/virtualbox.xml
++++++++++++++++++++++++++++++
and then opened it in browser for quick read its attached as well.

Re: virtalbox on ubuntu trusty cant find exixting VM as registerd

Posted: 4. Feb 2017, 21:11
by Perryg
So if you start a terminal and type the following, do you see the proper location and file? Use ls to show the folder information.
cd /home/surajsecpro/.config/VirtualBox/

Re: virtalbox on ubuntu trusty cant find exixting VM as registerd

Posted: 4. Feb 2017, 21:26
by surajsecpro
i see following
=====================
surajsecpro@surajsecpro-Vostro-3558:~/.config/VirtualBox$ ls -l
total 496
-rw------- 1 surajsecpro surajsecpro 1237 Feb 4 23:18 compreg.dat
-rw------- 1 surajsecpro surajsecpro 2045 Feb 4 23:22 selectorwindow.log
-rw------- 1 surajsecpro surajsecpro 774 Feb 4 22:47 selectorwindow.log.1
-rw-rw-r-- 1 surajsecpro surajsecpro 254037 Feb 1 18:46 vbox-ssl-cacertificate.crt
-rw------- 1 surajsecpro surajsecpro 32344 Feb 4 23:39 VBoxSVC.log
-rw------- 1 surajsecpro surajsecpro 78646 Feb 4 23:01 VBoxSVC.log.1
-rw------- 1 surajsecpro surajsecpro 4088 Feb 2 22:34 VBoxSVC.log.10
-rw------- 1 surajsecpro surajsecpro 22413 Feb 4 07:38 VBoxSVC.log.2
-rw------- 1 surajsecpro surajsecpro 3461 Feb 3 22:53 VBoxSVC.log.3
-rw------- 1 surajsecpro surajsecpro 3461 Feb 3 22:48 VBoxSVC.log.4
-rw------- 1 surajsecpro surajsecpro 3461 Feb 3 22:48 VBoxSVC.log.5
-rw------- 1 surajsecpro surajsecpro 4425 Feb 3 22:30 VBoxSVC.log.6
-rw------- 1 surajsecpro surajsecpro 7021 Feb 3 22:29 VBoxSVC.log.7
-rw------- 1 surajsecpro surajsecpro 4354 Feb 3 22:26 VBoxSVC.log.8
-rw------- 1 surajsecpro surajsecpro 7151 Feb 2 23:06 VBoxSVC.log.9
-rw------- 1 surajsecpro surajsecpro 2578 Feb 4 23:21 VirtualBox.xml
-rw------- 1 surajsecpro surajsecpro 2578 Feb 4 23:21 VirtualBox.xml-prev
-rw------- 1 surajsecpro surajsecpro 26408 Feb 4 23:18 xpti.dat

Re: virtalbox on ubuntu trusty cant find exixting VM as registerd

Posted: 4. Feb 2017, 21:31
by Perryg
So it does see the proper information. Now can you also start the guest using the following in a terminal?

VBoxManage startvm <guest name>

Replace the <guest name> with the real name using " " around the name if it has spaces, and make sure it is exact as Linux is case sensitive.

Re: virtalbox on ubuntu trusty cant find exixting VM as registerd

Posted: 4. Feb 2017, 21:32
by surajsecpro
from location you just shared its xml is attached here

Re: virtalbox on ubuntu trusty cant find exixting VM as registerd

Posted: 4. Feb 2017, 21:42
by surajsecpro
followed your guidance

=================
[surajsecpro@surajsecpro-Vostro-3558:~$ vboxmanage startvm "Win7-cuckoo"
Waiting for VM "Win7-cuckoo" to power on...
VM "Win7-cuckoo" has been successfully started.

============================
after this success i tried running cuckoo again but see same problem again
=========================================
2017-02-05 01:08:33,676 [lib.cuckoo.core.resultserver] DEBUG: ResultServer running on 192.168.56.1:2042.
2017-02-05 01:08:33,683 [lib.cuckoo.core.scheduler] INFO: Using "virtualbox" as machine manager
2017-02-05 01:08:35,419 [modules.machinery.virtualbox] DEBUG: Stopping vm Win7-cuckoo
2017-02-05 01:08:35,422 [modules.machinery.virtualbox] DEBUG: Getting status for Win7-cuckoo
2017-02-05 01:08:35,495 [modules.machinery.virtualbox] DEBUG: VBoxManage returns error checking status for machine Win7-cuckoo: VBoxManage: error:
Could not find a registered machine named 'Win7-cuckoo'

Re: virtalbox on ubuntu trusty cant find exixting VM as registerd

Posted: 4. Feb 2017, 21:47
by Perryg
So VirtualBox is working as it should and is eliminated from the equation. Now it is time for you to talk to cuckoo.