最近迷上了Proxmox VE(PVE)下刷各个大神整合的OpenWRT,其中就会用到 img2kvm 一款将OpenWrt的固件转换为PVE硬盘镜像的小工具
废话不多说,转换的时候遇到这个问题
比如我的转换命令为
./img2kvm openwrt.img 105 vm-105-disk-0
然后就报错
Converting file system to qcow2 format …
… Done.
Importing disk to the VM 105 …storage ‘local-lvm’ does not exists
查看img2kvm的帮助
img2kvm -h
可以看到参数说明
A utility that convert OpenWrt/LEDE firmware to disk image for KVM guest in Proxmox VE. Copyright (C) 2017 everun.top usage: img2kvm <img_name> <vm_id> <vmdisk_name> [storage] -h or --help display this help. -V or --version output img2kvm version informaton. Command parameters: img_name the name of OpenWrt/LEDE image file, e.g. 'lede-xxx-x86-kvm-combined-ext4.img'. vm_id the ID of VM for OpenWrt/LEDE guest, e.g. '200'. vmdisk_name the name of disk for OpenWrt/LEDE guest, e.g. 'vm-200-disk-1'. storage Storage pool of Proxmox VE, default is 'local-lvm'.
原来img2kvm转换固件时,默认选择的存储池是 local-lvm ,而我的PVE下删除了这个存储池
所以需要在转换的时候手动指定存储池名称,比如我的是 local
./img2kvm openwrt.img 105 vm-105-disk-0 local
l
成功!
发表评论