[libvirt-users] virsh Attach-disk function

Jatin Kumar cs5090243 at cse.iitd.ernet.in
Tue Nov 15 18:03:34 UTC 2011


Hello,
I have to use attach-disk function for providing additional storage to the
guest domain
but i couldn't found proper documentation anywhere which i can follow.
----
For linux (Ubuntu 11.10 server edition, 64bit) guest i tried
qemu-img create -f qcow2 disk.qcow2 size
virsh attach-disk guest_name --driver file disk.qcow2 sdc

Both of the above commands are working fine but when i try to format the
drive from
inside linux then its size reduces to few KB. Before formatting qemu-img
info reports
correct info(as expected, correct virtual size) but after formatting the
even qemu-img
info reports its actual size(few KB) not virtual size.
-----
For windows (Windows 2008 Server R2) guest, i tried
qemu-img create -f raw disk.img size
virsh attach-disk guest_name --driver file disk.img vdb

virsh shows that the disk is attached successfully, but i cannot find any
disk attached
from inside the guest (in storage management). I tried rebooting the guest
but same
problem.

Is there anything that i am doing wrong or missing.

--
Jatin Kumar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20111115/e7c13480/attachment.htm>


More information about the libvirt-users mailing list