<div dir="ltr"><div class="gmail_extra"><div><div class="gmail_signature"><div dir="ltr"><div class="gmail_extra">Hi Andrea, </div><div class="gmail_extra">   Thanks for the reply; </div><div class="gmail_extra">   To shed some more light on the matter I performed a few more tests; each time doing a clean install. I installed ubuntu14.04 as the guest OS, keeping everything else the same. </div><div class="gmail_extra">On my custom Linux I've created ubuntu VMs before (using ide drivers) and it all works file. This time I created the VM using virtio disk drivers and the installation didn't even finish. It reported a disk related error saying it's not being able to read from /dev/vda. I restarted the machine...same error.</div><div class="gmail_extra">    Just to make sure that I have not messed anything up, I did the same on the ubuntu host, so installed ubuntu guest on an ubuntu host uding the same guest config xml. This time everything worked fine. So it looks like a problem with the kvm virtio drivers.</div><div class="gmail_extra"><br></div><div class="gmail_extra">    I was trying to stay away from updating the qemu package because adding the package takes a long time (usually, because of missing dependencies), but I'm not sure I have any other option at this point...</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Andrei</div></div></div></div>
<br><div class="gmail_quote">On Wed, Oct 5, 2016 at 2:45 PM, Andrea Bolognani <span dir="ltr"><<a href="mailto:abologna@redhat.com" target="_blank">abologna@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="gmail-HOEnZb"><div class="gmail-h5">On Wed, 2016-10-05 at 12:13 +0100, Andrei Perietanu wrote:<br>
> I just ran into a problem I can't make heads or tails of,<br>
> so I'm hoping to get some help here.<br>
> <br>
> I have a custom built Embedded Linux running qemu-kvm<br>
> 1.1.2 and libvirt 1.2.20<br>
> <br>
> I'm creating a domain with the following config:<br>
> <br>
> <domain type='kvm'><br>
>   <name>myVM</name>  <br>
>   <memory unit='KiB'>2097152</memory>  <br>
>   <vcpu placement='static'>2</vcpu>  <br>
>   <os><br>
>     <type arch='x86_64'>hvm</type><br>
>     <boot dev='hd'/>  <br>
>     <boot dev='cdrom'/>    <br>
>   </os><br>
>   <features><br>
>     <acpi/><br>
>     <apic/><br>
>   </features><br>
>   <cpu mode='host-model'/><br>
>   <clock offset='utc'><br>
>     <timer name='rtc' tickpolicy='catchup'/><br>
>     <timer name='pit' tickpolicy='delay'/><br>
>     <timer name='hpet' present='no'/><br>
>   </clock><br>
>   <on_poweroff>destroy</on_<wbr>poweroff><br>
>   <on_reboot>restart</on_<wbr>reboot><br>
>   <on_crash>restart</on_<wbr>crash>  <br>
>   <devices><br>
>     <disk type='file' device='cdrom'><br>
>       <driver name='qemu' type='raw'/><br>
>       <target dev='hdb' bus='ide'/><br>
>       <source file='custom.iso'/><br>
>       <readonly/><br>
>       <br>
>     </disk><br>
>     <disk type='file' device='disk'><br>
>       <driver name='qemu' type='qcow2'/><br>
>       <source file='/path/to/vdisk.img'/><br>
>       <target dev='vda' bus='virtio'/>      <br>
>     </disk><br>
>     <controller type='pci' model='pci-root'/><br>
>     <controller type='usb'/><br>
>     <controller type='ide'/><br>
>    <interface type='bridge'><br>
>       <source bridge='virbr0'/>      <br>
>       <model type='virtio'/><br>
>     </interface><br>
>    <br>
>     <serial type='pty'><br>
>       <target port='0'/><br>
>     </serial><br>
>     <console type='pty'><br>
>       <target type='serial' port='0'/><br>
>     </console><br>
>     <input type='tablet' bus='usb'/><br>
>     <input type='mouse' bus='ps2'/><br>
>     <input type='keyboard' bus='ps2'/><br>
>     <graphics type='vnc' port='-1' autoport='yes'/><br>
>     <video><br>
>       <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1'/><br>
>     </video><br>
>     <watchdog model='i6300esb' action='reset'/><br>
>     <memballoon model='none'/>   <br>
>   </devices><br>
> </domain><br>
<br>
</div></div>There doesn't seem to be anything obviously wrong with your<br>
guest configuration.<br>
<span class="gmail-"><br>
> Granted the OS I'm installing is again a custom Linux with<br>
> some software running on top ..so It's not a well known<br>
> OS...but I'm hoping that does not matter much. <br>
<br>
</span>It shouldn't.<br>
<span class="gmail-"><br>
> After installation I get all sorts of kernel panics and<br>
> errors about services not being able to start. <br>
<br>
</span>Wait, so the OS installer is perfectly happy and runs to<br>
completion, but once you boot the installed OS you get a<br>
bunch of errors?<br>
<br>
That sounds more like a faulty guest OS configuration than<br>
anything wrong with the virtual hardware. It most certainly<br>
doesn't sound like it could be anything disk related,<br>
because if that was the case the installer wouldn't have<br>
been able to access it in the first place.<br>
<br>
"All sorts of kernel panics and errors about services not<br>
being able to start" is *extremely* generic though, you'll<br>
have to be way more specific if you hope to get any help :)<br>
<span class="gmail-"><br>
> So I tried the same thing on ubuntu 14.04.2 LTS which<br>
> installed qemu-kvm 2.0.0 and libvirt 1.2.2<br>
> <br>
> Same config xml, but this time it worked better -I was<br>
> not getting the kernel panics.<br>
<br>
</span>Did you perform a new installation on the Ubuntu host?<br>
Or did you copy the qcow2 image over from the custom<br>
Linux host? Did you try going the other way around, eg.<br>
copy the working guest from the Ubuntu host to the<br>
custom Linux host?<br>
<span class="gmail-"><br>
> The OS I'm installing does not support IDE disks, it<br>
> needs a virtio disk.<br>
<br>
</span>And your guest configuration supplies one, so you should<br>
be all set on that front.<br>
<span class="gmail-"><br>
> The obvious solution here would be to try and get a newer<br>
> version of qemu, but since we're talking about a custom<br>
> built Linux I'd have to add the package manually and<br>
> compile from source...which cakes a long time to do. So<br>
> before attempting that....just wondering....is there a<br>
> better way? Anything I can try?<br>
<br>
</span>I think you're seriously overestimating the time it would<br>
take to compile QEMU or libvirt from source ;)<br>
<br>
An hour or so should be plenty to rebuild both components<br>
from source, and most of that time would be spent figuring<br>
out and gathering the build requirements rather than<br>
compiling.<br>
<span class="gmail-HOEnZb"><font color="#888888"><br>
-- <br>
Andrea Bolognani / Red Hat / Virtualization<br>
</font></span></blockquote></div><br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra"> </div><div class="gmail_extra"> </div></div>

<br>

        
        
        


<p><img src="http://www.klasonline.com/klas_telecom_email_sig_1_01.jpg"></p><p><span style="font-family:Arial;font-size:x-small">The information
transmitted is intended only for the person or entity to which it is
addressed and may contain confidential and/or privileged material.
Any review, retransmission, dissemination or other use of or taking
of any action in reliance upon this information by persons or
entities other than the intended recipient is prohibited. If you
receive this in error please contact the sender and delete the
material from any computer immediately. It is the policy of Klas
 Limited to disavow the sending of offensive material and should
you consider that the material contained in the message is offensive
you should contact the sender immediately and also your I.T. Manager.</span></p><p><span style="font-family:Arial;font-size:x-small">Klas Telecom
Inc., a Virginia Corporation with offices at 1101 30th St. NW,
Washington, DC 20007.</span></p>
<p>
<font color="#000000"><font face="Arial"><font size="1">Klas Limited
(Company Number 163303) trading as Klas Telecom, an Irish Limited
Liability Company, with its registered office at Fourth Floor, One
Kilmainham Square, Inchicore Road, Kilmainham, Dublin 8, Ireland.</font></font></font></p>