[virt-tools-list] Virt-manager doesn't attach Sheepdog storage VDI disk correctly

Dmitriy Slachshyov slashvdm at yandex.ru
Sat Aug 15 06:21:14 UTC 2015


On Tue, 11/08/2015 at 10:02 -0400, Cole Robinson wrote:
> Can you provide XML for a _working_ volume after it's been defined?
No, unfortunately I can't to get working XML. Every time when I try to
create a volume from XML-file through the `virsh vol-create` command, I
get another XML-output when I type `virsh vol-dumlxml` after successful
creation of volume.

As I guess, the reason is in the libvirt only!

> The example XML from the link you provide, which is what we have in 
> our
> testsuite, has some confusing bits:
> 
> - If specifies <key> but that's a readonly field. So I'm interested 
> to see
> what libvirt outputs for a working volume
I'am also interested to see that! I am not a maintainer of sheepdog


> - The volume path is 'sheepdog:myvol'. Is 'sheepdog:' just a protocol
> specified, like http://, or does it reference the pool name?
> - Also, from looking at the libvirt code, it seems <target><path> is 
> readonly
> as well, so whatever virt-manager specifies is just thrown out. So 
> I'm curious
> to see what libvirt spits out for a working volume
> 
> Also please put all this in a bug report. Starting tomorrow I'm 

How can I put a request to a bug report?

> offline for
> two weeks, I want to make sure this info doesn't get lost in the mail 
> shuffle
> when I come back


Look at attached output as a possible evidence:

-------------- next part --------------
# virsh pool-dumpxml mysheepdog
<pool type='sheepdog'>
  <name>mysheepdog</name>
  <uuid>94549b56-e7b6-440a-9e81-798cd81c220e</uuid>
  <capacity unit='bytes'>19414155264</capacity>
  <allocation unit='bytes'>25305088</allocation>
  <available unit='bytes'>19388850176</available>
  <source>
    <host name='192.168.100.10'/>
    <name>mysheepdog</name>
  </source>
</pool>

!!!!!! This is my hand-made XML output, which I have taken on maintainer's website with a little corections 

# cat /tmp/volsheep.xml 
<volume type='network'>
  <name>sheep-vdi-host</name>
  <key>mysheepdog/sheep-vdi-host</key>
  <source>
  </source>
  <capacity unit='bytes'>8589934592</capacity>
  <allocation unit='bytes'>8589934592</allocation>   <-- before volume creation
  <target>
    <path>sheepdog:sheep-vdi-host</path>        <-- before volume creation
    <format type='unknown'/>
    <permissions>
      <mode>0660</mode>
      <owner>0</owner>
      <group>0</group>
    </permissions>
  </target>
</volume>

!!!!!! Before doing anything I check that sheepdog volume is realy absent

# dog vdi list -a 192.168.100.10
  Name        Id    Size    Used  Shared    Creation time   VDI id  Copies  Tag

!!!!!! Creating the volume via virsh.

# virsh vol-create mysheepdog /tmp/volsheep.xml 
Vol sheep-vdi-host created from /tmp/volsheep.xml

!!!!!! Dumping the newly created volume.

# virsh vol-dumpxml --pool mysheepdog sheep-vdi-host
<volume type='network'>
  <name>sheep-vdi-host</name>
  <key>mysheepdog/sheep-vdi-host</key>          <-- better to use a UUID form in my opinion
  <source>
  </source>
  <capacity unit='bytes'>8589934592</capacity>
  <allocation unit='bytes'>0</allocation>       <-- after volume creation
  <target>
    <path>sheep-vdi-host</path>                 <-- after volume creation
    <format type='unknown'/>
    <permissions>
      <mode>0660</mode>
      <owner>0</owner>
      <group>0</group>
    </permissions>
  </target>
</volume>

!!!!!! Checking the dog datastore for a volume availability.

# dog vdi list -a 192.168.100.10
  Name        Id    Size    Used  Shared    Creation time   VDI id  Copies  Tag
  sheep-vdi-host     0  8.0 GB  0.0 MB  0.0 MB 2015-08-15 00:44   f0eb69    2:2              

!!!!!! Deleting a volume for the sake of experiment.

# virsh vol-delete sheep-vdi-host
Vol sheep-vdi-host deleted

!!!!!! Checking again the dog datastore after that.

# dog vdi list -a 192.168.100.10
  Name        Id    Size    Used  Shared    Creation time   VDI id  Copies  Tag

#



More information about the virt-tools-list mailing list