====== Migrate from VirtualBox ======
===== Migrate Windows 7/10 Virtual Box =====
==== (Optional) Preparation ====
Cleanup disc space and remove all unnecessary drivers:
* uninstall Virtual Box Guest Additions
* Download and run registry file: [[https://pve.proxmox.com/wiki/File:Mergeide.zip|Mergeide.zip]]
* Restart VM
* ''sdelete -z c: d: e:''
* Enable ''ClearPageFileAtShutdown.reg''
* Shutdown VM
Now two methods are possible:
==== Importing only disc ====
Fastest method: create Proxmox machine and import vbox hard disc to newly created Proxmox VM.
* Create new Proxmox machine with similar parameters to old one
* [[https://pve.proxmox.com/wiki/Windows_10_guest_best_practices|Windows 10 guest best practices]]
* Remove created Hard Disc (scsi0)
* Import disc images (repeat for all VDI discs)
* As RAW images with all benefits (compression, thin provisioning, snapshots) or ''rbd'' or ''local-zfs'' storage: qm importdisk 701 WIN7_C.vdi local-zfs
* 21743 MB VDI compacted file occupied 15,2G on ZFS with compression ratio 1.24x
* As QCOW2 files on every file storage: qm importdisk 701 WIN7_C.vdi local -format qcow2
* Connect new discs into machine:
* qm set 701 --scsi local-zfs:vm-701-disk-,discard=on,size=64G
* NOTE: ''discard=on'' should be enabled for thin provisioned storage to reclaim unused space
* Change SCSI to IDE/SATA:
* For i440FX machine: Switch SCSI to IDE: sed -i 's/scsi/ide/g' /etc/pve/qemu-server/701.conf
* Manually correct numbering conflict with IDE CD-ROM drive *
* For Q35 machine: Switch SCSI to SATA: sed -i 's/scsi/sata/g' /etc/pve/qemu-server/701.conf
* Setup correct boot order
* Add one dummy (small size) hard disc to SCSI controller
* Enable QEMU Guest Agent
* Boot Windows, go to ''Device Manager'' and install missing drivers:
* PCI Simple Communication Controller ''PCI\VEN1AF4&DEV_1003'' --> Virtio console ''vioserial''
* Red Hat VirtIO SCSI pass-through controller ''vioscsi\w7\amd64''
* ''NetKVM\w7\amd64''
* (''PCI\VEN_1AF4&DEV_1002'') --> VirtIO Balloon Driver ''Balloon\w7\amd64''
* vm generation id (''ACPI/QEMUVGID'') ''''
* Shutdown machine
* Switch disc controller from IDE to SCSI. Edit ''/etc/pve/qemu-server/701.conf''
* Setup correct boot order
=== Issues ===
''Can't create IDE unit 1, bus supports only 1 units''
Q35 machine has only master IDEs. Use ''sata0'', ''sata1'' and so on.
==== NOT WORKING: Importing OVA file ====
* **Very slow method**, exporting OVA needs to copy all discs into exported and well compressed file.
* In VirtualBox choose "**File**" --> **"Export Appliance"**
* select to export all network cards and MAC addresses
* Proxmox cannot import OVA files directly. Please unpack it with command tar -xvf WIN7.ova
* After unpacking, manifest file .ovf will be available.
* qm importovf 701 ./WIN7.ovf local-zfs --dryrun --format qcow2
* WARNING: warning: unable to parse the VM name in this OVF manifest, generating a default value
* Create account/Login to VMWare page and download [[https://my.vmware.com/group/vmware/get-download?downloadGroup=OVFTOOL440|ovftool]]
T.B.C without success, more similar issues described here:
* [[http://www.baconapplications.com/export-a-virtualbox-machine-to-vmware/|Export a VirtualBox Machine to VMware]]
* [[https://www.maketecheasier.com/convert-virtual-machines-vmware-virtualbox/|How to Convert Virtual Machines from VMware to VirtualBox and Vice Versa]]