Proxmox ssd emulation что это

BrainyCP

Панель управления сервером

Установка в Proxmox в KVM + trim дисков

Установка в Proxmox в KVM + trim дисков

Сообщение Lotus » Пн мар 02, 2020 10:31 am

Переходим к предварительной настройке ОС.
3. Обновил систему
4. Установить qemu-guest-agent
5. Включить trim
5.1 По инструкции

и будет вам счастье.

Можно включить почасово

6. Удалил старые ядра
2-е добавилось после начального обновления системы. Т.е. я старое удалил, новое оставил.

Установил в /etc/yum.conf installonly_limit=2 на будущее.

7. Удалить неиспользуемые локали, перестроить архив локалей

При этом консоли ssh закроются.
Подождать немного, что бы архив локалей перестроился и перегрузить.
Таким образом /usr/lib/locale/locale-archive уменьшается с 105мб до 5,5мб.

При желании вы можете удалить ncdu-1.14.2.tar.gz файл и каталог, в который были извлечены исходные файлы, так как они вам больше не нужны.

9. Установить brainycp
После установки всего-всего панель с системой у меня заняла 5,8Гб.
(правда я немного jail_skeleton подрезал)

Все.
Надеюсь, кому-то поможет.
Я с этим trim’ом день промучался и наэкспериментировался, но именно так все работает.

Re: Установка в Proxmox в KVM + trim дисков

Сообщение Lotus » Пт мар 27, 2020 9:59 am

Почистил руками все архивные старые логи. Оставил только последние, без дат.
Не забываем проверить и удалить старые ядра. См. предыдущий пост. Если вы установили опцию installonly_limit=2 в /etc/yum.conf, то больше 2-х не будет.
Потом чистка неиспользуемых блоков на swap-разделе.

Забивать нулями для swap нужно, поскольку я думаю, что swapoff только отключает и не очищает.
Раздел swap после забития нулями перестает быть разделом swap поэтому его нужно заново пересоздать mkswap.
После этого бекап в proxmox минимален.

Источник

Администрирование и не только

Не вполне стандартные задачи, с которыми мне приходится сталкиваться по работе и способы их решения.

Страницы

среда, 4 марта 2020 г.

Руководство администратора Proxmox VE R 6.0 Глава 10.

Виртуальные машины Qemu/KVM

Гостевая операционная система, работающая на эмулируемом компьютере, обращается к этим устройствам и работает так, как она работает на реальном оборудовании. Например, вы можете передать образ iso в качестве параметра Qemu, и операционная система, работающая на эмулируемом компьютере, увидит реальный CDROM, вставленный в привод компакт-дисков.

