<div>Hi all,</div>
<div> </div>
<div>I'm trying to call the libvirt API from my Windows machine.</div>
<div> </div>
<div>When i try to create to a Domain using<font size="2"> "<font style="BACKGROUND-COLOR: #ffff33">virDomainDefineXML</font>" function</font></div>
<div> </div>
<div>I have to pass an XML file containing the Description of the Domain.</div>
<div> </div>
<div>Here is the part of the XML file that im using:</div>
<div> </div>
<div><domain type='qemu' id='1'><br>..</div>
<div>.. </div>
<div>  <devices><br>    <emulator>/usr/bin/qemu</emulator><br>    <disk type='file' device='disk'><br>      <font style="BACKGROUND-COLOR: #ffff33"><source file='/var/lib/libvirt/images/WinXp.img'/><br>
</font>      <target dev='hda' bus='ide'/><br>    </disk><br>    <disk type='file' device='cdrom'><br>      <source file='/home/anuj/ISOs/WinXpSp3/Windows_XP_SP3.iso'/><br>
      <target dev='hdc' bus='ide'/><br>      <readonly/><br>    </disk><br>..</div>
<div>..<br></domain></div>
<div> </div>
<div><font style="BACKGROUND-COLOR: #ffff33"><source file='/var/lib/libvirt/images/WinXp.img'/></font><br>This is the path which contains the img file for the Domain.</div>
<div> </div>
<div>I have created this file using this command:</div>
<div> </div>
<div><font style="BACKGROUND-COLOR: #ffff66">qemu-img create -f raw /var/lib/libvirt/images/WinXp.img 10G</font></div>
<div> </div>
<div><strong>Now: my question is:</strong></div>
<div> </div>
<div>Is there a way by which i can create this img file using some libvirt call directly and then use this for my domain creation.</div>
<div> </div>
<div>Or modify the XML file itself so  that <font style="BACKGROUND-COLOR: #ffff33">virDomainDefineXML</font> call creates the img file at the path and the size that i specify.</div>
<div> </div>
<div>Could someone also give me some example for the same.</div>
<div><br clear="all">Regards<br>Anuj</div>