Skip to content

How do I upload an image using the CLI?

You can upload large images to MoonQube easily using the CLI. Please make sure you have set up and logged into the CLI before continuing.

Converting Images to Qcow2

You can use the following command to convert your image to a format we know works well.

qemu-img convert -f raw -O qcow2 myimage.img myimage.qcow2

Below are the accepted formats for qemu-img

Image FormatArgument
QCOW2 (KVM, Xen)qcow2
QED (KVM)qed
raw

VDI (VirtualBox)| vdi
VHD (Hyper-V)| vpc
VMDK (VMware)| vmdk

Importing Your Image

To import your image, use the command below while replacing the image name and image path with ones specific to your image.

openstack image create --disk-format qcow2 --private --file ./image_path.qcow2 myimage