zhijun liu
2012-Nov-19 10:53 UTC
[libvirt-users] how to make the volume's format to qcow2 when creating volume
hi,all the following are files of pool and volume. storage pool is based on logical(LVM) and iscsi,now I create volume specified the format to "qcow2" *pool.xml* <pool type='logical'> <name>pool_190</name> <source> <device path='/dev/disk/by-path/ip-192.168.0.190:3260-iscsi-iqn.2012-11.com.cloudking:server.target1-lun-1'/> </source> <target> <path>/dev/pool_190</path> </target> </pool> *volume.xml* <?xml version="1.0" encoding="UTF-8" ?> <volume> <name>volume1</name> <capacity unit="GB">1</capacity> <target> <format type="qcow2" /> </target> </volume> *the problmes is :when the volume created successfully,However, the volume's format is 'raw'* like this image: /dev/pool_190/volume1 *file format: raw* virtual size: 1.0G (1073741824 bytes) disk size: 0 how to resolve this troublesome. libvirt :0.9.8 os:ubuntu12.04 many thanks for any reply.... -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20121119/cf8f03f6/attachment.htm>
Daniel P. Berrange
2012-Nov-19 10:57 UTC
[libvirt-users] how to make the volume's format to qcow2 when creating volume
On Mon, Nov 19, 2012 at 06:53:44PM +0800, zhijun liu wrote:> hi,all > > the following are files of pool and volume. > > storage pool is based on logical(LVM) and iscsi,now I create volume > specified the format to "qcow2" > > *pool.xml* > <pool type='logical'> > <name>pool_190</name> > <source> > <device > path='/dev/disk/by-path/ip-192.168.0.190:3260-iscsi-iqn.2012-11.com.cloudking:server.target1-lun-1'/> > </source> > <target> > <path>/dev/pool_190</path> > </target> > </pool> > > *volume.xml* > <?xml version="1.0" encoding="UTF-8" ?> > <volume> > <name>volume1</name> > <capacity unit="GB">1</capacity> > <target> > <format type="qcow2" /> > </target> > </volume> > > *the problmes is :when the volume created successfully,However, the > volume's format is 'raw'*The use of non-raw formats is only supported for file based storage volumes. You're using LVM, so its always creating it raw. Danel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|