Project

General

Profile

Actions

Feature #5197

closed

Preallocated disk support for oVirt

Added by Nathan Lager over 10 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Compute resources
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

As a RHEV user, it would be nice to have the option between thin provisioned disks, and preallocated disks when creating VM's using the oVirt API.

I've tested with Foreman 1.4.2, and RHEV 3.2. There is no option presented when creating a disk, and the disk is created by default as Thin.


Related issues 3 (0 open3 closed)

Related to Foreman - Bug #9932: Setting 'Preallocate disk' flag for oVirt compute profile does not stickClosedMarek Hulán03/27/2015Actions
Has duplicate Foreman - Bug #5086: Virtual machines in ovirt are created with "Thin provision" disksDuplicate04/07/2014Actions
Has duplicate Foreman - Feature #1854: Support non thin provisoned disk with oVirtDuplicate09/06/2012Actions
Actions #1

Updated by Dominic Cleal over 10 years ago

  • Category set to Compute resources
Actions #2

Updated by Leon Strong over 10 years ago

Just on this, as far as i'm able to tell, i've not found an easy way to allow this, those users (myself included) that have thin provisioning on their san backends are in for a world of pain if they can't pre-allocate VM disks. :\

Actions #3

Updated by Nathan Lager over 10 years ago

If this helps, I've worked through doing this via he API. I have a perl script which i've used in the past to allocate vm's from templates. I managed to piece together the following disk allocation xml, based on Red Hat's API docs.

<disk>
<clone>true</clone>
<storage_domains>
<storage_domain id=\\"%s\\"/></storage_domains>
<size>%s</size>
<type>system</type>
<interface>virtio</interface>
<format>RAW</format>
<bootable>true</bootable>
</disk>

The format = RAW flag is the key. That tells the API to create this disk as a preallocated type, and not a thin disk.

This should be possible via foreman. I'd guess it depends on whatever library foreman uses to interact with the oVirt API.

Actions #4

Updated by Dominic Cleal over 10 years ago

  • Has duplicate Bug #5086: Virtual machines in ovirt are created with "Thin provision" disks added
Actions #5

Updated by Dominic Cleal over 10 years ago

  • Has duplicate Feature #1854: Support non thin provisoned disk with oVirt added
Actions #6

Updated by Dwight Anderson over 10 years ago

It looks like the functionality for this is there in the underlying code base, the default behavior comes from the rbovirt gems rbovirt-0.0.21/lib/ovirt/volume.rb which sets format to cow and sparse to true when no settings are being passed for those variables. The system should just need to be modified to pass the additional options for format and sparse as a part of the disk information sent by the web interface when requesting a new disk.

Actions #7

Updated by Dominic Cleal over 10 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Amos Benari
  • Target version set to 1.8.2
Actions #8

Updated by Anonymous over 10 years ago

  • Target version changed from 1.8.2 to 1.8.1
Actions #9

Updated by Nathan Lager over 10 years ago

I see the status sitting at ready for testing.

Are you waiting for someone to test? If so, i'd be willing to do what I can. What's involved in getting the proper version of code running to test?

Thanks!

Actions #10

Updated by Dominic Cleal over 10 years ago

Nathan Lager wrote:

I see the status sitting at ready for testing.

Are you waiting for someone to test? If so, i'd be willing to do what I can. What's involved in getting the proper version of code running to test?

Yep, that'd be a great help.

You can do something like: cd /usr/share/foreman && curl https://github.com/theforeman/foreman/pull/1462.patch | patch -p1 and then restart Foreman/httpd.

Actions #11

Updated by Nathan Lager over 10 years ago

Dominic Cleal wrote:

Nathan Lager wrote:

I see the status sitting at ready for testing.

Are you waiting for someone to test? If so, i'd be willing to do what I can. What's involved in getting the proper version of code running to test?

Yep, that'd be a great help.

You can do something like: cd /usr/share/foreman && curl https://github.com/theforeman/foreman/pull/1462.patch | patch -p1 and then restart Foreman/httpd.

Thanks! I'll see if I can give that a shot without affecting my production foreman. Give me some time to work out the best way to do that, and I'll report back with the outcome.

Actions #12

Updated by Nathan Lager over 10 years ago

ok, I gave it a shot. Close, but Foreman was unable to create my vm's disk.

It gave me the option to preallocate the disk, but when I submitted it, it failed while creating the instance, with the following error:

Unable to save
Failed to create a compute Metal (oVirt) instance testprov-nonthin.dev.lafayette.edu: Cannot add Virtual Machine Disk. Disk configuration (COW Preallocated) is incompatible with the storage domain type.

The Storage domain is a RHEV Storage Pool, Fibre channel attached. Let me know what other info you need in order to troubleshoot.

Thanks!

Actions #13

Updated by Anonymous over 10 years ago

  • Target version changed from 1.8.1 to 1.8.0
Actions #14

Updated by Leon Strong over 10 years ago

i've created a pull request that should satisfy this if someone wants to test it, based off the previous pull request. https://github.com/theforeman/foreman/pull/1568/files

Hope this isn't breaking etiquette or something, I really need this in mainline asap.

I've verified it working against my RHEV cluster.

Actions #15

Updated by Leon Strong over 10 years ago

One thing of interest, in my development environment, I notice that the machine provisions fine, but it sometimes get rolled back after as it times out whilst waiting to power up the machine (as the disks are still locked on the rhev side), not sure what the best path forward for that is. (I just don't enable powering on the machine when thick provisioning).

Thoughts?

Actions #16

Updated by Lukas Zapletal over 10 years ago

Known issue, locked volumes seems to be problematic.

Actions #17

Updated by Dominic Cleal over 10 years ago

  • Assignee changed from Amos Benari to Leon Strong
  • Translation missing: en.field_release set to 10
Actions #18

Updated by Leon Strong over 10 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #19

Updated by The Foreman Bot over 10 years ago

  • Pull request https://github.com/theforeman/foreman/pull/1462 added
  • Pull request deleted ()
Actions #20

Updated by Checheta Yan almost 9 years ago

Spam removed by Redmine administrator

Actions #21

Updated by Marek Hulán almost 9 years ago

  • Pull request https://github.com/theforeman/foreman/pull/1573 added
  • Pull request deleted (https://github.com/theforeman/foreman/pull/1462)

Different PR was used to fix this issue.

Actions #22

Updated by Marek Hulán almost 9 years ago

  • Related to Bug #9932: Setting 'Preallocate disk' flag for oVirt compute profile does not stick added
Actions

Also available in: Atom PDF