Importing Legacy Windows XP or Windows 2003 from Virtualbox to Proxmox

Problem Statement:

  • I have an old Windows 2003 32 bit server running in Virtualbox.
  • Since Virtualbox is under decommissioned, it is intended to be migrated to Proxmox VE

Before Migration or export of VM from Virtualbox, following .reg file is required to be installed on Windows 2003 server to avoid IDE incompatibility and avoid BSOD or Blue Scree of Death

Download file: https://pve.proxmox.com/mediawiki/images/f/f5/Mergeide.zip

Once the registry file is imported, you can shut down the virtual machine and start exporting.

You can follow my earlier post of https://tweenpath.net/convert-virtualbox-vm-proxmox-ve/ and continue.

This worked on Windows 2003 the same will work for Windows XP VM.

Share

Remove VirtualBox from Linux

Step 1: Check the VirtualBox Version (Optional)

First, check out the Virtualbox installed version by specifying the application package name as “vboxmange” name with the “version” flag:  

$ vboxmanage --version


The Virtualbox installed version is “6.1.38”.

Step 2: Uninstall Virtual Box

Use the default package manager alongside the “–remove” and “–purge” flags to completely remove the  “VirtualBox” tool. 

The “–remove” flag will remove the installation files, and the “–purge” will uninstall the configuration files. The “purge” flag is not used in Fedora/CentOS/RHEL because its “remove” flag completely deletes all the files of the package:

$ sudo dnf remove virtualbox                           #For CentOS/RHEL
$ sudo dnf remove virtualbox                           #For Fedora
$ sudo apt --purge remove virtualbox                   #For Ubuntu/Debian-Based

The highlighted section confirms that all the installation and configuration files of Virtualbox have been removed.

Step 3: Remove VirtualBox Dependencies

When an application is installed in the Linux system, additional dependencies are installed. Execute the “autoremove” command to remove the additional dependencies of Virtualbox:

$ sudo yum autoremove virtualbox                   #For CentOS/RHEL
$ sudo apt autoremove virtualbox                   #For Ubuntu/Debian-Based
$ sudo dnf autoremove virtualbox                   #For Fedora

The Virtualbox dependencies have also been removed completely.

Step 4: Delete All Virtual Machines

The Virtualbox contains the virtual machine occupying a specific size in the virtual hard drives. By default, the virtual machines of VirtualBox are created in the “Home” directory, while it can be different in your case. So, use the path of the virtual machines as per your system. 

To delete these files and settings, run the “rm(remove)” command with the combination of “R(recursively) and “f(forcefully)” flags in this way:

$ sudo rm ~/"VirtualBox VMs" -Rf
$ sudo rm ~/.config/VirtualBox/ -Rf

The first command deletes the virtual machine’s files, and the second removes their setting from the virtual hard drive.

Step 4: Verify the VirtualBox

Verify the “VirtualBox” uninstallation process by again executing the “version” command on the terminal:

$ vboxmanage --version

It is verified that “VirtualBox” has been completely removed from the Linux system.

Src:
https://itslinuxfoss.com/completely-remove-virtualbox-from-linux/#google_vignette

Share

Convert VirtualBox VM to ProxMox VE

  1. On the VirtualBox host, launch VirtualBox
  2. Right click the VM to convert > Settings
  3. Select Storage from the left navigation
  4. Click the virtual hard disk and copy the Location value for the full path of the disk to the clipboard
  5. Right click on the Start menu > Run > type cmd.exe > Press Enter
  6. Enter the following commands in the command prompt
    # change directory to VirtualBox installation
    cd %programfiles%\Oracle\VirtualBox
    # convert the .vdi to raw .img
    VBoxManage clonehd --format RAW "pasted\full\path\to.vdi" "pasted\full\path\to.raw"
  7. Once the .vdi to .raw conversion completes, open a web browser and navigate to the ProxMox web UI https://ProxMoxDNSorIP:8006/
  8. Click the Create VM button at the top right
  9. On the General tab, enter a VM Name and note the VM ID generated > click Next
  10. On the OS tab select Do not use any media and set the Guest OS > click Next
  11. On the System tab click Next
  12. On the Hard Disk tab set the Disk size to 0.001 > click Next
  13. On the CPU tab set the number of CPUs > click Next
  14. On the Memory tab set the amount of memory to allocate in MiB > click Next
  15. On the Network tab click Next
  16. On the Confirm tab review the settings and click Finish
  17. Select the newly created VM from the left navigation panel > Hardware
  18. Click the Hard Disk to select it
  19. Click the Detach button to detach the hard disk from the VM
  20. Click the Unused disk
  21. Click the Remove button to permanently delete it
  22. Download WinSCP Download
  23. Extract WinSCP and run the executable
  24. Connect to the ProxMox IP server via WinSCP
  25. Copy the VirtualBox created .raw file to a location on the ProxMox server that has enough free disk space, /root for example
  26. Back in the browser, open the ProxMox host Shell
  27. Run the following command to import the raw disk, modify the .raw file name and VM ID noted earlier
    # import the raw disk
    # usage:
    # qm importdisk <VM ID> /root/<source disk file>.raw <destination storage pool name>
    qm importdisk 100 vbox.raw HDD_500GB --format qcow2
  28. Once the disk import completes, select the target VM from the left navigation menu > Hardware
  29. Double click the Unused Disk > Click the Add button
  30. Select Options from the left navigation sub-menu
  31. Double click Boot Order
  32. Check the Enabled box next to the hard disk
  33. Drag the Hard disk up in the boot order as needed, typically below the CD-ROM device
  34. Click OK
  35. Click the Start button in the top right of the screen
  36. Click the Console link to watch the boot process

