Have you checked linux permissions for that directory? I had the same error 
and fix it giving "libvirt-qemu:kvm" owners to directory and base image.

El lunes, 9 de noviembre de 2015, 10:36:44 (UTC+1), [email protected] 
escribió:
>
> Greetings,
>
> I'm trying to setup Foreman, got it working with LAN hypervisors, but now 
> for production purposes, I need to get it up running for remote VM install 
> on rented servers where I have close to no control over the network. We get 
> no access to DHCP, VM have to be configured statically with a somewhat 
> unconventionnal network setup, a /32 hostmask using the hypervisor as a 
> manual route and default gateway. We used to install those VM networkless 
> and setup the network during post-install via VNC. Since standard 
> network-based installs doesn't seem to cut it in those conditions, I wanted 
> to try out templates in this environnement.
>
> So I configured manually my template VM, installed cloud-init, made sure 
> it ran, wrote some custom cloud-init logic in Foreman to setup the network 
> correctly but I can't seem to get past the second step in host creation, 
> after userdata rendering and during resources allocations. The process 
> stops with the following error message :
>
> Failed to create a compute HV (Libvirt) instance vm.fqdn: ERF42-3305 
> [Foreman::Exception]: Unable to find template /dev/vm_kvm/tplvm 
>
> The overall setup is using libvirt with KVM and a LVM storage pool. I 
> RTFMed a bit, mostly found messages related to the template image path
> ( http://projects.theforeman.org/projects/foreman/wiki/ERF42-3305 ). I'm 
> not too sure how I fall into this problem since the image path seems to 
> correspond with how the storage pool was configured, but I'm probably just 
> missing something.
>
> Here is my pool definition :
>
> # virsh pool-dumpxml vm_kvm
> <pool type='logical'>
>   <name>vm_kvm</name>
>   <uuid>82ee3e78-94bd-053f-c982-dca2f9b09ec9</uuid>
>   <capacity unit='bytes'>2193688100864</capacity>
>   <allocation unit='bytes'>1911260446720</allocation>
>   <available unit='bytes'>282427654144</available>
>   <source>
>     <name>vm_kvm</name>
>     <format type='unknown'/>
>   </source>
>   <target>
>     <path>/dev/vm_kvm</path>
>     <permissions>
>       <mode>0700</mode>
>       <owner>4294967295</owner>
>       <group>4294967295</group>
>     </permissions>
>   </target>
> </pool>
>
> Here is my template definition :
>
> # virsh dumpxml tplvm
> <domain type='kvm'>
>   <name>tplvm</name>
>   <uuid>50234253-c419-6f3d-7003-0dcbf8063eac</uuid>
>   <description>xxxxxxxxxxxxxxxxxxxxxxx</description>
>   <memory unit='KiB'>2097152</memory>
>   <currentMemory unit='KiB'>2097152</currentMemory>
>   <vcpu placement='static'>2</vcpu>
>   <os>
>     <type arch='x86_64' machine='pc-1.1'>hvm</type>
>     <boot dev='hd'/>
>   </os>
>   <features>
>     <acpi/>
>     <apic/>
>     <pae/>
>   </features>
>   <clock offset='utc'/>
>   <on_poweroff>destroy</on_poweroff>
>   <on_reboot>restart</on_reboot>
>   <on_crash>restart</on_crash>
>   <devices>
>     <emulator>/usr/bin/kvm</emulator>
>     <disk type='block' device='disk'>
>       <driver name='qemu' type='raw' cache='none'/>
>       <source dev='/dev/vm_kvm/tplvm'/>
>       <target dev='vda' bus='virtio'/>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x04' 
> function='0x0'/>
>     </disk>
>     <disk type='block' device='cdrom'>
>       <driver name='qemu' type='raw'/>
>       <target dev='hdc' bus='ide'/>
>       <readonly/>
>       <address type='drive' controller='0' bus='1' target='0' unit='0'/>
>     </disk>
>     <controller type='usb' index='0'>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' 
> function='0x2'/>
>     </controller>
>     <controller type='ide' index='0'>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' 
> function='0x1'/>
>     </controller>
>     <interface type='bridge'>
>       <mac address='xx:xx:xx:xx:xx:xx'/>
>       <source bridge='br0'/>
>       <model type='virtio'/>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x03' 
> function='0x0'/>
>     </interface>
>     <serial type='pty'>
>       <target port='0'/>
>     </serial>
>     <console type='pty'>
>       <target type='serial' port='0'/>
>     </console>
>     <input type='mouse' bus='ps2'/>
>     <graphics type='vnc' port='5915' autoport='no' listen='0.0.0.0' 
> keymap='fr'>
>       <listen type='address' address='0.0.0.0'/>
>     </graphics>
>     <video>
>       <model type='cirrus' vram='9216' heads='1'/>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x02' 
> function='0x0'/>
>     </video>
>     <memballoon model='virtio'>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x05' 
> function='0x0'/>
>     </memballoon>
>   </devices>
> </domain>
>
> I should probably add I'm using Foreman 1.9.3. The Foreman host and the VM 
> are running Debian 8, the hypervisor is still running Debian 7.The HV is 
> running on bare-metal Dell and HP servers rented with Online ( 
> https://www.online.net/ ).
>
> Thanks in advance.
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to