I'm not aware of a virsh attach disk command but if you duplicate the entries for the existing disk you can then add the new one...something like this...<div><br></div><div># virsh -c qemu:///system edit VMname</div><div>
<br></div><div><div>    <disk type='file' device='disk'></div><div>      <driver name='qemu' type='qcow2' cache='none'/></div><div>      <source file='/var/lib/libvirt/images/vmname_var.qcow2'/></div>
<div>      <target dev='vda' bus='virtio'/></div><div>      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/></div><div>    </disk></div>
<div><br></div><div>You will have to adjust the values of course.</div><div><br></div><div>Why not try doing this with virt-manager?  When I started using KVM (after moving from ESXi) I had trouble with all the commands and finding everything I needed, but virt-manager works great.</div>
<div><br></div><div>- Trey</div><div><br></div><br><div class="gmail_quote">On Tue, Jul 26, 2011 at 4:26 AM, thomas veymont <span dir="ltr"><<a href="mailto:thomas.veymont@gmail.com">thomas.veymont@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">anyone may help on that topic ?<br>
thanks<br>
<br>
2011/7/20 thomas veymont <<a href="mailto:thomas.veymont@gmail.com">thomas.veymont@gmail.com</a>>:<br>
<div><div></div><div class="h5">> hi there,<br>
><br>
> I'm following these documentations to add a file-based disk volume to<br>
> a KVM guest under Centos 6.0 :<br>
> <a href="http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Virtualization/chap-Virtualization-Storage_Volumes.html" target="_blank">http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Virtualization/chap-Virtualization-Storage_Volumes.html</a><br>

><br>
> as instructed, I created a "pool" then a "volume", file-based, e.g :<br>
><br>
> mkdir /mnt/raid/kvm_pool1<br>
> virsh # pool-define-as pool1 dir - - - - "/mnt/raid/kvm_pool1"<br>
> virsh # pool-autostart pool1<br>
> virsh # vol-create-as pool1 volume1 20G --allocation 15G --format qcow2<br>
><br>
> now I want to associate "volume1" to my guest OS. Following this doc:<br>
><br>
> <a href="http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Virtualization/sect-Virtualization-Virtualized_block_devices-Adding_storage_devices_to_guests.html" target="_blank">http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Virtualization/sect-Virtualization-Virtualized_block_devices-Adding_storage_devices_to_guests.html</a><br>

><br>
> - why does this ask me to create a file with "dd" ? it's already been<br>
> created before with the virsh pool commands, isn't it? Seems to<br>
> me I'm bypassing the libvirt/virsh layer if I do that.<br>
><br>
> - after that, the doc tells me to do some stuff with guest XML files.<br>
> Is'nt there some specific commands provided by<br>
> virsh to associate a managed Pool to a managed Guest ?<br>
><br>
> - in this case, should I use the virsh "attach-disk" command ?<br>
><br>
> thanks.<br>
> --<br>
> Tom<br>
><br>
_______________________________________________<br>
CentOS-virt mailing list<br>
<a href="mailto:CentOS-virt@centos.org">CentOS-virt@centos.org</a><br>
<a href="http://lists.centos.org/mailman/listinfo/centos-virt" target="_blank">http://lists.centos.org/mailman/listinfo/centos-virt</a><br>
</div></div></blockquote></div><br></div>