How to work with img?

t.lamprecht

Proxmox Staff Member
Staff member
Jul 28, 2015
5,511
1,760
164
South Tyrol/Italy
shop.proxmox.com
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

t.lamprecht

Proxmox Staff Member
Staff member
Jul 28, 2015
5,511
1,760
164
South Tyrol/Italy
shop.proxmox.com
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

Shazams

New Member
Oct 29, 2018
12
0
1
29
Is to blame.
Forgot to add to the download. Hanging on 'Booting from Hard Disk'
 

Sandbo

Member
Jul 4, 2019
65
6
13
32
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?
 

Dominic

Proxmox Retired Staff
Retired Staff
Mar 18, 2019
1,388
179
68
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
 

Sandbo

Member
Jul 4, 2019
65
6
13
32
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 your own in 60 seconds.

Buy now!