Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue creating Windows VM #190

Open
battosaikenshin opened this issue Jun 24, 2021 · 11 comments
Open

Issue creating Windows VM #190

battosaikenshin opened this issue Jun 24, 2021 · 11 comments

Comments

@battosaikenshin
Copy link

Hi I am running the below command with the below error:

(cuckoo-test) cuckoo@cuckoo-Virtual-Machine:~/Desktop$ vmcloak init --verbose --win7x64 win7x64base --cpus 2 --ramsize 2048
/home/cuckoo/.virtualenvs/cuckoo-test/local/lib/python2.7/site-packages/OpenSSL/crypto.py:14: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.
from cryptography import utils, x509
VBoxManage: error: Machine settings file '/home/cuckoo/.vmcloak/vms/win7x64base/win7x64base.vbox' already exists
VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component MachineWrap, interface IMachine, callee nsISupports
VBoxManage: error: Context: "CreateMachine(bstrSettingsFile.raw(), bstrName.raw(), ComSafeArrayAsInParam(groups), bstrOsTypeId.raw(), createFlags.raw(), machine.asOutParam())" at line 274 of file VBoxManageMisc.cpp
ERROR:vmcloak.vm:[-] Error running command: Command '['/usr/bin/VBoxManage', 'createvm', '--register', '--name', 'win7x64base', '--basefolder', '/home/cuckoo/.vmcloak/vms']' returned non-zero exit status 1
Traceback (most recent call last):
File "/home/cuckoo/.virtualenvs/cuckoo-test/bin/vmcloak", line 8, in
sys.exit(main())
File "/home/cuckoo/.virtualenvs/cuckoo-test/local/lib/python2.7/site-packages/click/core.py", line 716, in call
return self.main(*args, **kwargs)
File "/home/cuckoo/.virtualenvs/cuckoo-test/local/lib/python2.7/site-packages/click/core.py", line 696, in main
rv = self.invoke(ctx)
File "/home/cuckoo/.virtualenvs/cuckoo-test/local/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/cuckoo/.virtualenvs/cuckoo-test/local/lib/python2.7/site-packages/click/core.py", line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/cuckoo/.virtualenvs/cuckoo-test/local/lib/python2.7/site-packages/click/core.py", line 534, in invoke
return callback(*args, **kwargs)
File "/home/cuckoo/.virtualenvs/cuckoo-test/local/lib/python2.7/site-packages/vmcloak/main.py", line 258, in init
m.create_vm()
File "/home/cuckoo/.virtualenvs/cuckoo-test/local/lib/python2.7/site-packages/vmcloak/vm.py", line 75, in create_vm
basefolder=vms_path, register=True)
File "/home/cuckoo/.virtualenvs/cuckoo-test/local/lib/python2.7/site-packages/vmcloak/vm.py", line 41, in _call
raise CommandError
vmcloak.exceptions.CommandError

Can anyone give me a hand as I am unsure on the next steps

@samwakel
Copy link
Contributor

samwakel commented Jun 24, 2021 via email

@battosaikenshin
Copy link
Author

battosaikenshin commented Jun 24, 2021

Hi Samwakel thanks for the quick response. I am now having the following error

vmcloak init --verbose --win7x64 win7x64base --cpus 2 --ramsize 2048
/home/cuckoo/.virtualenvs/cuckoo-test/local/lib/python2.7/site-packages/OpenSSL/crypto.py:14: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.
from cryptography import utils, x509
INFO:vmcloak.abstract:Got file 'python-2.7.6.msi' from 'https://www.python.org/ftp/python/2.7.6/python-2.7.6.msi', with matching checksum.
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
INFO:vmcloak:Starting the Virtual Machine u'win7x64base' to install Windows.
VBoxManage: error: VT-x is not available (VERR_VMX_NO_VMX)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ConsoleWrap, interface IConsole
ERROR:vmcloak.vm:[-] Error running command: Command '['/usr/bin/VBoxManage', 'startvm', u'win7x64base', '--type', 'headless']' returned non-zero exit status 1
Traceback (most recent call last):
File "/home/cuckoo/.virtualenvs/cuckoo-test/bin/vmcloak", line 8, in
sys.exit(main())
File "/home/cuckoo/.virtualenvs/cuckoo-test/local/lib/python2.7/site-packages/click/core.py", line 716, in call
return self.main(*args, **kwargs)
File "/home/cuckoo/.virtualenvs/cuckoo-test/local/lib/python2.7/site-packages/click/core.py", line 696, in main
rv = self.invoke(ctx)
File "/home/cuckoo/.virtualenvs/cuckoo-test/local/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
return process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/cuckoo/.virtualenvs/cuckoo-test/local/lib/python2.7/site-packages/click/core.py", line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/cuckoo/.virtualenvs/cuckoo-test/local/lib/python2.7/site-packages/click/core.py", line 534, in invoke
return callback(*args, **kwargs)
File "/home/cuckoo/.virtualenvs/cuckoo-test/local/lib/python2.7/site-packages/vmcloak/main.py", line 273, in init
m.start_vm(visible=vm_visible)
File "/home/cuckoo/.virtualenvs/cuckoo-test/local/lib/python2.7/site-packages/vmcloak/vm.py", line 201, in start_vm
type
="gui" if visible else "headless")
File "/home/cuckoo/.virtualenvs/cuckoo-test/local/lib/python2.7/site-packages/vmcloak/vm.py", line 41, in _call
raise CommandError
vmcloak.exceptions.CommandError

