跳到主內容
版本:2.4

匯入圖片(命令列介面)

下載映像檔

您可輕鬆從我們的網站下載雲端映像檔,前往下載頁面

透過 SCP 或 WinSCP 上傳圖片

scp Ubuntu-22.04-amd64.vmdk root@IPADDRESS:/mnt/cephfs/glance/.

使用 cli 匯入圖片

透過終端機或Putty連線至命令列介面

$ ssh admin@IPADDRESS
Warning: Permanently added '192.168.X.X' (ECDSA) to the list of known hosts.
Password:
Welcome to the Cube Appliance
Enter "help" for a list of available commands
controller>

將映像檔匯入為映像檔

controller> image
controller:image> import
1: usb
2: local
Enter index: 2
1: ubuntu2204.qcow2
Enter index: 1
Specify image name: ubuntu2204
Select domain:
1: default
Enter index: 1
Select tenant:
1: admin
Enter index: 1
Visibility:
1: public
2: private
Enter index: 1
Bootable image or volume:
1: glance-images
2: cinder-volumes
Enter index: 1
Importing...
[10:58:57] Converting image to RAW format ...
(100.00/100%)
[10:59:00] Calculating RAW image checksum ... 5d971e656e3fdac6b27650c13c953d14 (MD5)
[10:59:21] Creating image ubuntu2204 ...
[11:00:25] Validating checksum: OK
Importing ubuntu2204 complete. It is safe to remove the local image file

(新增) 將映像檔匯入為 Volume

若要將其匯入為特定專案的硬碟,請選擇 cinder-volumes

Bootable image or volume:
1: glance-images
2: cinder-volumes
Enter index: 2

從 VMware/Hyper-V 映像檔進行遷移

  • 注意:針對 VMware/Hyper-V 映像檔,請使用 CLI 指令 import_efi 取代 import 以獲得最佳化設定。