Hi all,


i am trying to create virtual box using libvirt ,
following is xml i tried to use following xml  (followed example in libvirt site . http://libvirt.org/drvvbox.html)

<domain type='vbox'>
  <name>vboxtest</name>
  <os>      <type>hvm</type>          <boot dev='hd'/>        <boot dev='cdrom'/>     </os>
  <memory>393216</memory>
  <vcpu>1</vcpu>
  <features>   <acpi/>    </features>
  <devices>
    <disk type='file' device='cdrom'>       <source file=''/>      <target dev='hdc'/>      <readonly/>     </disk>
    <disk type='file' device='disk'>         <source file='/d1/vir_box/ub.vdi'/>         <target dev='hdd'/>     </disk>
    <interface type='bridge'>       <source bridge='eth0'/>         <mac address='00:15:C5:ED:63:E6'/>     </interface>
       <interface type='user'>         <mac address='00:15:C5:ED:63:E6'/>         <model type='Am79C973'/>       </interface>
     <parallel type='dev'>         <source path='/dev/pts/1'/>         <target port='0'/>       </parallel>
     <parallel type='dev'>         <source path='/dev/pts/2'/>        <target port='1'/>      </parallel>
    <serial type="dev">        <source path="/dev/ttyS0"/>        <target port="0"/>        </serial>
 </devices>
</domain>

now i have few questions/doubts on the xml

(i have working vdi file which is created using GUI and has ubuntu installed , i just want to start that using another machine )
as soon as i try following code i am getting segfault , i am suspecting some problem with xml input

import libvirt
conn=libvirt.open('vbox:///session')
xmldesc = <above string>
dom=conn.createLinux(xmldesc,0)
Segmentation fault


in my home directory/Machines  xml  file is created

<?xml version="1.0"?>
<VirtualBox xmlns="http://www.innotek.de/VirtualBox-settings" version="1.9-linux">
  <Machine uuid="{9e37e287-67e3-ca78-5af0-9c38f14de49e}" name="vboxtest" OSType="Other" lastStateChange="2010-03-22T10:29:18Z" aborted="true">
    <Hardware version="2">
      <CPU count="1">
        <HardwareVirtEx enabled="true" exclusive="true"/>
        <HardwareVirtExNestedPaging enabled="true"/>
        <HardwareVirtExVPID enabled="true"/>
        <PAE enabled="false"/>
      </CPU>
      <Memory RAMSize="384"/>
      <Boot> <Order position="1" device="Floppy"/>  <Order position="2" device="DVD"/> <Order position="3" device="HardDisk"/> <Order position="4" device="None"/>     </Boot>
      <Display VRAMSize="8" monitorCount="1" accelerate3D="false" accelerate2DVideo="false"/>
      <RemoteDisplay enabled="false" port="3389" authType="Null"/>
      <BIOS>  <ACPI enabled="true"/> <IOAPIC enabled="false"/> <Logo fadeIn="true" fadeOut="true" displayTime="0"/> <BootMenu mode="MessageAndMenu"/>       <TimeOffset value="0"/>
        <PXEDebug enabled="false"/>
      </BIOS>
      <USBController enabled="false" enabledEhci="false"/>
      <Network>
        <Adapter slot="0" enabled="false" MACAddress="080027F53A84" cable="true" speed="0" type="Am79C973"/>
        <Adapter slot="1" enabled="false" MACAddress="080027EE31BD" cable="true" speed="0" type="Am79C973"/>
        <Adapter slot="2" enabled="false" MACAddress="080027CE9DA5" cable="true" speed="0" type="Am79C973"/>
        <Adapter slot="3" enabled="false" MACAddress="080027D86B0D" cable="true" speed="0" type="Am79C973"/>
        <Adapter slot="4" enabled="false" MACAddress="080027DAA33F" cable="true" speed="0" type="Am79C973"/>
        <Adapter slot="5" enabled="false" MACAddress="08002734F6E6" cable="true" speed="0" type="Am79C973"/>
        <Adapter slot="6" enabled="false" MACAddress="08002747D785" cable="true" speed="0" type="Am79C973"/>
        <Adapter slot="7" enabled="false" MACAddress="080027C22A98" cable="true" speed="0" type="Am79C973"/>
      </Network>
      <UART>
        <Port slot="0" enabled="false" IOBase="0x3f8" IRQ="4" hostMode="Disconnected"/>
        <Port slot="1" enabled="false" IOBase="0x3f8" IRQ="4" hostMode="Disconnected"/>
      </UART>
      <LPT>
        <Port slot="0" enabled="false" IOBase="0x378" IRQ="4"/>
        <Port slot="1" enabled="false" IOBase="0x378" IRQ="4"/>
      </LPT>
      <AudioAdapter controller="AC97" driver="ALSA" enabled="false"/>
      <SharedFolders/>
      <Clipboard mode="Bidirectional"/>
      <Guest memoryBalloonSize="0" statisticsUpdateInterval="0"/>
      <GuestProperties/>
    </Hardware>
    <StorageControllers/>
  </Machine>
</VirtualBox>


please help me if i am doing anything wrong ,  how can i specify storage controller in xml file and any input on why it is aborting with segfault

sorry for the long post and xml
--
Madhu