<div dir="ltr"><div><div>I'm trying to use virt-install to create a domain where the disks are on a 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></div>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></div>If I run the above with --print-xml, the generated XML includes the following definition for the disk:<br><div><div><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></div><div>This has parsed enough of the pool definition to replace the libvirt pool with much of its definition, but has excluded the vital <auth> part.<br><br></div><div>Should virt-install include more of the pool's data here, or less?  I'd naively suggest less and give the user as much freedom as possible to change the pool definition in the future.<br><br></div><div>Has anyone else encountered this problem and is there a known fix for my use case?  I've not found one after reasonably extensive searching, but my Google-fu isn't always perfect.<br><br></div><div>If you're reading this and there is a known fix, can you point me to it?<br><br></div><div>Thanks!<br><br></div><div>- Peter<br>--<br></div><div>Peter Crowther, Director, Melandra Limited<br><br></div></div></div>