Qemu может эмулировать большое разнообразие аппаратных средств от ARM до Sparc, но Proxmox VE занимается только 32-и 64-битной эмуляцией клонов PC, поскольку она представляет собой подавляющее большинство серверного оборудования. Эмуляция клонов PC также является одной из самых быстрых из-за наличия процессорных расширений, которые значительно ускоряют Qemu, когда эмулируемая архитектура совпадает с архитектурой хоста.
На заметку Иногда вы можете столкнуться с термином KVM (Kernel-based Virtual Machine). Это означает, что Qemu работает с поддержкой расширений процессора виртуализации, через модуль ядра Linux kvm. В контексте Proxmox VE термины Qemu и KVM могут использоваться взаимозаменяемо, так как Qemu в Proxmox VE всегда будет пытаться загрузить модуль kvm. Qemu внутри Proxmox VE работает как корневой процесс, так как это необходимо для доступа к блочным и PCI устройствам

    Эмулированные устройства и паравиртуализированные устройства

    Аппаратное обеспечение PC, эмулируемое Qemu, включает в себя материнскую плату, сетевые контроллеры, контроллеры SCSI, IDE и SATA, последовательные порты (полный список можно увидеть на man странице KVM(1)), все они эмулируются программно. Все эти устройства являются точным программным эквивалентом существующих аппаратных устройств, и если операционная система, работающая в гостевой системе, имеет соответствующие драйверы, она будет использовать устройства, как если бы она работала на реальном оборудовании. Это позволяет Qemu запускать немодифицированные операционные системы.

    Это, однако, влияет на производительность, так как запуск в программном обеспечении того, что должно было выполняться в аппаратном обеспечении, требует дополнительной нагрузки на центральный процессор. Чтобы сгладить это, Qemu может представить гостевой операционной системе паравиртуализированные устройства, где гостевая ОС распознает, что она работает внутри Qemu и взаимодействует с гипервизором.

    Qemu опирается на стандарт виртуализации virtio и, таким образом, может представлять паравиртуализированные устройства virtio, которые включают в себя паравиртуализированный универсальный дисковый контроллер, паравиртуализированную сетевую карту, паравиртуализированный последовательный порт, паравиртуализированный SCSI-контроллер и т. д …

    Настоятельно рекомендуется использовать устройства virtio при любой возможности, так как они обеспечивают значительное улучшение производительности. Использование virtio generic disk controller по сравнению с эмулируемым IDE-контроллером удвоит пропускную способность последовательной записи, как это было измерено с помощью bonnie++(8). Использование сетевого интерфейса virtio может обеспечить до трех раз большую пропускную способность эмулируемой сетевой карты Intel E1000, измеренную с помощью iperf(1). 1

    1 Смотри этот бэнчмарк на KVM wiki

    Параметры Виртуальных Машин

    Общие параметры

    Proxmox ssd emulation что это. Смотреть фото Proxmox ssd emulation что это. Смотреть картинку Proxmox ssd emulation что это. Картинка про Proxmox ssd emulation что это. Фото Proxmox ssd emulation что это

    Настройки ОС

    Proxmox ssd emulation что это. Смотреть фото Proxmox ssd emulation что это. Смотреть картинку Proxmox ssd emulation что это. Картинка про Proxmox ssd emulation что это. Фото Proxmox ssd emulation что это

    Параметры системы

    Proxmox ssd emulation что это. Смотреть фото Proxmox ssd emulation что это. Смотреть картинку Proxmox ssd emulation что это. Картинка про Proxmox ssd emulation что это. Фото Proxmox ssd emulation что это

    При создании виртуальной машины можно изменить некоторые основные компоненты системы новой виртуальной машины. Вы можете указать, какой тип дисплея вы хотите использовать. Кроме того, может быть изменен контроллер SCSI. Если вы планируете установить гостевой агент QEMU, или если выбранный образ ISO уже поставляется и устанавливается автоматически, вы можете поставить галочку в поле агент Qemu, что позволит Proxmox VE использовать его функции для отображения дополнительной информации и выполнения некоторых действий (например, завершение работы или создание моментальных снимков) более оптимально.

    Proxmox VE позволяет загружать виртуальные машины с различными типами прошивок и машин, а именно SeaBIOS и OVMF. В большинстве случаев вы хотите переключиться с seabbios по умолчанию на OVMF только в том случае, если вы планируете использовать проброс устройств PCIe. Тип машины VMs определяет аппаратную компоновку виртуальной материнской платы виртуальной машины. Вы можете выбрать между стандартным Intel 440FX или чипсетом Q35, который также предоставляет виртуальную шину PCIe, и, таким образом, может быть предпочтительным, если вы планируете использовать проброс аппаратного обеспечения PCIe.

    Жесткий диск

    Proxmox ssd emulation что это. Смотреть фото Proxmox ssd emulation что это. Смотреть картинку Proxmox ssd emulation что это. Картинка про Proxmox ssd emulation что это. Фото Proxmox ssd emulation что это

    Если вы хотите, чтобы диспетчер резервного копирования Proxmox VE пропускал диск при резервном копировании виртуальной машины, вы можете установить параметр нет резервного копирования на этом диске.

    Если вы хотите, чтобы механизм репликации хранилища Proxmox VE пропускал диск при запуске задания репликации, вы можете установить параметр Пропустить репликацию на этом диске. Начиная с версии Proxmox VE 5.0, репликация требует, чтобы образы дисков находились в хранилище типа zfspool, поэтому добавление образа диска в другие типы хранилищ, когда для виртуальной машины настроена репликация, требуется опция пропустить репликацию для этого образа диска.

    Если вы хотите, чтобы диск был представлен гостю как твердотельный диск, а не вращающийся жесткий диск, вы можете установить опцию эмуляции SSD на этом диске. Нет никакого требования, чтобы базовое хранилище фактически поддерживалось твердотельными накопителями; эта функция может использоваться с физическими носителями любого типа. Обратите внимание, что эмуляция SSD не поддерживается на дисках VirtIO Block.

    Proxmox ssd emulation что это. Смотреть фото Proxmox ssd emulation что это. Смотреть картинку Proxmox ssd emulation что это. Картинка про Proxmox ssd emulation что это. Фото Proxmox ssd emulation что это

    Сокет процессора-это физический слот на материнской плате ПК, куда можно подключить процессор. Этот процессор может содержать одно или несколько ядер, которые являются независимыми процессорами. Есть ли у вас один сокет процессора с 4 ядрами или два сокета процессора с двумя ядрами, в основном не имеет значения с точки зрения производительности. Однако некоторые лицензии на программное обеспечение зависят от количества сокетов на машине, в этом случае имеет смысл установить количество сокетов на то, что позволяет лицензия.

    Увеличение числа виртуальных процессоров (ядер и сокетов) обычно обеспечивает повышение производительности, хотя это сильно зависит от использования виртуальной машины. Многопоточные приложения, конечно, выиграют от большого количества виртуальных процессоров, так как для каждого добавляемого виртуального процессора Qemu создаст новый поток выполнения на хост-системе. Если вы не уверены в рабочей нагрузке вашей виртуальной машины, обычно безопасно установить общее число ядер равным 2. Примечание Совершенно безопасно, если общее число ядер всех ваших виртуальных машин больше, чем число ядер на сервере (например, 4 виртуальных машины с 4 ядрами у каждой на машине только с 8 ядрами). В этом случае хост-система будет балансировать потоки выполнения Qemu между ядрами вашего сервера, как если бы вы запускали стандартное многопоточное приложение. Однако Proxmox VE не позволит запускать виртуальные машины с большим количеством виртуальных процессорных ядер, чем физически доступно, так как это приведет только к снижению производительности из-за стоимости контекстных переключателей. Ограничение ресурсов

    Qemu может эмулировать ряд различных типов процессоров от 486 до новейших процессоров Xeon. Каждое новое поколение процессоров добавляет новые функции, такие как аппаратный 3D-рендеринг, генерация случайных чисел, защита памяти и т. д. Обычно вы должны выбрать для своей виртуальной машины Тип процессора, который близко соответствует ЦП хост-системы, поскольку это означает, что функции ЦП хоста (также называемые флагами ЦП ) будут доступны в вашей виртуальной машине. Если требуется точное совпадение, можно установить тип процессора host, и в этом случае виртуальная машина будет иметь точно такие же флаги процессора, как и ваша хост-система.

    Но у этого есть и обратная сторона. Если вы хотите выполнить динамическую миграцию виртуальных машин между различными хостами, ваша виртуальная машина может оказаться на новой системе с другим типом процессора. Если флаги процессора, переданные гостю, отсутствуют, процесс qemu остановится. Для исправления этого Qemu имеет также свой собственный процессор типа kvm64, который Proxmox VE использует по умолчанию. kvm64-это Pentium 4 подобный тип процессора, который имеет уменьшенный набор флагов процессора, но гарантированно работает везде.

    Короче говоря, если вы заботитесь о динамической миграции и перемещении виртуальных машин между узлами, оставьте kvm64 по умолчанию. Если вы не заботитесь о динамической миграции или имеете однородный кластер, где все узлы имеют один и тот же процессор, Установите тип процессора на хост, так как теоретически это даст вашим гостям максимальную производительность.

    Флаги процессора, связанные с Meltdown/Spectre

    Для исправлений Spectre v1,v2,v4 ваш поставщик процессора или системы также должен предоставить так называемое “обновление микрокода” 5 для вашего процессора.

    Чтобы проверить, уязвим ли хост Proxmox VE, выполните следующую команду от имени root: Также доступен скрипт сообщества для обнаружения, является ли хост все еще уязвимым. 6

    4 Meltdown Attack https://meltdownattack.com/
    5 Вы можете использовать ‘intel-microcode’/’amd-microcode’ из Debian бесплатно, если ваш поставщик не предоставляет такого обновления. Обратите внимание, что не все затронутые процессоры могут быть обновлены для поддержки spec-ctrl.
    6 spectre-meltdown-checker https://meltdown.ovh/

    Необходим для того, чтобы исправить Spectre В4 (ПНЭ-2018-3639). Не входит по умолчанию ни в одну модель процессора Intel. Должен быть явно включен для всех моделей процессоров Intel. Требуется обновленный микрокод центрального процессора (intel-microcode >= 20180425).

    7 PCID теперь является критической функцией производительности/безопасности на x86 https://groups.google.com/forum/m/#!topic/mechanical-sympathy/L9mHTbeQLNU

    Рекомендуется указать, что хост не уязвим для Spectre V4 (CVE-2018-3639). Не входит по умолчанию ни в одну модель процессора AMD. Будущие аппаратные поколения CPU не будут уязвимы для CVE-2018-3639, и поэтому гостю следует сказать, чтобы он не включал свои средства защиты, выставляя amd-no-ssb. Это взаимоисключает Virtus-ssbd и amd-ssbd.

    NUMA

    Если используется опция NUMA, рекомендуется установить число сокетов равным числу сокетов хост-системы.

    Современные операционные системы ввели возможность горячего подключения и, в определенной степени, горячего отключения процессоров в работающих системах. Виртуализация позволяет нам избежать многих (физических) проблем, которые может вызвать реальное оборудование в таких сценариях. Тем не менее, это довольно новая и сложная функция, поэтому ее использование должно быть ограничено случаями, когда она абсолютно необходима. Большая часть функциональности может быть реализована с другими, хорошо протестированными и менее сложными функциями, см. Ограничения ресурсов.

    В Proxmox VE максимальное количество подключаемых процессоров всегда равно количество ядер * количество сокетов. Чтобы запустить виртуальную машину с меньшим, чем это общее количество ядер процессоров, можно использовать параметр vpus, он указывает, сколько vcpu должно быть подключено при запуске виртуальной машины. В настоящее время эта функция поддерживается только на Linux, требуется ядро ​​новее, чем 3.10, рекомендуется ядро ​​новее, чем 4.7.

    Примечание Горячее удаление CPU зависит от компьютера и требует поддержки гостевой ОС. Команда удаления не гарантирует, что удаление процессора действительно произойдет, обычно это запрос, направляется гостю с использованием механизма, зависимого от цели например, ACPI на x86/amd64.

    Память

    Для каждой виртуальной машины вы можете установить память фиксированного размера или попросить Proxmox VE динамически выделять память в зависимости от текущего использования оперативной памяти хоста.

    Фиксированное Выделение Памяти

    Proxmox ssd emulation что это. Смотреть фото Proxmox ssd emulation что это. Смотреть картинку Proxmox ssd emulation что это. Картинка про Proxmox ssd emulation что это. Фото Proxmox ssd emulation что это

    При установке памяти и минимальной памяти на одинаковый объем Proxmox VE просто выделит то, что вы укажете для вашей виртуальной машины.

    Даже при использовании фиксированного объема памяти, устройство ballooning добавляется к виртуальной машине, потому что оно предоставляет полезную информацию, например, сколько памяти действительно использует гость. В общем, вы должны оставить ballooning включенным, но если вы хотите отключить его (например, для отладки), просто снимите флажок ballooning устройства или установите в конфигурации.

    Автоматическое Выделение Памяти

    При установке минимальной памяти ниже, чем память, Proxmox VE будет следить за тем, чтобы указанный вами минимальный объем всегда был доступен виртуальной машине, и если использование оперативной памяти на хосте ниже 80%, будет динамически добавлять память гостю до указанного максимального объема памяти.

    Когда хосту не хватает оперативной памяти, виртуальная машина затем высвобождает некоторую память обратно на хост, заменяя запущенные процессы, если это необходимо, и запуская oom killer в крайнем случае. Передача памяти между хостом и гостем осуществляется через специальный драйвер ядра balloon, работающий внутри гостя, который захватывает или освобождает страницы памяти от хоста. 10

    Все дистрибутивы Linux, выпущенные после 2010 года, имеют драйвер ядра balloon. Для операционных систем Windows драйвер balloon должен быть установлен вручную и может вызвать замедление гостя, поэтому мы не рекомендуем использовать его на критических системах.

    При выделении оперативной памяти для ваших виртуальных машин, хорошее эмпирическое правило-всегда оставлять 1 ГБ оперативной памяти доступной для хоста.

    10 Хорошее объяснение внутренней работы balloon драйвера можно найти здесь: https://rwmj.wordpress.com/2010/07/17/-virtio-balloon/

    Сетевое устройство

    Proxmox ssd emulation что это. Смотреть фото Proxmox ssd emulation что это. Смотреть картинку Proxmox ssd emulation что это. Картинка про Proxmox ssd emulation что это. Фото Proxmox ssd emulation что это

    Если вы используете драйвер VirtIO, вы можете дополнительно активировать опцию Multiqueue. Эта опция позволяет гостевой ОС обрабатывать сетевые пакеты с использованием нескольких виртуальных процессоров, обеспечивая увеличение общего количества передаваемых пакетов.

    При использовании драйвера VirtIO с Proxmox VE каждая сетевая очередь NIC передается ядру хоста, где очередь обрабатывается потоком ядра, порожденным драйвером vhost. Если эта опция активирована, можно передать несколько сетевых очередей ядру хоста для каждой сетевой карты.

    При использовании Multiqueue рекомендуется установить для него значение, равное общему числу ядер вашего гостя. Кроме того, необходимо задать в виртуальной машине количество многоцелевых каналов на каждой виртуальной машине с помощью команды ethtool:

    где X-номер числа vCPU виртуальной машины.

    Следует отметить, что установка параметра Multiqueue в значение, превышающее единицу, приведет к увеличению нагрузки ЦП на хост-и гостевые системы по мере увеличения трафика. Мы рекомендуем устанавливать этот параметр только тогда, когда виртуальная машина должна обрабатывать большое количество входящих подключений, например, когда виртуальная машина работает как маршрутизатор, обратный прокси-сервер или нагруженный HTTP-сервер, выполняющий длительный опрос.

    Дисплей

    Вы можете изменить объем памяти, предоставленной виртуальному графическому процессору, установив опцию memory. Это позволит включить более высокое разрешение внутри виртуальной машины, особенно с SPICE/QXL.

    Выбор serialX в качестве типа дисплея отключает выход VGA и перенаправляет веб-консоль на выбранный последовательный порт. Настроенный параметр памяти дисплея в этом случае будет проигнорирован.

    11 qemu: использование цирруса не рекомендуется https://www.kraxel.org/blog/2014/10/qemu-using-cirrus-considered-harmful/

    Проброс USB

    vendor/product-id выглядит следующим образом: 0123:abcd, где 0123-идентификатор поставщика, а abcd-идентификатор продукта, то есть два одинаковых usb-устройства имеют один и тот же идентификатор.

    BIOS и UEFI

    Чтобы правильно эмулировать компьютер, QEMU должен использовать firmware(прошивку). Который на обычных PC (известен как BIOS или (U)EFI), выполняется как один из первых шагов при загрузке виртуальной машины. Он отвечает за выполнение базовой аппаратной инициализации и за обеспечение интерфейса к микропрограммному обеспечению и аппаратному обеспечению для операционной системы. По умолчанию QEMU использует для этого SeaBIOS, который является реализацией BIOS x86 с открытым исходным кодом. SeaBIOS-хороший выбор для большинства стандартных установок.

    Есть, однако, некоторые сценарии, в которых BIOS не является хорошей прошивкой для загрузки, например, если вы хотите сделать проброс VGA. [12] в таких случаях лучше использовать OVMF, который является реализацией UEFI с открытым исходным кодом. [13]

    Если вы хотите использовать OVMF, необходимо учитывать следующие факторы:

    Для сохранения таких вещей, как порядок загрузки, необходим диск EFI. Этот диск будет включен в резервные копии и моментальные снимки, и может быть только один.

    При использовании OVMF с виртуальным дисплеем (без VGA passthrough), вам нужно установить разрешение клиента в меню OVMF(в которое вы можете попасть нажав кнопку ESC во время загрузки), или вы должны выбрать SPICE в качестве типа дисплея.

    Inter-VM разделяемая память

    Вы можете добавить устройство общей памяти между виртуальными машинами (ivshmem), которое позволяет обмениваться памятью между хостом и гостем, а также между несколькими гостями.

    Аудио-устройство

    Автоматический запуск и выключение виртуальных машин

    Proxmox ssd emulation что это. Смотреть фото Proxmox ssd emulation что это. Смотреть картинку Proxmox ssd emulation что это. Картинка про Proxmox ssd emulation что это. Фото Proxmox ssd emulation что это

    Дополнения SPICE

    Примечание Раздел отсутствует а исходном руководстве, добавлен из Proxmox WiKi Дополнения SPICE-это дополнительные функции, которые могут улучшить возможности удаленного просмотра.

    Чтобы включить их через графический интерфейс, перейдите на панель параметров виртуальной машины. Выполните следующую команду, чтобы включить их через CLI: На заметку Для использования этих функций Дисплей виртуальной машины должен быть настроен как SPICE (qxl). Общий Доступ К Папкам

    Для гостей Windows установщик демона Spice WebDAV можно загрузить с официального сайта SPICE.

    В большинстве дистрибутивов Linux есть пакет под названием spice-webdavd, которые могут быть установлены.

    На заметку Общий доступ к папкам в настоящее время работает только в Linux-версии Virt-Viewer. Внимание Экспериментально! В настоящее время эта функция не работает стабильно. Потоковое видео

    Решение проблем
    Общая папка не отображается

    Убедитесь, что Служба WebDAV включена и запущена в гостевой системе. В Windows он называется Spice webdav proxy. В Linux имя spice-webdavd, но может отличаться в зависимости от дистрибутива.

    Источник

    Qemu/KVM Virtual Machines

    Qemu (short form for Quick Emulator) is an open source hypervisor that emulates a physical computer. From the perspective of the host system where Qemu is running, Qemu is a user program which has access to a number of local resources like partitions, files, network cards which are then passed to an emulated computer which sees them as if they were real devices.

    A guest operating system running in the emulated computer accesses these devices, and runs as if it were running on real hardware. For instance, you can pass an ISO image as a parameter to Qemu, and the OS running in the emulated computer will see a real CD-ROM inserted into a CD drive.

    Qemu can emulate a great variety of hardware from ARM to Sparc, but Proxmox VE is only concerned with 32 and 64 bits PC clone emulation, since it represents the overwhelming majority of server hardware. The emulation of PC clones is also one of the fastest due to the availability of processor extensions which greatly speed up Qemu when the emulated architecture is the same as the host architecture.

    You may sometimes encounter the term KVM (Kernel-based Virtual Machine). It means that Qemu is running with the support of the virtualization processor extensions, via the Linux KVM module. In the context of Proxmox VE Qemu and KVM can be used interchangeably, as Qemu in Proxmox VE will always try to load the KVM module.

    Qemu inside Proxmox VE runs as a root process, since this is required to access block and PCI devices.

    Emulated devices and paravirtualized devices

    The PC hardware emulated by Qemu includes a mainboard, network controllers, SCSI, IDE and SATA controllers, serial ports (the complete list can be seen in the kvm(1) man page) all of them emulated in software. All these devices are the exact software equivalent of existing hardware devices, and if the OS running in the guest has the proper drivers it will use the devices as if it were running on real hardware. This allows Qemu to runs unmodified operating systems.

    This however has a performance cost, as running in software what was meant to run in hardware involves a lot of extra work for the host CPU. To mitigate this, Qemu can present to the guest operating system paravirtualized devices, where the guest OS recognizes it is running inside Qemu and cooperates with the hypervisor.

    Qemu relies on the virtio virtualization standard, and is thus able to present paravirtualized virtio devices, which includes a paravirtualized generic disk controller, a paravirtualized network card, a paravirtualized serial port, a paravirtualized SCSI controller, etc …

    Virtual Machines Settings

    Generally speaking Proxmox VE tries to choose sane defaults for virtual machines (VM). Make sure you understand the meaning of the settings you change, as it could incur a performance slowdown, or putting your data at risk.

    General Settings

    Proxmox ssd emulation что это. Смотреть фото Proxmox ssd emulation что это. Смотреть картинку Proxmox ssd emulation что это. Картинка про Proxmox ssd emulation что это. Фото Proxmox ssd emulation что это

    General settings of a VM include

    the Node : the physical server on which the VM will run

    the VM ID: a unique number in this Proxmox VE installation used to identify your VM

    Name: a free form text string you can use to describe the VM

    Resource Pool: a logical group of VMs

    OS Settings

    Proxmox ssd emulation что это. Смотреть фото Proxmox ssd emulation что это. Смотреть картинку Proxmox ssd emulation что это. Картинка про Proxmox ssd emulation что это. Фото Proxmox ssd emulation что это

    When creating a virtual machine (VM), setting the proper Operating System(OS) allows Proxmox VE to optimize some low level parameters. For instance Windows OS expect the BIOS clock to use the local time, while Unix based OS expect the BIOS clock to have the UTC time.

    System Settings

    On VM creation you can change some basic system components of the new VM. You can specify which display type you want to use.

    Proxmox ssd emulation что это. Смотреть фото Proxmox ssd emulation что это. Смотреть картинку Proxmox ssd emulation что это. Картинка про Proxmox ssd emulation что это. Фото Proxmox ssd emulation что это

    Additionally, the SCSI controller can be changed. If you plan to install the QEMU Guest Agent, or if your selected ISO image already ships and installs it automatically, you may want to tick the Qemu Agent box, which lets Proxmox VE know that it can use its features to show some more information, and complete some actions (for example, shutdown or snapshots) more intelligently.

    Proxmox VE allows to boot VMs with different firmware and machine types, namely SeaBIOS and OVMF. In most cases you want to switch from the default SeaBIOS to OVMF only if you plan to use PCIe pass through. A VMs Machine Type defines the hardware layout of the VM’s virtual motherboard. You can choose between the default Intel 440FX or the Q35 chipset, which also provides a virtual PCIe bus, and thus may be desired if one wants to pass through PCIe hardware.

    Hard Disk

    Bus/Controller

    Qemu can emulate a number of storage controllers:

    the IDE controller, has a design which goes back to the 1984 PC/AT disk controller. Even if this controller has been superseded by recent designs, each and every OS you can think of has support for it, making it a great choice if you want to run an OS released before 2003. You can connect up to 4 devices on this controller.

    the SATA (Serial ATA) controller, dating from 2003, has a more modern design, allowing higher throughput and a greater number of devices to be connected. You can connect up to 6 devices on this controller.

    the SCSI controller, designed in 1985, is commonly found on server grade hardware, and can connect up to 14 storage devices. Proxmox VE emulates by default a LSI 53C895A controller.

    A SCSI controller of type VirtIO SCSI is the recommended setting if you aim for performance and is automatically selected for newly created Linux VMs since Proxmox VE 4.3. Linux distributions have support for this controller since 2012, and FreeBSD since 2014. For Windows OSes, you need to provide an extra iso containing the drivers during the installation. If you aim at maximum performance, you can select a SCSI controller of type VirtIO SCSI single which will allow you to select the IO Thread option. When selecting VirtIO SCSI single Qemu will create a new controller for each disk, instead of adding all disks to the same controller.

    The VirtIO Block controller, often just called VirtIO or virtio-blk, is an older type of paravirtualized controller. It has been superseded by the VirtIO SCSI Controller, in terms of features.

    Image Format

    On each controller you attach a number of emulated hard disks, which are backed by a file or a block device residing in the configured storage. The choice of a storage type will determine the format of the hard disk image. Storages which present block devices (LVM, ZFS, Ceph) will require the raw disk image format, whereas files based storages (Ext4, NFS, CIFS, GlusterFS) will let you to choose either the raw disk image format or the QEMU image format.

    the QEMU image format is a copy on write format which allows snapshots, and thin provisioning of the disk image.

    the raw disk image is a bit-to-bit image of a hard disk, similar to what you would get when executing the dd command on a block device in Linux. This format does not support thin provisioning or snapshots by itself, requiring cooperation from the storage layer for these tasks. It may, however, be up to 10% faster than the QEMU image format.
    [See this benchmark for details https://events.static.linuxfound.org/sites/events/files/slides/CloudOpen2013_Khoa_Huynh_v3.pdf]

    the VMware image format only makes sense if you intend to import/export the disk image to other hypervisors.

    Cache Mode

    Setting the Cache mode of the hard drive will impact how the host system will notify the guest systems of block write completions. The No cache default means that the guest system will be notified that a write is complete when each block reaches the physical storage write queue, ignoring the host page cache. This provides a good balance between safety and speed.

    If you want the Proxmox VE backup manager to skip a disk when doing a backup of a VM, you can set the No backup option on that disk.

    Trim/Discard

    If your storage supports thin provisioning (see the storage chapter in the Proxmox VE guide), you can activate the Discard option on a drive. With Discard set and a TRIM-enabled guest OS
    [TRIM, UNMAP, and discard https://en.wikipedia.org/wiki/Trim_%28computing%29]
    , when the VM’s filesystem marks blocks as unused after deleting files, the controller will relay this information to the storage, which will then shrink the disk image accordingly. For the guest to be able to issue TRIM commands, you must enable the Discard option on the drive. Some guest operating systems may also require the SSD Emulation flag to be set. Note that Discard on VirtIO Block drives is only supported on guests using Linux Kernel 5.0 or higher.

    If you would like a drive to be presented to the guest as a solid-state drive rather than a rotational hard disk, you can set the SSD emulation option on that drive. There is no requirement that the underlying storage actually be backed by SSDs; this feature can be used with physical media of any type. Note that SSD emulation is not supported on VirtIO Block drives.

    IO Thread

    The option IO Thread can only be used when using a disk with the VirtIO controller, or with the SCSI controller, when the emulated controller type is VirtIO SCSI single. With this enabled, Qemu creates one I/O thread per storage controller, rather than a single thread for all I/O. This can increase performance when multiple disks are used and each disk has its own storage controller.

    Proxmox ssd emulation что это. Смотреть фото Proxmox ssd emulation что это. Смотреть картинку Proxmox ssd emulation что это. Картинка про Proxmox ssd emulation что это. Фото Proxmox ssd emulation что это

    A CPU socket is a physical slot on a PC motherboard where you can plug a CPU. This CPU can then contain one or many cores, which are independent processing units. Whether you have a single CPU socket with 4 cores, or two CPU sockets with two cores is mostly irrelevant from a performance point of view. However some software licenses depend on the number of sockets a machine has, in that case it makes sense to set the number of sockets to what the license allows you.

    Increasing the number of virtual CPUs (cores and sockets) will usually provide a performance improvement though that is heavily dependent on the use of the VM. Multi-threaded applications will of course benefit from a large number of virtual CPUs, as for each virtual cpu you add, Qemu will create a new thread of execution on the host system. If you’re not sure about the workload of your VM, it is usually a safe bet to set the number of Total cores to 2.

    It is perfectly safe if the overall number of cores of all your VMs is greater than the number of cores on the server (e.g., 4 VMs with each 4 cores on a machine with only 8 cores). In that case the host system will balance the Qemu execution threads between your server cores, just like if you were running a standard multi-threaded application. However, Proxmox VE will prevent you from starting VMs with more virtual CPU cores than physically available, as this will only bring the performance down due to the cost of context switches.

    Resource Limits

    VMs can, depending on their configuration, use additional threads e.g., for networking or IO operations but also live migration. Thus a VM can show up to use more CPU time than just its virtual CPUs could use. To ensure that a VM never uses more CPU time than virtual CPUs assigned set the cpulimit setting to the same value as the total core count.

    CPU Type

    Qemu can emulate a number different of CPU types from 486 to the latest Xeon processors. Each new processor generation adds new features, like hardware assisted 3d rendering, random number generation, memory protection, etc … Usually you should select for your VM a processor type which closely matches the CPU of the host system, as it means that the host CPU features (also called CPU flags ) will be available in your VMs. If you want an exact match, you can set the CPU type to host in which case the VM will have exactly the same CPU flags as your host system.

    This has a downside though. If you want to do a live migration of VMs between different hosts, your VM might end up on a new system with a different CPU type. If the CPU flags passed to the guest are missing, the qemu process will stop. To remedy this Qemu has also its own CPU type kvm64, that Proxmox VE uses by defaults. kvm64 is a Pentium 4 look a like CPU type, which has a reduced CPU flags set, but is guaranteed to work everywhere.

    In short, if you care about live migration and moving VMs between nodes, leave the kvm64 default. If you don’t care about live migration or have a homogeneous cluster where all nodes have the same CPU, set the CPU type to host, as in theory this will give your guests maximum performance.

    Custom CPU Types

    You can specify custom CPU types with a configurable set of features. These are maintained in the configuration file /etc/pve/virtual-guest/cpu-models.conf by an administrator. See man cpu-models.conf for format details.

    Meltdown / Spectre related CPU flags

    There are several CPU flags related to the Meltdown and Spectre vulnerabilities
    [Meltdown Attack https://meltdownattack.com/]
    which need to be set manually unless the selected CPU type of your VM already enables them by default.

    There are two requirements that need to be fulfilled in order to use these CPU flags:

    The host CPU(s) must support the feature and propagate it to the guest’s virtual CPU(s)

    The guest operating system must be updated to a version which mitigates the attacks and is able to utilize the CPU feature

    Otherwise you need to set the desired CPU flag of the virtual CPU, either by editing the CPU options in the WebUI, or by setting the flags property of the cpu option in the VM configuration file.

    For Spectre v1,v2,v4 fixes, your CPU or system vendor also needs to provide a so-called “microcode update”
    [You can use ‘intel-microcode’ / ‘amd-microcode’ from Debian non-free if your vendor does not provide such an update. Note that not all affected CPUs can be updated to support spec-ctrl.]
    for your CPU.

    To check if the Proxmox VE host is vulnerable, execute the following command as root:

    A community script is also available to detect is the host is still vulnerable.
    [spectre-meltdown-checker https://meltdown.ovh/]

    Intel processors

    This reduces the performance impact of the Meltdown (CVE-2017-5754) mitigation called Kernel Page-Table Isolation (KPTI), which effectively hides the Kernel memory from the user space. Without PCID, KPTI is quite an expensive mechanism
    [PCID is now a critical performance/security feature on x86 https://groups.google.com/forum/m/#!topic/mechanical-sympathy/L9mHTbeQLNU]
    .

    To check if the Proxmox VE host supports PCID, execute the following command as root:

    If this does not return empty your host’s CPU has support for pcid.

    Required to enable the Spectre V4 (CVE-2018-3639) fix. Not included by default in any Intel CPU model. Must be explicitly turned on for all Intel CPU models. Requires an updated host CPU microcode(intel-microcode >= 20180703).

    AMD processors

    Required to enable the Spectre v4 (CVE-2018-3639) fix. Not included by default in any AMD CPU model. Must be explicitly turned on for all AMD CPU models. This should be provided to guests, even if amd-ssbd is also provided, for maximum guest compatibility. Note that this must be explicitly enabled when when using the «host» cpu model, because this is a virtual feature which does not exist in the physical CPUs.

    Required to enable the Spectre v4 (CVE-2018-3639) fix. Not included by default in any AMD CPU model. Must be explicitly turned on for all AMD CPU models. This provides higher performance than virt-ssbd, therefore a host supporting this should always expose this to guests if possible. virt-ssbd should none the less also be exposed for maximum guest compatibility as some kernels only know about virt-ssbd.

    Recommended to indicate the host is not vulnerable to Spectre V4 (CVE-2018-3639). Not included by default in any AMD CPU model. Future hardware generations of CPU will not be vulnerable to CVE-2018-3639, and thus the guest should be told not to enable its mitigations, by exposing amd-no-ssb. This is mutually exclusive with virt-ssbd and amd-ssbd.

    If the NUMA option is used, it is recommended to set the number of sockets to the number of nodes of the host system.

    vCPU hot-plug

    Modern operating systems introduced the capability to hot-plug and, to a certain extent, hot-unplug CPUs in a running system. Virtualization allows us to avoid a lot of the (physical) problems real hardware can cause in such scenarios. Still, this is a rather new and complicated feature, so its use should be restricted to cases where its absolutely needed. Most of the functionality can be replicated with other, well tested and less complicated, features, see Resource Limits.

    Currently only this feature is only supported on Linux, a kernel newer than 3.10 is needed, a kernel newer than 4.7 is recommended.

    You can use a udev rule as follow to automatically set new CPUs as online in the guest:

    Note: CPU hot-remove is machine dependent and requires guest cooperation. The deletion command does not guarantee CPU removal to actually happen, typically it’s a request forwarded to guest using target dependent mechanism, e.g., ACPI on x86/amd64.

    Memory

    For each VM you have the option to set a fixed size memory or asking Proxmox VE to dynamically allocate memory based on the current RAM usage of the host.

    Proxmox ssd emulation что это. Смотреть фото Proxmox ssd emulation что это. Смотреть картинку Proxmox ssd emulation что это. Картинка про Proxmox ssd emulation что это. Фото Proxmox ssd emulation что это

    Fixed Memory Allocation

    When setting memory and minimum memory to the same amount Proxmox VE will simply allocate what you specify to your VM.

    Even when using a fixed memory size, the ballooning device gets added to the VM, because it delivers useful information such as how much memory the guest really uses. In general, you should leave ballooning enabled, but if you want to disable it (e.g. for debugging purposes), simply uncheck Ballooning Device or set

    in the configuration.

    Automatic Memory Allocation

    When setting the minimum memory lower than memory, Proxmox VE will make sure that the minimum amount you specified is always available to the VM, and if RAM usage on the host is below 80%, will dynamically add memory to the guest up to the maximum memory specified.

    When the host is running low on RAM, the VM will then release some memory back to the host, swapping running processes if needed and starting the oom killer in last resort. The passing around of memory between host and guest is done via a special balloon kernel driver running inside the guest, which will grab or release memory pages from the host.
    [A good explanation of the inner workings of the balloon driver can be found here https://rwmj.wordpress.com/2010/07/17/virtio-balloon/]

    All Linux distributions released after 2010 have the balloon kernel driver included. For Windows OSes, the balloon driver needs to be added manually and can incur a slowdown of the guest, so we don’t recommend using it on critical systems.

    When allocating RAM to your VMs, a good rule of thumb is always to leave 1GB of RAM available to the host.

    Network Device

    Proxmox ssd emulation что это. Смотреть фото Proxmox ssd emulation что это. Смотреть картинку Proxmox ssd emulation что это. Картинка про Proxmox ssd emulation что это. Фото Proxmox ssd emulation что это

    Each VM can have many Network interface controllers (NIC), of four different types:

    Intel E1000 is the default, and emulates an Intel Gigabit network card.

    the VirtIO paravirtualized NIC should be used if you aim for maximum performance. Like all VirtIO devices, the guest OS should have the proper driver installed.

    the Realtek 8139 emulates an older 100 MB/s network card, and should only be used when emulating older operating systems ( released before 2002 )

    the vmxnet3 is another paravirtualized device, which should only be used when importing a VM from another hypervisor.

    Proxmox VE will generate for each NIC a random MAC address, so that your VM is addressable on Ethernet networks.

    The NIC you added to the VM can follow one of two different models:

    in the default Bridged mode each virtual NIC is backed on the host by a tap device, ( a software loopback device simulating an Ethernet NIC ). This tap device is added to a bridge, by default vmbr0 in Proxmox VE. In this mode, VMs have direct access to the Ethernet LAN on which the host is located.

    in the alternative NAT mode, each virtual NIC will only communicate with the Qemu user networking stack, where a built-in router and DHCP server can provide network access. This built-in DHCP will serve addresses in the private 10.0.2.0/24 range. The NAT mode is much slower than the bridged mode, and should only be used for testing. This mode is only available via CLI or the API, but not via the WebUI.

    You can also skip adding a network device when creating a VM by selecting No network device.

    Multiqueue

    If you are using the VirtIO driver, you can optionally activate the Multiqueue option. This option allows the guest OS to process networking packets using multiple virtual CPUs, providing an increase in the total number of packets transferred.

    When using the VirtIO driver with Proxmox VE, each NIC network queue is passed to the host kernel, where the queue will be processed by a kernel thread spawned by the vhost driver. With this option activated, it is possible to pass multiple network queues to the host kernel for each NIC.

    When using Multiqueue, it is recommended to set it to a value equal to the number of Total Cores of your guest. You also need to set in the VM the number of multi-purpose channels on each VirtIO NIC with the ethtool command:

    where X is the number of the number of vcpus of the VM.

    You should note that setting the Multiqueue parameter to a value greater than one will increase the CPU load on the host and guest systems as the traffic increases. We recommend to set this option only when the VM has to process a great number of incoming connections, such as when the VM is running as a router, reverse proxy or a busy HTTP server doing long polling.

    Display

    QEMU can virtualize a few types of VGA hardware. Some examples are:

    std, the default, emulates a card with Bochs VBE extensions.

    cirrus, this was once the default, it emulates a very old hardware module with all its problems. This display type should only be used if really necessary
    [https://www.kraxel.org/blog/2014/10/qemu-using-cirrus-considered-harmful/ qemu: using cirrus considered harmful]
    , e.g., if using Windows XP or earlier

    vmware, is a VMWare SVGA-II compatible adapter.

    qxl, is the QXL paravirtualized graphics card. Selecting this also enables SPICE (a remote viewer protocol) for the VM.

    You can edit the amount of memory given to the virtual GPU, by setting the memory option. This can enable higher resolutions inside the VM, especially with SPICE/QXL.

    As the memory is reserved by display device, selecting Multi-Monitor mode for SPICE (e.g., qxl2 for dual monitors) has some implications:

    Windows needs a device for each monitor, so if your ostype is some version of Windows, Proxmox VE gives the VM an extra device per monitor. Each device gets the specified amount of memory.

    Linux VMs, can always enable more virtual monitors, but selecting a Multi-Monitor mode multiplies the memory given to the device with the number of monitors.

    Selecting serialX as display type disables the VGA output, and redirects the Web Console to the selected serial port. A configured display memory setting will be ignored in that case.

    USB Passthrough

    There are two different types of USB passthrough devices:

    Host USB passthrough

    SPICE USB passthrough

    Host USB passthrough works by giving a VM a USB device of the host. This can either be done via the vendor- and product-id, or via the host bus and port.

    The vendor/product-id looks like this: 0123:abcd, where 0123 is the id of the vendor, and abcd is the id of the product, meaning two pieces of the same usb device have the same id.

    The bus/port looks like this: 1-2.3.4, where 1 is the bus and 2.3.4 is the port path. This represents the physical ports of your host (depending of the internal order of the usb controllers).

    If a device is present in a VM configuration when the VM starts up, but the device is not present in the host, the VM can boot without problems. As soon as the device/port is available in the host, it gets passed through.

    Using this kind of USB passthrough means that you cannot move a VM online to another host, since the hardware is only available on the host the VM is currently residing.

    The second type of passthrough is SPICE USB passthrough. This is useful if you use a SPICE client which supports it. If you add a SPICE USB port to your VM, you can passthrough a USB device from where your SPICE client is, directly to the VM (for example an input device or hardware dongle).

    BIOS and UEFI

    In order to properly emulate a computer, QEMU needs to use a firmware. Which, on common PCs often known as BIOS or (U)EFI, is executed as one of the first steps when booting a VM. It is responsible for doing basic hardware initialization and for providing an interface to the firmware and hardware for the operating system. By default QEMU uses SeaBIOS for this, which is an open-source, x86 BIOS implementation. SeaBIOS is a good choice for most standard setups.

    Some operating systems (such as Windows 11) may require use of an UEFI compatible implementation instead. In such cases, you must rather use OVMF, which is an open-source UEFI implementation.
    [See the OVMF Project https://github.com/tianocore/tianocore.github.io/wiki/OVMF]

    There are other scenarios in which a BIOS is not a good firmware to boot from, e.g. if you want to do VGA passthrough.
    [Alex Williamson has a very good blog entry about this https://vfio.blogspot.co.at/2014/08/primary-graphics-assignment-without-vga.html]

    If you want to use OVMF, there are several things to consider:

    In order to save things like the boot order, there needs to be an EFI Disk. This disk will be included in backups and snapshots, and there can only be one.

    You can create such a disk with the following command:

    Источник

    Добавить комментарий

    Ваш адрес email не будет опубликован. Обязательные поля помечены *