How to work with img?

Hi, normally you can add such images by using "qm importdisk" CLI command.

Also, this is just a qcow2 file:

Code:
# file ubuntu-18.04-minimal-cloudimg-amd64.img
ubuntu-18.04-minimal-cloudimg-amd64.img: QEMU QCOW Image (v2), 2361393152 bytes

In general you could do something like

Code:
# qm create VMID --net0 virtio,bridge=vmbr0 --ostype l26 --scsihw virtio-scsi-pci --memory 1024
# wget http://cloud-images.ubuntu.com/minimal/releases/bionic/release-20190320/ubuntu-18.04-minimal-cloudimg-amd64.img
# qm importdisk VMID ubuntu-18.04-minimal-cloudimg-amd64.img STORAGE-ID

Then add the new "unused disk" as attached disk, easiest done through he web interface.
May need to fixup "Boot order" in the VMs option tab, and then you should be able to start it.
 
  • Like
Reactions: Shazams
it works, but it seems that those images are pretty poor regarding display support, serial socket works, but I get no display, so just do for create:

Code:
qm create 1781 --net0 virtio,bridge=vmbr0 --ostype l26 --scsihw virtio-scsi-pci --serial0 socket --vga serial0

(or add a serial port with type socket afterwards and set display option to it)
 
  • Like
Reactions: Shazams
Is to blame.
Forgot to add to the download. Hanging on 'Booting from Hard Disk'
 
Hi, normally you can add such images by using "qm importdisk" CLI command.

Also, this is just a qcow2 file:

Code:
# file ubuntu-18.04-minimal-cloudimg-amd64.img
ubuntu-18.04-minimal-cloudimg-amd64.img: QEMU QCOW Image (v2), 2361393152 bytes

In general you could do something like

Code:
# qm create VMID --net0 virtio,bridge=vmbr0 --ostype l26 --scsihw virtio-scsi-pci --memory 1024
# wget http://cloud-images.ubuntu.com/minimal/releases/bionic/release-20190320/ubuntu-18.04-minimal-cloudimg-amd64.img
# qm importdisk VMID ubuntu-18.04-minimal-cloudimg-amd64.img STORAGE-ID

Then add the new "unused disk" as attached disk, easiest done through he web interface.
May need to fixup "Boot order" in the VMs option tab, and then you should be able to start it.
May I know what is storage-id here?
 
storage-id as in name/ID of the storage definition in Proxmox VE, in other words what you see when you
  • go to Datacenter->Storage or
  • look at the resource tree on the left or
  • type pvesm status into the command line interface
 
storage-id as in name/ID of the storage definition in Proxmox VE, in other words what you see when you
  • go to Datacenter->Storage or
  • look at the resource tree on the left or
  • type pvesm status into the command line interface
Thanks, I am able to get an img attached.
 
  • Like
Reactions: Dominic

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!