Migrate virtual machines in ESXi to Proxmox 5 via OVA/OVF export
1. Export OVA/OVF
The first step is to shut down the virtual machine to be migrated from the vSphere Client of ESXi, then select it, select it in the menu "File" - "Export" - "Export OVF Template", and then select "File Folder (OVF)" (or "Single File (OVA)") in the format, and wait for the export to complete. Note: The name is most without Chinese and some special symbols, and the symbol can use "-".
This method seems to compress the unused part of the virtual machine hard drive, which will be much smaller than the original VMDK file, if your virtual machine's hard drive is not fully used.
2. Upload to the target host
Then upload the VPS-180324022 file to proxmox to the host. You can use winscp and xftp.
You can also use the web side, when using the web side. Select "Folder View" on the left side of the web, then expand "Storage", select a storage where you can upload images, such as "local(33ol)", where 33ol is your host name, and select "Content" - "Upload" on the right. Because you can only upload iso or container template, select iso here, and then make the previous folder into iso to upload successfully.
I uploaded it to /var/lib/vz/template/iso using xftp. In fact, uploading to the root directory is also possible.
3. Decompression
After finding the uploaded file, you can use the SSH client or directly log in to the console on the web.
If you upload VPS-180324022.ova, you can copy or rename it to .ova
Added later.iso
。
Copy:cp VPS-180324022.ova VPS-180324022.ova.iso
Rename:mv VPS-180324022.ova VPS-180324022.ova.iso
Then there is the decompression:tar xvf VPS-180324022.ova.iso
After successful unzipping, you will get the following files:
1. An OVF file, which contains the hardware configuration of the virtual machine, such as CPU specifications, memory, etc.
2. One or more VMDK files, these are hard disk images of virtual machines, the number depends on how many hard drives the virtual machine has.
Note: If you use wscp or xftp to upload the entire folder, you don't need to unzip it, you can import it directly.
4. Introduction
Add the cd VPS-180324022 directory to the directory, and then enter the directory to importcd /var/lib/vz/template/iso/VPS-180324022
Import to create a VPS:qm importovf 180 VPS-180324022.ovf local-lvm --format raw
If not, create a virtual machine and then import the hard drive with the command:qm importdisk 180 VPS-180324022.vmdk local-lvm --format raw
Thereinto:
180 is the ID of the virtual machine, which is unique among all Proxmox virtual machines and is a 3-digit number.
VPS-180324022.ovf is an ovf file extracted from tar.
local-lvm is the target storage location. By default, the local installed Proxmox is only 100G, and it is not recommended to put the local in it.
–format raw is the format that specifies the image of the hard drive after import, and the default is raw format. If you use RAW format, you can leave it out by default.
5. Postscript
1. If the NIC is not successfully imported after the import is successful, you can manually add the corresponding NIC while keeping the imported virtual machine shut down.
If you need to keep the MAC address unchanged, you can first copy the corresponding NIC MAC in the vSphere Client, and then fill in the copied MAC when adding.
2. The OS type in the options needs to be modified to the corresponding version
3. But the boot will still have a blue screen, which is a problem with the hard disk drive.
Go to the hardware and first separate the hard disk, then edit the hard disk, and add it to the IDE. Then it will turn on normally.
Scan the QR code to push to your mobile phone access.
Copyright Notice: This article is written byTranBon BlogPublished, if you need to reprint, please indicate the source.
Link to this article:https://ww.33ol.com/?id=175