Src:

https://i12bretro.github.io/tutorials/0295.html

Share

Install VirtualBox legacy version 5.x on CentOS 7

Install Dependencies

Install Extra Packages for Enterprise Linux (EPEL)

# sudo yum install epel-release wget -y

Install Dynamic Kernel Module Support (DKMS)

# sudo yum --enablerepo=epel install dkms -y

This will install quite a few packages:

Install Development Tools

# sudo yum groupinstall "Development Tools" -y

Read more

Share

Install Virtualbox 5.2/6.1 on Ubuntu 16 headless mode

Install Prerequisites

Before installing VirtualBox 5.2/6.1, please install these packages below if your systems don’t already have them installed….

sudo apt update
sudo apt-get install gcc make linux-headers-$(uname -r) dkms

Add VirtualBox Repository

If you want to always get the latest versions of VirtualBox when they become available, you’ll want to add its software repository to Ubuntu…

Run the commands below to add the repository key to your system…

wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -

After adding the repository key above, run the commands below to add VirtualBox package repository.

sudo add-apt-repository "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib"

After that, run the commands below to update Ubuntu repositories.

Installing VirtualBox

At this point, the Ubuntu system should be ready to install the latest version of VirtualBox. First you may want to remove the previous 6.0 version if you’re still running it… to do that, run the commands below:

sudo apt remove virtualbox virtualbox-6.1

Finally, run the commands below to install the latest 6.1 (major) version of the software.

Read more

Share

How to remove Virtualbox extpack

The following commands show examples how to list extension packs and remove one:

$ VBoxManage list extpacks
Extension Packs: 1
Pack no. 0: Oracle Virtual Machine VirtualBox Extension Pack
Version: 4.1.12
Revision: 77218
Edition:
Description: USB 2.0 Host Controller, VirtualBox RDP, PXE ROM with E1000 support.
VRDE Module: VBoxVRDP
Usable: true
Why unusable:

Now Remove or Uninstall extpack as following:

$ VBoxManage extpack uninstall "Oracle Virtual Machine VirtualBox Extension Pack"
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Successfully uninstalled "Oracle Virtual Machine VirtualBox Extension Pack".
Share

Reinstall VirtualBox on Ubuntu & CentOS

For Ubuntu

To remove virtualbox

sudo dpkg --list virtualbox-*
sudo apt autoremove --purge virtualbox*
dpkg -l virtualbox* | grep ^i

Remove all PPAs from sources.list and source.list.d directory

mkdir ~/apt-tmp
sudo mv /etc/apt/sources.list.d/* ~/apt-tmp

Make sure there is nothing except official repositories sources in /etc/sources.list. And update your sources:

sudo apt update

Now we can search to see which versions are available to install:

apt-cache madison virtualbox | grep -iv sources

Which produces an output like this:

virtualbox | 5.0.32-dfsg-0ubuntu1.16.04.2 | http://mirrors.kernel.org/ubuntu xenial-updates/multiverse amd64 Packages
virtualbox | 5.0.18-dfsg-2build1 | http://mirrors.kernel.org/ubuntu xenial/multiverse amd64 Packages

Then I would install the last version mentioned in xenial-updates:

Read more

Share

Install VirtualBox on Centos 6 / 7

Step 1 – Add Required Yum Repositories

Firstly you are required to add VirtualBox yum repository in your system. Download repository file from its official site and place it under at /etc/yum.repos.d/virtualbox.repo .First navigate to /etc/yum.repos.d/ directory and use one of below commands as per your operating system.

cd /etc/yum.repos.d/
wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo

The CentOS and RedHat users also required to add EPEL yum repository using one of the following commands.

### On CentOS/RHEL 7 ### 
rpm -Uvh http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
### On CentOS/RHEL 6 ### 
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

Step 2 – Install Required Packages

Before installing VirtualBox make sure to install all required packages to run VirtualBox like kernel-headers, kernel-devels etc. Use the following command to install the required packages.

Read more

Share

Convert .ova and import it on Proxmox KVM virtualization

Let’s start uploading the exported ova file to the proxmox server. Extract the OVA file:

tar -xvf *.ova

This should output a couple of files from the OVA container, it should include an OVF file, which is the VM Defenition file, and a VMDK file, which is the actual hard disk image. Again, this may take a while.

Convert the vmdk to a Proxmox compatible qcow2 file:

qemu-img convert -f vmdk myvirtual-disk1.vmdk  -O qcow2 qcowdisk.qcow2

We now need to get the image into a VM with some hardware so that we can begin to use it. This is where things get tricky – the OVF file is not compatible with Proxmox and needs to be manually understood. The principle here is we are going to use the Proxmox web GUI to create a VM and replace the empty disk image which is created with our recently converted qcow2 image.

You can use vi to open the OVF file and understand some of the basic settings which are required for the VM. Open the OVF file and look for the following XML tags:

  • OperatingSystemSection
  • VirtualHardwareSection
  • Network
  • StorageControllers

Read more

Share

Phpvirtualbox fix on 5.1 using 5.0

I was able to get v5.0-5 working with vbox 5.1 by commenting out the version check line and replacing it with a static value in the endpoints/api.php file:

// $response['data']['responseData']['phpvboxver'] = @constant('PHPVBOX_VER');
 $response['data']['responseData']['phpvboxver'] = "5.1-0";

Src: https://sourceforge.net/p/phpvirtualbox/discussion/general/thread/565b7f31/

Share