I&#39;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>    &lt;disk type=&#39;file&#39; device=&#39;disk&#39;&gt;</div><div>      &lt;driver name=&#39;qemu&#39; type=&#39;qcow2&#39; cache=&#39;none&#39;/&gt;</div><div>      &lt;source file=&#39;/var/lib/libvirt/images/vmname_var.qcow2&#39;/&gt;</div>
<div>      &lt;target dev=&#39;vda&#39; bus=&#39;virtio&#39;/&gt;</div><div>      &lt;address type=&#39;pci&#39; domain=&#39;0x0000&#39; bus=&#39;0x00&#39; slot=&#39;0x04&#39; function=&#39;0x0&#39;/&gt;</div><div>    &lt;/disk&gt;</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">&lt;<a href="mailto:thomas.veymont@gmail.com">thomas.veymont@gmail.com</a>&gt;</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 &lt;<a href="mailto:thomas.veymont@gmail.com">thomas.veymont@gmail.com</a>&gt;:<br>
<div><div></div><div class="h5">&gt; hi there,<br>
&gt;<br>
&gt; I&#39;m following these documentations to add a file-based disk volume to<br>
&gt; a KVM guest under Centos 6.0 :<br>
&gt; <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>

&gt;<br>
&gt; as instructed, I created a &quot;pool&quot; then a &quot;volume&quot;, file-based, e.g :<br>
&gt;<br>
&gt; mkdir /mnt/raid/kvm_pool1<br>
&gt; virsh # pool-define-as pool1 dir - - - - &quot;/mnt/raid/kvm_pool1&quot;<br>
&gt; virsh # pool-autostart pool1<br>
&gt; virsh # vol-create-as pool1 volume1 20G --allocation 15G --format qcow2<br>
&gt;<br>
&gt; now I want to associate &quot;volume1&quot; to my guest OS. Following this doc:<br>
&gt;<br>
&gt; <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>

&gt;<br>
&gt; - why does this ask me to create a file with &quot;dd&quot; ? it&#39;s already been<br>
&gt; created before with the virsh pool commands, isn&#39;t it? Seems to<br>
&gt; me I&#39;m bypassing the libvirt/virsh layer if I do that.<br>
&gt;<br>
&gt; - after that, the doc tells me to do some stuff with guest XML files.<br>
&gt; Is&#39;nt there some specific commands provided by<br>
&gt; virsh to associate a managed Pool to a managed Guest ?<br>
&gt;<br>
&gt; - in this case, should I use the virsh &quot;attach-disk&quot; command ?<br>
&gt;<br>
&gt; thanks.<br>
&gt; --<br>
&gt; Tom<br>
&gt;<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>