I am working on integrating builds within our RHEV environment with Foreman. Its all working wonderfully, I love this project!
One snag. When a VM is created via the api, the disk is created as a thin provisioned disk. I know this is a very cutting edge buzzwordy thing to do, but personally, I've had nothing but trouble with thin provisioning in RHEV, and I'd like to avoid it. How can I tell foreman that when it calls the oVirt API, to pass along the flags to make the disk preallocated rather than thin?
Thanks!
···
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Nathan Lager, RHCSA, RHCE, RHCVA (#110-011-426)
System Administrator
11 Pardee Hall
Lafayette College, Easton, PA 18042
No one? I there no way to force preallocated over thin?
Thanks!
···
----- Original Message -----
> From: "Nathan T. Lager"
> To: foreman-users@googlegroups.com
> Sent: Thursday, November 14, 2013 7:25:26 AM
> Subject: [foreman-users] Foreman oVirt (RHEV) integration, disk allocation.
>
> I am working on integrating builds within our RHEV environment with Foreman.
> Its all working wonderfully, I love this project!
>
> One snag. When a VM is created via the api, the disk is created as a thin
> provisioned disk. I know this is a very cutting edge buzzwordy thing to do,
> but personally, I've had nothing but trouble with thin provisioning in RHEV,
> and I'd like to avoid it. How can I tell foreman that when it calls the
> oVirt API, to pass along the flags to make the disk preallocated rather than
> thin?
>
> Thanks!
>
>
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> Nathan Lager, RHCSA, RHCE, RHCVA (#110-011-426)
> System Administrator
> 11 Pardee Hall
> Lafayette College, Easton, PA 18042
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Foreman users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to foreman-users+unsubscribe@googlegroups.com.
> To post to this group, send email to foreman-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/foreman-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
> No one? I there no way to force preallocated over thin?
I think you just need to pass the sparse option, try adding it at:
maybe change this snippet to:
volumes.map{ |vol| vm.add_volume({:bootable => 'false', :quota
=> ovirt_quota, :blocking => api_version.to_f < 3.1}.merge(vol)) if
vol[:id].blank?}
volumes.map do |vol|
vol.sparse = true # if it doesnt work, try 'true' instead
vm.add_volume({:bootable => 'false', :quota => ovirt_quota,
:blocking => api_version.to_f < 3.1}.merge(vol)) if vol[:id]
end
···
On Mon, Nov 18, 2013 at 7:58 PM, Lager, Nathan T. wrote:
Thanks!
----- Original Message -----
From: “Nathan T. Lager” lagern@lafayette.edu
To: foreman-users@googlegroups.com
Sent: Thursday, November 14, 2013 7:25:26 AM
Subject: [foreman-users] Foreman oVirt (RHEV) integration, disk allocation.
I am working on integrating builds within our RHEV environment with Foreman.
Its all working wonderfully, I love this project!
One snag. When a VM is created via the api, the disk is created as a thin
provisioned disk. I know this is a very cutting edge buzzwordy thing to do,
but personally, I’ve had nothing but trouble with thin provisioning in RHEV,
and I’d like to avoid it. How can I tell foreman that when it calls the
oVirt API, to pass along the flags to make the disk preallocated rather than
thin?
Thanks!
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Nathan Lager, RHCSA, RHCE, RHCVA (#110-011-426)
System Administrator
11 Pardee Hall
Lafayette College, Easton, PA 18042
:blocking => api_version.to_f < 3.1}.merge(vol)) if vol[:id]
Which didnt cause any errors, things still work, however, the result
is still a thinly provisioned disk.
I had a hunch that maybe vol.sparse should be set to false, so i gave
that a try, and it made no difference. Also, quotes vs no quotes made
no difference.
···
On 11/19/2013 02:10 AM, Ohad Levy wrote:
> On Mon, Nov 18, 2013 at 7:58 PM, Lager, Nathan T. > wrote:
>> No one? I there no way to force preallocated over thin?
>
> I think you just need to pass the sparse option, try adding it at:
> https://github.com/theforeman/foreman/blob/develop/app/models/compute_resources/foreman/model/ovirt.rb#L244
>
> maybe change this snippet to: volumes.map{ |vol|
> vm.add_volume({:bootable => 'false', :quota => ovirt_quota,
> :blocking => api_version.to_f < 3.1}.merge(vol)) if
> vol[:id].blank?}
>
> volumes.map do |vol| vol.sparse = true # if it doesnt work, try
> 'true' instead vm.add_volume({:bootable => 'false', :quota =>
> ovirt_quota, :blocking => api_version.to_f < 3.1}.merge(vol)) if
> vol[:id] end
>
>
>>
>> Thanks!
>>
>>
>> ----- Original Message -----
>>> From: "Nathan T. Lager" To:
>>> foreman-users@googlegroups.com Sent: Thursday, November 14,
>>> 2013 7:25:26 AM Subject: [foreman-users] Foreman oVirt (RHEV)
>>> integration, disk allocation.
>>>
>>> I am working on integrating builds within our RHEV environment
>>> with Foreman. Its all working wonderfully, I love this
>>> project!
>>>
>>> One snag. When a VM is created via the api, the disk is
>>> created as a thin provisioned disk. I know this is a very
>>> cutting edge buzzwordy thing to do, but personally, I've had
>>> nothing but trouble with thin provisioning in RHEV, and I'd
>>> like to avoid it. How can I tell foreman that when it calls
>>> the oVirt API, to pass along the flags to make the disk
>>> preallocated rather than thin?
>>>
>>> Thanks!
>>>
>>>
>>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Nathan Lager,
>>> RHCSA, RHCE, RHCVA (#110-011-426) System Administrator 11
>>> Pardee Hall Lafayette College, Easton, PA 18042
>>>
>>>
>>> -- You received this message because you are subscribed to the
>>> Google Groups "Foreman users" group. To unsubscribe from this
>>> group and stop receiving emails from it, send an email to
>>> foreman-users+unsubscribe@googlegroups.com. To post to this
>>> group, send email to foreman-users@googlegroups.com. Visit this
>>> group at http://groups.google.com/group/foreman-users. For more
>>> options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>> -- You received this message because you are subscribed to the
>> Google Groups "Foreman users" group. To unsubscribe from this
>> group and stop receiving emails from it, send an email to
>> foreman-users+unsubscribe@googlegroups.com. To post to this
>> group, send email to foreman-users@googlegroups.com. Visit this
>> group at http://groups.google.com/group/foreman-users. For more
>> options, visit https://groups.google.com/groups/opt_out.
>
···
On 11/19/2013 02:10 AM, Ohad Levy wrote:
> On Mon, Nov 18, 2013 at 7:58 PM, Lager, Nathan T. > wrote:
>> No one? I there no way to force preallocated over thin?
>
> I think you just need to pass the sparse option, try adding it at:
> https://github.com/theforeman/foreman/blob/develop/app/models/compute_resources/foreman/model/ovirt.rb#L244
>
> maybe change this snippet to: volumes.map{ |vol|
> vm.add_volume({:bootable => 'false', :quota => ovirt_quota,
> :blocking => api_version.to_f < 3.1}.merge(vol)) if
> vol[:id].blank?}
>
> volumes.map do |vol| vol.sparse = true # if it doesnt work, try
> 'true' instead vm.add_volume({:bootable => 'false', :quota =>
> ovirt_quota, :blocking => api_version.to_f < 3.1}.merge(vol)) if
> vol[:id] end
>
>
>>
>> Thanks!
>>
>>
>> ----- Original Message -----
>>> From: "Nathan T. Lager" To:
>>> foreman-users@googlegroups.com Sent: Thursday, November 14,
>>> 2013 7:25:26 AM Subject: [foreman-users] Foreman oVirt (RHEV)
>>> integration, disk allocation.
>>>
>>> I am working on integrating builds within our RHEV environment
>>> with Foreman. Its all working wonderfully, I love this
>>> project!
>>>
>>> One snag. When a VM is created via the api, the disk is
>>> created as a thin provisioned disk. I know this is a very
>>> cutting edge buzzwordy thing to do, but personally, I've had
>>> nothing but trouble with thin provisioning in RHEV, and I'd
>>> like to avoid it. How can I tell foreman that when it calls
>>> the oVirt API, to pass along the flags to make the disk
>>> preallocated rather than thin?
>>>
>>> Thanks!
>>>
>>>
>>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Nathan Lager,
>>> RHCSA, RHCE, RHCVA (#110-011-426) System Administrator 11
>>> Pardee Hall Lafayette College, Easton, PA 18042
>>>
>>>
>>> -- You received this message because you are subscribed to the
>>> Google Groups "Foreman users" group. To unsubscribe from this
>>> group and stop receiving emails from it, send an email to
>>> foreman-users+unsubscribe@googlegroups.com. To post to this
>>> group, send email to foreman-users@googlegroups.com. Visit this
>>> group at http://groups.google.com/group/foreman-users. For more
>>> options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>> -- You received this message because you are subscribed to the
>> Google Groups "Foreman users" group. To unsubscribe from this
>> group and stop receiving emails from it, send an email to
>> foreman-users+unsubscribe@googlegroups.com. To post to this
>> group, send email to foreman-users@googlegroups.com. Visit this
>> group at http://groups.google.com/group/foreman-users. For more
>> options, visit https://groups.google.com/groups/opt_out.
>