Delete this folder VBoxManage: error: Machine settings file '/home/cuckoo/.vmcloak/vms/win7x64base/win7x64base.vbox' already exists From: battosaikenshin @.> Sent: Thursday, 24 June 2021 6:04 PM To: hatching/vmcloak @.> Cc: Subscribed @.***> Subject: [hatching/vmcloak] Issue creating Windows VM (#190) Hi I am running the below command with the below error: (cuckoo-test) @.***Virtual-Machine:~/Desktop$ vmcloak init --verbose --win7x64 win7x64base --cpus 2 --ramsize 2048 /home/cuckoo/.virtualenvs/cuckoo-test/local/lib/python2.7/site-packages/OpenSSL/crypto.py:14: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release. from cryptography import utils, x509 VBoxManage: error: Machine settings file '/home/cuckoo/.vmcloak/vms/win7x64base/win7x64base.vbox' already exists VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component MachineWrap, interface IMachine, callee nsISupports VBoxManage: error: Context: "CreateMachine(bstrSettingsFile.raw(), bstrName.raw(), ComSafeArrayAsInParam(groups), bstrOsTypeId.raw(), createFlags.raw(), machine.asOutParam())" at line 274 of file VBoxManageMisc.cpp ERROR:vmcloak.vm:[-] Error running command: Command '['/usr/bin/VBoxManage', 'createvm', '--register', '--name', 'win7x64base', '--basefolder', '/home/cuckoo/.vmcloak/vms']' returned non-zero exit status 1 Traceback (most recent call last): File "/home/cuckoo/.virtualenvs/cuckoo-test/bin/vmcloak", line 8, in sys.exit(main()) File "/home/cuckoo/.virtualenvs/cuckoo-test/local/lib/python2.7/site-packages/click/core.py", line 716, in call return self.main(*args, **kwargs) File "/home/cuckoo/.virtualenvs/cuckoo-test/local/lib/python2.7/site-packages/click/core.py", line 696, in main rv = self.invoke(ctx) File "/home/cuckoo/.virtualenvs/cuckoo-test/local/lib/python2.7/site-packages/click/core.py", line 1060, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/cuckoo/.virtualenvs/cuckoo-test/local/lib/python2.7/site-packages/click/core.py", line 889, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/cuckoo/.virtualenvs/cuckoo-test/local/lib/python2.7/site-packages/click/core.py", line 534, in invoke return callback(*args, **kwargs) File "/home/cuckoo/.virtualenvs/cuckoo-test/local/lib/python2.7/site-packages/vmcloak/main.py", line 258, in init m.create_vm() File "/home/cuckoo/.virtualenvs/cuckoo-test/local/lib/python2.7/site-packages/vmcloak/vm.py", line 75, in create_vm basefolder=vms_path, register=True) File "/home/cuckoo/.virtualenvs/cuckoo-test/local/lib/python2.7/site-packages/vmcloak/vm.py", line 41, in _call raise CommandError vmcloak.exceptions.CommandError Can anyone give me a hand as I am unsure on the next steps — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub<#190>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AIE2WDGT62RSF4F5VH3YWX3TUL7HZANCNFSM47HRYBHA.

@samwakel
Copy link
Contributor

samwakel commented Jun 24, 2021 via email

@battosaikenshin
Copy link
Author

Yes apologies,

I did that and got a different error on this occasion:

vmcloak init --verbose --win7x64 win7x64base --cpus 2 --ramsize 2048
/home/cuckoo/.virtualenvs/cuckoo-test/local/lib/python2.7/site-packages/OpenSSL/crypto.py:14: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.
from cryptography import utils, x509
INFO:vmcloak.abstract:Got file 'python-2.7.6.msi' from 'https://www.python.org/ftp/python/2.7.6/python-2.7.6.msi', with matching checksum.
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
INFO:vmcloak:Starting the Virtual Machine u'win7x64base' to install Windows.
VBoxManage: error: VT-x is not available (VERR_VMX_NO_VMX)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ConsoleWrap, interface IConsole
ERROR:vmcloak.vm:[-] Error running command: Command '['/usr/bin/VBoxManage', 'startvm', u'win7x64base', '--type', 'headless']' returned non-zero exit status 1
Traceback (most recent call last):
File "/home/cuckoo/.virtualenvs/cuckoo-test/bin/vmcloak", line 8, in
sys.exit(main())
File "/home/cuckoo/.virtualenvs/cuckoo-test/local/lib/python2.7/site-packages/click/core.py", line 716, in call
return self.main(*args, **kwargs)
File "/home/cuckoo/.virtualenvs/cuckoo-test/local/lib/python2.7/site-packages/click/core.py", line 696, in main
rv = self.invoke(ctx)
File "/home/cuckoo/.virtualenvs/cuckoo-test/local/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
return process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/cuckoo/.virtualenvs/cuckoo-test/local/lib/python2.7/site-packages/click/core.py", line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/cuckoo/.virtualenvs/cuckoo-test/local/lib/python2.7/site-packages/click/core.py", line 534, in invoke
return callback(*args, **kwargs)
File "/home/cuckoo/.virtualenvs/cuckoo-test/local/lib/python2.7/site-packages/vmcloak/main.py", line 273, in init
m.start_vm(visible=vm_visible)
File "/home/cuckoo/.virtualenvs/cuckoo-test/local/lib/python2.7/site-packages/vmcloak/vm.py", line 201, in start_vm
type
="gui" if visible else "headless")
File "/home/cuckoo/.virtualenvs/cuckoo-test/local/lib/python2.7/site-packages/vmcloak/vm.py", line 41, in _call
raise CommandError
vmcloak.exceptions.CommandError

