如何将VirtualBox 5.0升级至5.2?升级后Whonix数据是否丢失?
Hey there, let's tackle your two questions one by one—this is straightforward once you know the details:
Rest easy: a standard VirtualBox upgrade will NOT delete your Whonix files or data. Here's why: your Whonix virtual machine stores all its data in separate disk image files (like .vdi or .vmdk) and configuration files, which live outside the VirtualBox program itself. Upgrading VirtualBox only updates the software that runs your VMs—it doesn't touch the actual VM data files.
That said, it's always smart to play it safe before any system change. A quick backup takes minutes and eliminates all risk:
- Simply copy the entire Whonix virtual machine folder (found in your VirtualBox default VM directory) to an external drive or cloud storage.
- Or use VirtualBox's built-in "Export Appliance" feature to package the entire VM into an
.ovafile—this lets you restore the exact state of your VM if anything goes wrong.
The process varies slightly by operating system, but here's the step-by-step for the most common platforms:
Windows
- First, shut down all running VMs and fully exit VirtualBox.
- Open Control Panel > Programs and Features, find "VirtualBox 5.0", and click "Uninstall". Don't worry—this won't delete your VM files.
- Download the VirtualBox 5.2 installer matching your system's architecture (32-bit or 64-bit).
- Run the installer and follow the prompts. Keep the default settings—your existing VMs will automatically show up in the new VirtualBox instance once installation finishes.
macOS
- Close all running VMs and quit VirtualBox completely.
- Open your Applications folder, drag the VirtualBox icon to the Trash, then empty the Trash.
- Download the VirtualBox 5.2 DMG package.
- Open the DMG, double-click the installer, and follow the on-screen instructions. When you launch the new VirtualBox, your Whonix VM will be right where you left it.
Linux (Debian/Ubuntu-Based Distros)
- Shut down all VMs and exit VirtualBox.
- Open a terminal and uninstall the old version first:
sudo apt remove --purge virtualbox-5.0 sudo apt autoremove - Add the official VirtualBox 5.2 repository to your system:
echo "deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list - Import the repository's public key to verify packages:
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add - - Update your package list and install VirtualBox 5.2:
sudo apt update sudo apt install virtualbox-5.2 - Launch the new VirtualBox—your Whonix VM will be in the VM list ready to go.
Quick Post-Upgrade Tip
When you first start your Whonix VM after the upgrade, VirtualBox might prompt you to "Upgrade VM Hardware Version". It's a good idea to do this—it ensures better compatibility with the new VirtualBox version, which can fix stability issues and improve performance.
内容的提问来源于stack exchange,提问作者Albert

