> For the complete documentation index, see [llms.txt](https://nathan-stark.gitbook.io/linux/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nathan-stark.gitbook.io/linux/virtualbox/ustanvoka-i-nastrioka.md).

# Устанвока и настрйока VirtualBox

Устанавливаем пакеты

```
aptitude install virtualbox-5.2 dkms
```

Если в процессе установки, будет ошибка

> This system is currently not set up to build kernel modules.
>
> Please install the Linux kernel "header" files matching the current kernel
>
> for adding new hardware support to the system.
>
> The distribution packages containing the headers are probably:
>
> ```
> linux-headers-amd64 linux-headers-3.2.0-4-amd64
> ```
>
> This system is currently not set up to build kernel modules.
>
> Please install the Linux kernel "header" files matching the current kernel
>
> for adding new hardware support to the system.
>
> The distribution packages containing the headers are probably:
>
> ```
> linux-headers-amd64 linux-headers-3.2.0-4-amd64
> ```
>
> There were problems setting up VirtualBox. To re-start the set-up process, run
>
> /sbin/vboxconfig as root.

Устанавливаю

```
aptitude install linux-headers-3.2.0-4-amd64
```

Выполняю

```
/sbin/vboxconfig
```

Теперь создадим юзера, под которым будут работать наши виртуальные машины и добавим его в группу vboxusers

Создаю файл /etc/default/virtualbox

Добавляю параметры

```
VBOXWEB_USER=vbox
VBOXWEB_TIMEOUT=0
VBOWWEB_LOGFILE=/var/log/vboxwebservice.log
VBOXWEB_HOST=192.168.0.2 # Указываем IP сервера, где распологается VirtualBox
VBOXWEB_PORT=18083
```

Создаю файл логов и даю ему права

```
touch vi /var/log/vboxwebservice.log
chown vbox:vboxuser /var/log/vboxwebservice.log
```

Заходим по [ссылке](http://download.virtualbox.org/virtualbox/) ищим Extension в соответсвии с нашей версии VirtualBox. Скачиваем и устанавливаем

```
#wget http://download.virtualbox.org/virtualbox/5.0.2/Oracle_VM_VirtualBox_Extension_Pack-5.0.2-102096.vbox-extpack

#VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-5.0.2-102096.vbox-extpack
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://nathan-stark.gitbook.io/linux/virtualbox/ustanvoka-i-nastrioka.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
