Bug #2374
Updated by Lukas Zapletal almost 11 years ago
I'm unable to provision a libvirt host when the storage backend is an LVM pool. Host creation appears to fail when Foreman requests LV parameters that LVM2 is unable to satisfy. Here's the error from the libvirtd: @2013-04-04 00:15:41.898+0000: 3686: error : virCommandWait:2345 : internal error Child process (/sbin/lvcreate --name test1.example.com-disk1 -L 0K --v irtualsize 41943040K sec) unexpected exit status 5: Unable to create new logical volume with no extents@ It's not clear if this is truly a Foreman bug, a LVM bug, or libvirt issue. However, the Following change in Foreman did work around the problem: <pre> --- /usr/share/foreman/lib/foreman/model/libvirt.rb.orig 2013-04-04 12:39:13.000000000 -0700 +++ /usr/share/foreman/lib/foreman/model/libvirt.rb 2013-04-04 12:39:24.000000000 -0700 @@ -136,7 +136,7 @@ vols = [] (volumes = args[:volumes]).each do |vol| vol.name = "#{args[:prefix]}-disk#{volumes.index(vol)+1}" - vol.allocation = "0K" + vol.allocation = "1M" vol.save vols << vol end </pre> I can confirm that provisioning using a directory based storage pool works normally in this environment. Software versions: libvirt-0.10.2-18.el6.x86_64 lvm2-2.02.87-6.el6.x86_64 foreman-1.1RC5-2.el6.noarch OS Release is Scientific Linux 6.2