Sliim / pentest-env

Pentest environment deployer (kali linux + targets) using vagrant and chef.
http://sliim.github.io/pentest-env/
GNU General Public License v3.0
632 stars 169 forks source link

GUI is automatically openned #25

Closed tiferrei closed 8 years ago

tiferrei commented 8 years ago

Hello there, whenever I start my machine with vagrant up, VirtualBox pops up and opens the VM's GUI. Is it supposed to do this? If so, how can I disable it, so that only the CLI part runs?

Thank you, Tiago

Sliim commented 8 years ago

Hi @tiferrei , Yes, the kali box is by default started with GUI, you can disable it by putting this in your ~/.pentestrc:

kali:
  vbox:
    gui: false

Find more customizations here: https://github.com/Sliim/pentest-env/blob/master/docs/Customizations.md

tiferrei commented 8 years ago

I tried:

kali:
  vbox:
    customize:
      gui: false
      memory: 3072

However I always get:

There was an error loading a Vagrantfile. The file being loaded
and the error message are shown below. This is usually caused by
a syntax error.

Path: /Users/tiferrei/Virtual Machines/Kali/init/Vagrantfile
Line number: 0
Message: Psych::SyntaxError: (<unknown>): found character that cannot start any token while scanning for the next token at line 4 column 1

What am I doing wrong? BTW this is in ~/.pentestrc.

tiferrei commented 8 years ago

And with:

kali:
  vbox:
    gui: false

vagrant status works, but vagrant up shows:

Bringing machine 'default' up with 'virtualbox' provider...
There are errors in the configuration of this machine. Please fix
the following errors and try again:

vm:
* A box must be specified.
Sliim commented 8 years ago

Are you running vagrant inside pentest-env repo?

Try with:

instances:
  - kali

kali:
  vbox:
    gui: false

vagrant status should display kali vm, not default

tiferrei commented 8 years ago

@Sliim It worked with that! But how can I set the RAM and CPU?

Sliim commented 8 years ago
instances:
  - kali
kali:
  vbox:
    gui: false
    cpus: 2
    memory: 8192

or

instances:
  - kali
kali:
  vbox:
    gui: false
    customize:
      cpus: 2
      memory: 8192

See https://github.com/Sliim/pentest-env/blob/master/docs/Customizations.md#virtualbox

tiferrei commented 8 years ago

It doesn't seem to like to mess with cpus and memory:

There was an error loading a Vagrantfile. The file being loaded
and the error message are shown below. This is usually caused by
a syntax error.

Path: /Users/tiferrei/Virtual Machines/Kali/init/Vagrantfile
Line number: 0
Message: Psych::SyntaxError: (<unknown>): found a tab character that violate intendation while scanning a plain scalar at line 7 column 11
tiferrei commented 8 years ago

Never mind, it randomly started working :)