@samwakel
Copy link
Contributor

samwakel commented Jun 26, 2021 via email

@ForeGuards
Copy link

ForeGuards commented Feb 27, 2023

@samwakel: did you get this issue fixed? I always get the same errors like you had... It would be really great if you or someone else could give me a hand. thanks a lot!

My issue:

(cuckoo) analyst@cuckoo:~$ vmcloak init --verbose --win7x64 win7x64base --cpus 2 --ramsize 2048
/home/analyst/.virtualenvs/cuckoo/lib/python2.7/site-packages/OpenSSL/crypto.py:14: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.
  from cryptography import utils, x509
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
INFO:vmcloak:Starting the Virtual Machine u'win7x64base' to install Windows.
Traceback (most recent call last):
  File "/home/analyst/.virtualenvs/cuckoo/bin/vmcloak", line 8, in <module>
    sys.exit(main())
  File "/home/analyst/.virtualenvs/cuckoo/lib/python2.7/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/home/analyst/.virtualenvs/cuckoo/lib/python2.7/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/home/analyst/.virtualenvs/cuckoo/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/analyst/.virtualenvs/cuckoo/lib/python2.7/site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/analyst/.virtualenvs/cuckoo/lib/python2.7/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/home/analyst/.virtualenvs/cuckoo/lib/python2.7/site-packages/vmcloak/main.py", line 275, in init
    m.wait_for_state(shutdown=True)
  File "/home/analyst/.virtualenvs/cuckoo/lib/python2.7/site-packages/vmcloak/vm.py", line 65, in wait_for_state
    status = self.vminfo("VMState")
  File "/home/analyst/.virtualenvs/cuckoo/lib/python2.7/site-packages/vmcloak/vm.py", line 49, in vminfo
    key, value = line.split("=", 1)
ValueError: need more than 1 value to unpack

@LuboslavBochev
Copy link

@ForeGuards
Did you solve your problem already ??
I have the same issue like your.

@anuraagkhanna
Copy link

I have a same error can someone help me resolve it?

@pra7veen
Copy link

I have a same error can someone help me resolve it?

are you able to resolve that issue

@anuraagkhanna
Copy link

Access 'vm.py' and make the following changes while ensuring you are working on virtualbox5.2

image

@pra7veen
Copy link

pra7veen commented Sep 28, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants