<p dir="ltr">Thanks, Cole. Could you give me a rough idea of where to look? I can then try to produce a patch for you to laugh at ;-).</p>
<p dir="ltr">Cheers, </p>
<p dir="ltr">Peter</p>
<div class="gmail_quote">On 7 Jan 2016 16:10, "Cole Robinson" <<a href="mailto:crobinso@redhat.com">crobinso@redhat.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 01/07/2016 07:04 AM, Peter Crowther wrote:<br>
> I'm trying to use virt-install to create a domain where the disks are on a<br>
> Ceph storage pool.  I've created a libvirt pool as follows:<br>
><br>
> ID=kvm<br>
> POOL=vmlive<br>
> SECRET_UUID=036f507c-d66c-4fa6-a624-6764e6c77996<br>
><br>
> POOL_DEFINITION_FILE=~/pool-$POOL.xml<br>
> cat > $POOL_DEFINITION_FILE << EOF<br>
> <pool type="rbd"><br>
>   <name>$POOL</name><br>
>   <source><br>
>     <name>$POOL</name><br>
>     <host name="test1" port="6789" /><br>
>     <host name="test2" port="6789" /><br>
>     <auth username='$ID' type='ceph'><br>
>       <secret uuid='$SECRET_UUID'/><br>
>     </auth><br>
>   </source><br>
> </pool><br>
> EOF<br>
> virsh pool-define $POOL_DEFINITION_FILE<br>
> rm -f $POOL_DEFINITION_FILE<br>
> virsh pool-autostart $POOL<br>
> virsh pool-start $POOL<br>
><br>
> I'm then using virt-install to try to create a domain:<br>
><br>
> NAME=testguest<br>
> DEV=vda<br>
> SIZE=8G<br>
> IMAGE=CentOS-7-x86_64-Minimal-1503-01.iso<br>
> VCPUS=1<br>
> RAM=512<br>
> MACLAST_HEX=10<br>
> IPLAST_DECIMAL=16<br>
><br>
> FILE=$NAME-$DEV<br>
> qemu-img create -f rbd rbd:$POOL/$FILE $SIZE<br>
> sudo virt-install \<br>
> --connect qemu:///system \<br>
> --virt-type kvm \<br>
> --name $NAME \<br>
> --ram $RAM \<br>
> --vcpus=$VCPUS \<br>
> --disk vol=$POOL/$FILE \<br>
> --location /var/lib/libvirt/images/$IMAGE \<br>
> --vnc \<br>
> --noautoconsole \<br>
> --os-type linux \<br>
> --os-variant rhel7 \<br>
> --network=bridge:virbr0,model=virtio,mac=52:54:00:00:00:$MACLAST_HEX \<br>
> --autostart<br>
><br>
> If I run the above with --print-xml, the generated XML includes the following<br>
> definition for the disk:<br>
><br>
>     <disk type="network" device="disk"><br>
>       <driver name="qemu"/><br>
>       <source protocol="rbd" name="vmlive/testguest-vda"><br>
>         <host name="test1" port="6789"/><br>
>       </source><br>
>       <target dev="vda" bus="virtio"/><br>
>     </disk><br>
><br>
> This has parsed enough of the pool definition to replace the libvirt pool with<br>
> much of its definition, but has excluded the vital <auth> part.<br>
><br>
> Should virt-install include more of the pool's data here, or less?  I'd<br>
> naively suggest less and give the user as much freedom as possible to change<br>
> the pool definition in the future.<br>
><br>
> Has anyone else encountered this problem and is there a known fix for my use<br>
> case?  I've not found one after reasonably extensive searching, but my<br>
> Google-fu isn't always perfect.<br>
><br>
> If you're reading this and there is a known fix, can you point me to it?<br>
><br>
<br>
Thanks for the report. Known issue, there isn't a fix, but it's on my todo<br>
list. Might be a month or so though, I need to set up a bunch of network<br>
storage servers (again)<br>
<br>
- Cole<br>
</blockquote></div>