[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt-users] How to set image format to 'qcow2'



Try this:

<disk type="file" device="disk">
    <driver name="qemu" type="qcow2"/>
    <source file='/home/eucalyptus/imgs/xp.img'/>
    <target dev="hda" bus="ide" />
</disk>



On Sun, Dec 5, 2010 at 1:12 PM, 姜晓东 <jxd431 gmail com> wrote:

Hi, all

My xml 'dom1.xml' is as following:
<domain type='kvm' id='1'>
<name>kvm-xp</name>
<description>xp kvm</description>
<memory>524288</memory>
<currentMemory>524288</currentMemory>
<os>
<type>hvm</type>
<!--loader>/usr/lib/xen/boot/hvmloader</loader-->
<boot dev="hd"/>
</os>
<devices>
<disk type='file'>
<source file='/home/eucalyptus/imgs/xp.img'/>
<target dev='hda' bus='ide'/>
</disk>
<driver name='qemu' type='qcow2'/>
<!--graphics type="sdl" display=':0.0'/-->
<!--graphics type="desktop" fullscreen='yes'/-->
<graphics type='vnc' port='5904'/>
</devices>
</domain>

In this xml file, I don't know how to set disk file format to 'qcow2'.
When I create domain using this command:
virsh create dom1.xml

I cannot boot the image file. The log file
/var/log/libvirt/qemu/kvm-xp.log is as following:

LC_ALL=C
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.4.3
HOME=/root USER=root QEMU_AUDIO_DRV=none /usr/bin/kvm -S -M pc -m 512
-smp 1 -name kvm-xp -uuid a8cbae31-59a0-0bc5-4416-65ba63aa4231 -monitor
unix:/var/lib/libvirt/qemu/kvm-xp.monitor,server,nowait -no-acpi -boot c
-drive file=/home/eucalyptus/imgs/xp.img,if=ide,bus=0,unit=0,format=raw
-net none -serial none -parallel none -usb -vnc 127.0.0.1:4 -vga cirrus
-balloon virtio

I don't know how to set format argument to 'qcow2'

----------------
Xiaodong Jiang
jxd431 gmail com

_______________________________________________
libvirt-users mailing list
libvirt-users redhat com
https://www.redhat.com/mailman/listinfo/libvirt-users


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]