Установка VirtualBox в Windows

Введение

VirtualBox (Oracle VM VirtualBox) — программный продукт виртуализации для операционных систем Microsoft Windows , Linux , FreeBSD, macOS, Solaris/OpenSolaris, ReactOS, DOS и других.

Скачать

Скачать дистрибутив можно с сайта virtualbox.org

Выберите Windows hosts

alt
Установка VirtualBox в Windows 10

В зависимости от текущей версии будет скачан файл вида

VirtualBox-X.X.X-XXXXXX-Win.exe

В этом примере скачан файл VirtualBox-7.0.6-155176-Win.exe

Подготовка к установке

Установите последнюю стабильную версию Python

Инструкцию о том как это сделать вы можете найти здесь

Запустите PowerShell с правами администратора

Обновите Pip

python.exe -m pip install --upgrade pip

Requirement already satisfied: pip in c:\users\andrei\appdata\local\programs\python\python311\lib\site-packages (22.3.1) Collecting pip Using cached pip-23.0.1-py3-none-any.whl (2.1 MB) Installing collected packages: pip Attempting uninstall: pip Found existing installation: pip 22.3.1 Uninstalling pip-22.3.1: Successfully uninstalled pip-22.3.1 Successfully installed pip-23.0.1

Установите pywin32

python -m pip install pywin32

Collecting pywin32 Downloading pywin32-305-cp311-cp311-win_amd64.whl (12.1 MB) ---------------------------------------- 12.1/12.1 MB 21.1 MB/s eta 0:00:00 Installing collected packages: pywin32 Successfully installed pywin32-305

Установка

alt
Установка VirtualBox в Windows 10

alt
Установка VirtualBox в Windows 10

alt
Установка VirtualBox в Windows 10

alt
Установка VirtualBox в Windows 10

Если вы видите следующую ошибку, скорее всего вы не установили заранее pywin32

Отмените установку и выполните подготовительные шаги

alt
Установка VirtualBox в Windows 10

alt
Установка VirtualBox в Windows 10

alt
Установка VirtualBox в Windows 10

Перейдите в раздел подготовительные шаги и установите pywin32

Установка с winget

В современных версиях Windows доступна возможность установки VirtualBox с помощью winget

winget install --id Oracle.VirtualBox --exact --silent --accept-source-agreements --accept-package-agreements

Пример PowerShell скрипта для установки VirtualBox

# Ensure script runs with admin privileges if (-not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Write-Host "Please run PowerShell as Administrator." -ForegroundColor Red exit } # Update winget sources Write-Host "Updating winget sources..." winget source update # Install VirtualBox Write-Host "Installing Oracle VirtualBox..." winget install --id Oracle.VirtualBox --exact --silent --accept-source-agreements --accept-package-agreements # Confirm installation Write-Host "Checking installation..." winget list --id Oracle.VirtualBox

Updating winget sources... Updating all sources... Updating source: msstore... Done Updating source: winget... ██████████████████████████████ 100% Done Updating source: winget-font... ██████████████████████████████ 100% Done Installing Oracle VirtualBox... Found Oracle VirtualBox [Oracle.VirtualBox] Version 7.2.4 This application is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. This package requires the following dependencies: - Packages Microsoft.VCRedist.2015+.x64 Downloading https://download.virtualbox.org/virtualbox/7.2.4/VirtualBox-7.2.4-170995-Win.exe ██████████████████████████████ 168 MB / 168 MB Successfully verified installer hash Starting package install... Successfully installed Checking installation... Name Id Version Source --------------------------------------------------------- Oracle VirtualBox 7.2.4 Oracle.VirtualBox 7.2.4 winget

Автор статьи: Андрей Олегович