2022年6月13日 星期一

Proxmox | 將VMware VM虛擬機器轉到PVE上

以下直接介紹實作步驟,意外的簡單。



步驟一:安裝ovftool


先下載ovftool到PVE Host上面,然後開始安裝
root@pve04:/tmp# chmod +x VMware-ovftool-4.4.0-15722219-lin.x86_64.bundle
root@pve04:/tmp# ./VMware-ovftool-4.4.0-15722219-lin.x86_64.bundle
Extracting VMware Installer...done.
Do you agree? [yes/no]: yes Installing VMware Installer 2.1.0 Copying files... Configuring... Installing VMware OVF Tool component for Linux 4.4.0 Copying files... Configuring... Installation was successful.


步驟二:轉出VMware VM


轉出ESXi上的disk檔案,我是在/tmp目錄下載
ovftool vi://root@<ip-of-esxi>/<name-of-a-virtual-machine> .
root@pve04:/tmp# ovftool vi://root@10.1.x.x/RTSP_TEMP .
Accept SSL fingerprint (C7:BC:C1:E2:07:23:87:6C:FC:34:DE:8F:59:B3:4B:5F:C7:89:2C:D3) for host 10.1.16.12 as source type.
Fingerprint will be added to the known host file
Write 'yes' or 'no'
yes
Enter login information for source vi://10.1.x.x/
Username: root
Password: ********
Opening VI source: vi://root@10.1.x.x:443/RTSP_TEMP
Opening OVF target: .
Writing OVF package: ./RTSP_TEMP/RTSP_TEMP.ovf
Disk progress: 94%

Transfer Completed
Completed successfully

#檢查一下下載回來的目錄root@pve04:/tmp# ls -alh RTSP_TEMP/ total 6.6G drwxr-xr-x 2 root root 4.0K Jun 1 14:46 . drwxrwxrwt 12 root root 4.0K Jun 1 14:39 .. -rw-r--r-- 1 root root 6.6G Jun 1 14:46 RTSP_TEMP-disk1.vmdk -rw-r--r-- 1 root root 8.5K Jun 1 14:46 RTSP_TEMP-file1.nvram -rw-r--r-- 1 root root 279 Jun 1 14:46 RTSP_TEMP.mf -rw-r--r-- 1 root root 8.7K Jun 1 14:46 RTSP_TEMP.ovf




步驟三:將VM佈署到PVE上

使用這段命令qm importovf <new-vmid> </path/to/file.ovf> <storage>將VM匯入到PVE

root@pve04:/tmp# qm importovf 200 /tmp/RTSP_TEMP/RTSP_TEMP.ovf local-lvm
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LC_ADDRESS = "lzh_TW",
        LC_NAME = "lzh_TW",
        LC_MONETARY = "lzh_TW",
        LC_PAPER = "lzh_TW",
        LC_IDENTIFICATION = "lzh_TW",
        LC_TELEPHONE = "lzh_TW",
        LC_MEASUREMENT = "lzh_TW",
        LC_TIME = "lzh_TW",
        LC_NUMERIC = "lzh_TW",
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
  Logical volume "vm-200-disk-0" created.
transferred 0.0 B of 16.0 GiB (0.00%)
transferred 163.8 MiB of 16.0 GiB (1.00%)
transferred 327.7 MiB of 16.0 GiB (2.00%)
..transferred 15.7 GiB of 16.0 GiB (98.00%)
transferred 15.8 GiB of 16.0 GiB (99.00%)
transferred 16.0 GiB of 16.0 GiB (100.00%)
transferred 16.0 GiB of 16.0 GiB (100.00%)




轉完後就可以到管理介面開機試試看是否成功。




沒有留言: