# Предварительная установка драйверов

HOSTVM использует тип устройства Virtio для подключения дисков виртуальных машин. В случаях, когда для импорта не используется утилита virt-v2v, в гостевую ОС необходимо  заранее загрузить драйверы для устройств Virtio. Ниже описан перечень действий в гостевых ОС для загрузки этих драйверов.

### Alt Server 8.x, 9.x

Установить гостевые утилиты:

`apt-get install ovirt-guest-agent`

Добавить модули virtio в конфигурационный файл `/etc/initrd.mk`:

`MODULES_ADD += virtio_blk virtio_scsi virtio_pci`

`MODULES_PRELOAD += virtio_blk virtio_scsi virtio_pci`

Сгенерировать новый initramfs:

`make-initrd`

### CentOS 7.x, 8.x

Установить гостевые утилиты:

`yum install ovirt-guest-agent-common`

Добавить модули virtio в initramfs:

`dracut --force --no-hostonly`

Проверить, что модули загружены:

`lsinitrd /boot/initramfs-<kernel.version>.img | grep -i virtio`

`<kernel.version>` - текущая версия ядра, можно посмотреть командой:

`uname -r`


---

# Agent Instructions: 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://kb.pvhostvm.ru/hostvm-server/installation-guide/konvertaciya-import-virtualnykh-mashin/drivers-preinstallation.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.
