[Users] actual disk size of vm via api
Hi, I got a question regarding the reported actual disk size of a vm. you can obtain this value fine via api: https://your_engine/api/vms/{id}/disks/ however, if the vm is cloned from a template this disk size does not seem to show the actual size of the whole disk but instead the difference from the actual template size. is this a bug or a feature? I would like to obtain the real size. e.g. I have a template with 50GB (thin provisioned) the actual size of this template is 1,5 GB I clone a vm from this template, the actual size which gets reported via api is about 8 MB (stuff that changes from the template). So I can not obtain the complete used size of the vm. This was tested under ovirt 3.3.2 -- Mit freundlichen Grüßen / Regards Sven Kieske Systemadministrator Mittwald CM Service GmbH Co. KG Königsberger Straße 6 32339 Espelkamp T: +49-5772-293-100 F: +49-5772-293-333 https://www.mittwald.de Geschäftsführer: Robert Meyer St.Nr.: 331/5721/1033, USt-IdNr.: DE814773217, HRA 6640, AG Bad Oeynhausen Komplementärin: Robert Meyer Verwaltungs GmbH, HRB 13260, AG Bad Oeynhausen ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [Users] actual disk size of vm via api
Hi, There are 2 different ways to create a vm from a template: * thin * clone If you create a vm that is a thin-copy of a template, it works like a snapshot, creating a new volume on top of the template's disk. If you create a vm that is a full clone then you clone the whole disk image. did you created a thin-copy of the template? Gadi Ickowicz - Original Message - From: Sven Kieske s.kie...@mittwald.de To: Users@ovirt.org List Users@ovirt.org Sent: Wednesday, February 12, 2014 5:57:28 PM Subject: [Users] actual disk size of vm via api Hi, I got a question regarding the reported actual disk size of a vm. you can obtain this value fine via api: https://your_engine/api/vms/{id}/disks/ however, if the vm is cloned from a template this disk size does not seem to show the actual size of the whole disk but instead the difference from the actual template size. is this a bug or a feature? I would like to obtain the real size. e.g. I have a template with 50GB (thin provisioned) the actual size of this template is 1,5 GB I clone a vm from this template, the actual size which gets reported via api is about 8 MB (stuff that changes from the template). So I can not obtain the complete used size of the vm. This was tested under ovirt 3.3.2 -- Mit freundlichen Grüßen / Regards Sven Kieske Systemadministrator Mittwald CM Service GmbH Co. KG Königsberger Straße 6 32339 Espelkamp T: +49-5772-293-100 F: +49-5772-293-333 https://www.mittwald.de Geschäftsführer: Robert Meyer St.Nr.: 331/5721/1033, USt-IdNr.: DE814773217, HRA 6640, AG Bad Oeynhausen Komplementärin: Robert Meyer Verwaltungs GmbH, HRB 13260, AG Bad Oeynhausen ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [Users] actual disk size of vm via api
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I know there are 2 ways to create the new vm. I specifically looked at the size to determine if I used the correct rest api call. To answer your question: I did a full clone of the copy. and this worked correct, as far as I can tell. I looked at the actual folders, in the storage domain, and there is a (sparse) copy of the template and an additional file. It seems the difference between the copy of the template and the actual vm content are written to this file, and the size of this file seems to be reported via the actual size field in the rest api. my question is, if there is a field, which reports the complete size of the vm (copy of the template and diff file). If there is none, I would file a bug or rfe for this. Thank you so far! (replying via private mail as I'm out of office) On 12.02.2014 17:33, Gadi Ickowicz wrote: Hi, There are 2 different ways to create a vm from a template: * thin * clone If you create a vm that is a thin-copy of a template, it works like a snapshot, creating a new volume on top of the template's disk. If you create a vm that is a full clone then you clone the whole disk image. did you created a thin-copy of the template? Gadi Ickowicz -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.22 (MingW32) iQGcBAEBAgAGBQJS+8QhAAoJEAq0kGAWDrql4ysL/1nqUs+EjZCz/i3YVObH6+cn HwA51yzH1eVj+xNHVUdwew24LkWYm3PxGY3OQc31PFJQ5yZ6+KzJ6WXHw0p6OV6Q Vbz88y3WdQpRfMsAK5v9HahZyLLxfjHJgHtvKXHbNiDiwgMDXucmFdwd3+lj2fbZ pYDU3pBuUTOwRONiF2R0Sa7RmRxG5zecMWLU48qGXEBppNn9lvDWVd2kBQ6x71UI ezpGRv/0MzzmlUB98dp3AuhgdGX7tgbjiwPU9mQGtv3OFgs1e9fR3/KJKgaToZ07 x6hY1mPEGRDXB3KvudFS6d/iWsWb1PkDHRXT2HM0vlHd0juVavFfD1TdyTMXlRuC 4kXcK0+yYV4F/oB5UTMAbGVXwUSHQv7Edd2wrMwyk9MyBkCGOoyDLe9WkBMTGBZX L6Y4vyWuw/iEuxsP4uygiE8N0yPXth2KcN7v2eQ2MALBC60/+E4vMwc+ODBK8Ejs XxXaWFtpYLAqwc647veCDxcJ1ol83yVftIuhzqrvnQ== =PWh1 -END PGP SIGNATURE- ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users