Creating Vms with qcow2 images

varadarajan

Member
May 12, 2016
16
0
21
64
I searched in the forums for creating Vms with qcow2 images. I feel it is important feature but I see only indirect methods like creating a standard Vms and replacing the disk with qcow2 image by copying etc. And the path specified in the posts do not exist either becaus they are old versions or no LVM support etc. Why is it dificult to add this feature ? For example in Open nebula I can save a raw or qcow2 iamge and use it in the temple.
 
As long as you use a directory based storage, you can use qcow2 - this is a basic feature since always.

Looks like you do not have a suitable storage configured.
 
  • Like
Reactions: varadarajan
Thank you. Been reading .

Storage type Content
Every storage defined has at least one purpose:

  • some storage types have only one possible use, which is available as soon as you define the storage entry, you don't need to specify, ie:
    • iSCSI: this storage is either used directly (Note: this can be dangerous, see further down), or as a base to define local LVM storage entries (see further down), or as ZFS, it needs a portal address and a target ID
    • LVM: this storage type is only used to store RAW VM disk images, and first needs an iSCSI "base storage" entry defined or local disks prepared as LVM storage.
    • ZFS over iSCSI: this storage type is only used to store RAW VM disk images, and first needs an iSCSI "base storage" entry defined. (available since Proxmox VE 3.2)
    • ZFS: this storage type is used to store RAW VM disk images, but can also be used as a directory. (available since Proxmox VE 3.4)
    • RBD/Ceph: this storage type is only used to store RAW VM disk images, and needs a working "Monitor host"
    • Sheepdog: this storage type is only used to store RAW VM disk images, and needs a working "portal" (still not stable, so please do not use it in production environments.)
  • other storage types have multiple possible usages, and you can choose from a list, but by default they have no choice (until you choose at least one, they are not usable), ie:
    • directory: this storage type is used to store any kind of content (you just have to choose), it needs a local folder path
    • NFS: this storage type is used to store any kind of content (you just have to choose), it needs server address and export name
    • GlusterFS: this storage type is used to store any kind of content (you just have to choose), it needs server address and volume name

So right now my choices seem to be directory , NFS , GlusterFS .
I will now try these.
 
After reading , I tried the following,
1) created a directory /images .
Added this as a directory type storage by choosing drop down and providng path.
I see that a new disk drives icon pooped up > images(pve)
2) clicked on the icon .
I see the tabs > summary content permissions
sumamry shows enabled , active , type =directory 90 gb size , used 2 gb available 87 gb etc
But content > all tabs greyed out and I can not upload anything.
So I am stuck here.Screenshot from 2016-05-29 07:17:17.png Screenshot from 2016-05-29 07:17:17.png
 
maybe a permission problem.

please post the output of:

> ls -al /
 
  • Like
Reactions: varadarajan
Here it is ....
root@pve:~# ls -al /
total 92
drwxr-xr-x 24 root root 4096 May 29 06:32 .
drwxr-xr-x 24 root root 4096 May 29 06:32 ..
drwxr-xr-x 2 root root 4096 May 25 00:42 bin
drwxr-xr-x 5 root root 4096 May 25 00:48 boot
drwxr-xr-x 20 root root 4720 May 29 06:30 dev
drwxr-xr-x 95 root root 4096 May 25 01:58 etc
drwx------ 2 root root 4096 May 25 00:47 .gnupg
drwxr-xr-x 2 root root 4096 Mar 13 19:46 home
drwxr-xr-x 3 root root 4096 May 29 06:32 images
drwxr-xr-x 18 root root 4096 May 25 00:43 lib
drwxr-xr-x 2 root root 4096 Apr 26 10:14 lib64
drwx------ 2 root root 16384 May 25 00:36 lost+found
drwxr-xr-x 2 root root 4096 Apr 26 10:14 media
drwxr-xr-x 2 root root 4096 Apr 26 10:14 mnt
drwxr-xr-x 2 root root 4096 Apr 26 10:14 opt
dr-xr-xr-x 437 root root 0 May 26 06:30 proc
drwx------ 4 root root 4096 May 25 02:01 root
drwxr-xr-x 23 root root 1200 May 29 06:25 run
drwxr-xr-x 2 root root 4096 May 25 00:48 sbin
drwxr-xr-x 2 root root 4096 Apr 26 10:14 srv
dr-xr-xr-x 13 root root 0 May 26 06:30 sys
drwxrwxrwt 8 root root 4096 May 29 08:17 tmp
drwxr-xr-x 10 root root 4096 Apr 26 10:14 usr
drwxr-xr-x 11 root root 4096 Apr 26 10:14 var
root@pve:~#
 
looks ok, should work.
 
No .It does not work.
I rebooted and checked . Still greyed out.

Anything else I am missing ?
 

Attachments

  • Screenshot from 2016-05-29 10:32:46.png
    Screenshot from 2016-05-29 10:32:46.png
    57.6 KB · Views: 52
post the output of:

> cat /etc/pve/storage.cfg
 
Thank you.
I have signed up for reseller and in the process of evaluting and understanding.

root@pve:~# cat /etc/pve/storage.cfg
dir: local
path /var/lib/vz
content backup,iso,vztmpl

lvmthin: local-lvm
vgname pve
thinpool data
content images,rootdir

dir: images
path /images
content images
nodes pve
maxfiles 1
 
you defined your "images" dir for images.

therefore you cannot download templates, as its not defined as template store.

=> just create a new VM and select this "images" storage to store your virtual disk images in qcow2 format.
 
ok . Now I see a file in /images/103/vm-103-disk-1.qcow2

So I have to manually replace this file by the qcow2 file I have ?
Should I rename my qcow2 file to " vm-103-disk-1.qcow2 " or use as such ?
 
ok . Now I see a file in /images/103/vm-103-disk-1.qcow2

So I have to manually replace this file by the qcow2 file I have ?
Should I rename my qcow2 file to " vm-103-disk-1.qcow2 " or use as such ?

Yes, but this is only needed if you have already a qcow2 file from another platform which you want to use in a new VM on Proxmox VE.
 
Thank you .

Yes. I would like to use an existing qcow2 file . Many evaluation software is available as qcow2 , ova or vmdk files. Just wanted to be able to use it. I have seen other platforms ,where I can upload an image in various formats and then spin a VM using that image and boot from it.

But for now my problem is solved as I can upload an image to this directory and replace the existing image. If you check the beging of this thread , that is what I mentioned.
 

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!