<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>But the problem on the channel, it happened when I put the code as below: </span></div><div><span><br></span></div><div> <channel type='pty'><br>
<source mode='bind'
path='/var/lib/libvirt/qemu/va-i5E36098H-virtio.sock'/><br>
<target type='virtio'
name='org.qemu.guest_agent.0'/><br>
<address type='virtio-serial'
controller='0' bus='0' port='0'/><br>
</channel></div><div><span><br></span></div><div><span>when I remove the code, the VM can up. <br></span></div><div><br></div> <div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"> <div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> <hr size="1"> <b><span style="font-weight: bold;">From:</span></b> Laine Stump <laine@laine.org><br> <b><span style="font-weight: bold;">To:</span></b> libvir-list@redhat.com <br><b><span style="font-weight: bold;">Cc:</span></b> azahaziz@yahoo.com <br> <b><span style="font-weight: bold;">Sent:</span></b> Wednesday, August 8, 2012 10:23 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [libvirt] Channel with virtio problem<br><br> </font> </div> <br><div id="yiv911340996">
<div>
<div class="yiv911340996moz-cite-prefix">On 08/08/2012 03:29 AM, norazah aziz
wrote:<br>
</div>
<blockquote type="cite">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit; -x-system-font: none;" valign="top">I have configured
the kvm and edit the xml as below, however there are an
error when I want to run the guest. The error as follows:<br>
<br>
virsh create libvirt.xml <br>
<br>
error: Failed to create domain from libvirt-test.xml<br>
error: XML description for unknown target type for
character device: virtio is not well formed or invalid<br>
<br>
<br>
Please help me to solve this problem.<br>
<br>
############################################################<br>
<domain type='kvm'><br>
<name>i-5E36098H</name><br>
<os><br>
<type>hvm</type><br>
<kernel>/opt/eucalyptus-data/suria/i-5E36098H/kernel</kernel><br>
<initrd>/opt/eucalyptus-data/suria/i-5E36098H/ramdisk</initrd><br>
<cmdline>root=LABEL=root
console=ttyS0</cmdline><br>
</os><br>
<features><br>
<acpi/><br>
</features><br>
<memory>13107200</memory><br>
<vcpu>1</vcpu><br>
<devices><br>
<emulator>/usr/bin/kvm</emulator><br>
<disk type='file'><br>
<source
file='/opt/eucalyptus-data/suria/i-5E36098H/disk'/><br>
<target dev='vda' bus='virtio'/><br>
</disk><br>
<br>
<interface type='network'><br>
<source network='default'/><br>
<mac address='d0:0d:45:D2:08:01'/><br>
<model type='virtio'/><br>
</interface><br>
<br>
<controller type='ide' index='0'/><br>
<controller type='virtio-serial'
index='0' ports='16' vectors='4'/><br>
<controller type='virtio-serial'
index='1'><br>
<address type='pci' domain='0x0000'
bus='0x00' slot='0x0a' function='0x0'/><br>
</controller><br>
<br>
<parallel type='pty'><br>
<source path='/dev/pts/2'/><br>
<target port='0'/><br>
</parallel><br>
<br>
<serial type='pty'><br>
<source path='/dev/pts/3'/><br>
<!-- <source mode='bind'
path='/var/lib/libvirt/qemu/va-i-5E36098H-isa.sock'/>--><br>
<target type='virtio' port='0'/><br>
</td>
</tr>
</tbody>
</table>
</blockquote>
^^^^^^^^^^^^^<br>
<br>
This is your problem. serial targets don't accept a type attribute.
Only channel and console character devices understand target type.<br>
<br>
<br>
<br>
<br>
<br>
<blockquote type="cite">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit; -x-system-font: none;" valign="top">
</serial><br>
<br>
<console type='pty'><br>
<source path='/dev/pts/4'/><br>
<target type='virtio' port='0'/><br>
</console><br>
<br>
<channel type='pty'><br>
<source mode='bind'
path='/var/lib/libvirt/qemu/va-i5E36098H-virtio.sock'/><br>
<target type='virtio'
name='org.qemu.guest_agent.0'/><br>
<address type='virtio-serial'
controller='0' bus='0' port='0'/><br>
</channel><br>
<br>
<graphics type='vnc' port='-1' autoport='yes'
keymap='en-us'/><br>
</devices><br>
<br>
########################################################################<br>
<br>
<br>
</td>
</tr>
</tbody>
</table>
<br>
<fieldset class="yiv911340996mimeAttachmentHeader"></fieldset>
<br>
<pre>--
libvir-list mailing list
<a rel="nofollow" class="yiv911340996moz-txt-link-abbreviated" ymailto="mailto:libvir-list@redhat.com" target="_blank" href="mailto:libvir-list@redhat.com">libvir-list@redhat.com</a>
<a rel="nofollow" class="yiv911340996moz-txt-link-freetext" target="_blank" href="https://www.redhat.com/mailman/listinfo/libvir-list">https://www.redhat.com/mailman/listinfo/libvir-list</a></pre>
</blockquote>
<br>
</div>
</div><br><br> </div> </div> </div></body></html>