Re: [Fedora-xen] Running fedora xen on top of KVM?

2015-09-16 Thread M A Young
On Wed, 16 Sep 2015, Cole Robinson wrote:

> Unfortunately I couldn't get anything else extra out of xen using any of these
> options or the ones Major recommended... in fact I couldn't get anything to
> the serial console at all. console=con1 would seem to redirect messages since
> they wouldn't show up on the graphical display, but nothing went to the serial
> log. Maybe I'm missing something...

That should be console=com1 so you have a typo either in this message or 
in your tests.

> sync_console gives an extra message but that's all I could see. Is
> console=hvc0 correct for a KVM guest, or is that only going to work for
> xen-on-xen ? I tried console=ttyS0 as well but it didn't make a difference

It is hvc0 to send it to xen and thus onto the console you specified 
above. You can get some early debug messages of the kernel with 
earlyprintk=xen and "log_lvl=all guest_loglvl=all" are recommended at 
http://wiki.xenproject.org/wiki/Debugging_Xen for the xen hypervisor line.

Michael Young
--
xen mailing list
xen@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/xen

Re: [Fedora-xen] Running fedora xen on top of KVM?

2015-09-16 Thread Cole Robinson
On 09/16/2015 05:08 PM, Konrad Rzeszutek Wilk wrote:
> On Wed, Sep 16, 2015 at 05:04:31PM -0400, Cole Robinson wrote:
>> On 09/16/2015 04:07 PM, M A Young wrote:
>>> On Wed, 16 Sep 2015, Cole Robinson wrote:
>>>
 Unfortunately I couldn't get anything else extra out of xen using any of 
 these
 options or the ones Major recommended... in fact I couldn't get anything to
 the serial console at all. console=con1 would seem to redirect messages 
 since
 they wouldn't show up on the graphical display, but nothing went to the 
 serial
 log. Maybe I'm missing something...
>>>
>>> That should be console=com1 so you have a typo either in this message or 
>>> in your tests.
>>>
>>
>> Yeah that was it :/ So here's the crash output use -cpu host:
>>
>> - Cole
>>



>> about to get started...
>> (XEN) traps.c:459:d0v0 Unhandled general protection fault fault/trap [#13] on
>> VCPU 0 [ec=]
>> (XEN) domain_crash_sync called from entry.S: fault at 82d08023a5d3
>> create_bounce_frame+0x12b/0x13a
>> (XEN) Domain 0 (vcpu#0) crashed on cpu#0:
>> (XEN) [ Xen-4.5.1  x86_64  debug=n  Not tainted ]
>> (XEN) CPU:0
>> (XEN) RIP:e033:[]
> 
> That is the Linux kernel EIP. Can you figure out what is at 810032b0 ?
> 
> gdb vmlinux and then
> x/20i 0x810032b0
> 
> can help with that.
> 

Updated to the latest kernel 4.1.6-201.fc22.x86_64. Trace is now:

about to get started...
(XEN) traps.c:459:d0v0 Unhandled general protection fault fault/trap [#13] on
VCPU 0 [ec=]
(XEN) domain_crash_sync called from entry.S: fault at 82d08023a5d3
create_bounce_frame+0x12b/0x13a
(XEN) Domain 0 (vcpu#0) crashed on cpu#0:
(XEN) [ Xen-4.5.1  x86_64  debug=n  Not tainted ]
(XEN) CPU:0
(XEN) RIP:e033:[]
(XEN) RFLAGS: 0282   EM: 1   CONTEXT: pv guest
(XEN) rax: 0015   rbx: 81c03e1c   rcx: c0010112
(XEN) rdx: 0001   rsi: 81c03e1c   rdi: c0010112
(XEN) rbp: 81c03df8   rsp: 81c03da0   r8:  81c03e28
(XEN) r9:  81c03e2c   r10:    r11: 
(XEN) r12: 81d25a60   r13: 0400   r14: 
(XEN) r15:    cr0: 80050033   cr4: 000406f0
(XEN) cr3: 75c0b000   cr2: 
(XEN) ds:    es:    fs:    gs:    ss: e02b   cs: e033
(XEN) Guest stack trace from rsp=81c03da0:
(XEN)c0010112   810031f0
(XEN)0001e030 00010082 81c03de0 e02b
(XEN) 000c 81c03e1c 81c03e48
(XEN)8102a7a4 81c03e48 8102aa3b 81c03e48
(XEN)cf1fa5f5e026f464 0100 81c03ef8 0400
(XEN) 81c03e58 81d5d142 81c03ee8
(XEN)81d58b56   81c03e88
(XEN)810f8a39 81c03ee8 81798b13 0010
(XEN)81c03ef8 81c03eb8 cf1fa5f5e026f464 81f1de9c
(XEN)  81df7920 
(XEN) 81c03f28 81d51c74 cf1fa5f5e026f464
(XEN) 81c03f60 81c03f5c 
(XEN) 81c03f38 81d51339 81c03ff8
(XEN)81d548b1  00600f12 00010800
(XEN)03010032 0005  
(XEN)   
(XEN)   
(XEN)   
(XEN)   
(XEN)0f0060c0c748 c305  
(XEN) Domain 0 crashed: rebooting machine in 5 seconds.


gdb output:

(gdb) x/20i 0x810031f0
   0x810031f0 :   rdmsr
   0x810031f2 :   xor%ecx,%ecx
   0x810031f4 :   shl$0x20,%rdx
   0x810031f8 :   mov%eax,%eax
   0x810031fa :   mov%ecx,(%rsi)
   0x810031fc :   mov%rdx,%rbx
   0x810031ff :   or %rax,%rbx
   0x81003202 :   cmp$0x1b,%edi
   0x81003205 :   
jne0x8100323a 
   0x81003207 :   movl   $0x1,-0x18(%rbp)
   0x8100320e :   movl   $0x0,-0x10(%rbp)
   0x81003215 :   lea-0x18(%rbp),%rdi
   0x81003219 :   lea

[Fedora-xen] Running fedora xen on top of KVM?

2015-09-15 Thread Cole Robinson
Anyone know how to get fedora + xen running in a KVM VM? I'd like to be able
to do basic xen/libxl/libvirt testing without needed to reboot a physical 
machine.

Trying with F23 AMD host, F22+xen L1, trying to boot into xen in the L1 VM
just reboots very soon after trying to boot the kernel. Tried disabling all
virtio for L1 VM, disabling virt extensions for the L1 VM, but it didn't seem
to change anything. Unfortunately the messages scroll by so quickly I can't
tell what's happening right before it reboots, and all efforts to convince it
to print more debugging haven't worked.

FWIW this does work with rhel5+xen L1, but that's a world away at this point.

So anyone know if it's even possible? Is there a trick to it? If not,
suggestions on getting more debug output from xen + grub2?

Thanks,
Cole
--
xen mailing list
xen@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/xen

Re: [Fedora-xen] Running fedora xen on top of KVM?

2015-09-15 Thread Konrad Rzeszutek Wilk
On Tue, Sep 15, 2015 at 03:19:25PM -0500, Major Hayden wrote:
> On 09/15/2015 03:03 PM, Cole Robinson wrote:
> > Anyone know how to get fedora + xen running in a KVM VM? I'd like to be able
> > to do basic xen/libxl/libvirt testing without needed to reboot a physical 
> > machine.
> > 
> > Trying with F23 AMD host, F22+xen L1, trying to boot into xen in the L1 VM
> > just reboots very soon after trying to boot the kernel. Tried disabling all
> > virtio for L1 VM, disabling virt extensions for the L1 VM, but it didn't 
> > seem
> > to change anything. Unfortunately the messages scroll by so quickly I can't
> > tell what's happening right before it reboots, and all efforts to convince 
> > it
> > to print more debugging haven't worked.
> > 
> > FWIW this does work with rhel5+xen L1, but that's a world away at this 
> > point.
> > 
> > So anyone know if it's even possible? Is there a trick to it? If not,
> > suggestions on getting more debug output from xen + grub2?
> 
> I've had a tubload of trouble with Xen 4.5 on Fedora 22.  However, you 
> *should* be able to boot a Xen hypervisor as a KVM guest.  It requires nested 
> virt on the host itself.  I'm not sure if AMD CPUs are capable of doing that, 
> but I've had luck with this on Intel Xeons (Nehalem and later).
> 
> If F22+Xen as a KVM guest isn't working out, you may need to try F21+Xen as a 
> guest and see if that works.
> a

It works great!

> Examples of the trouble I've had with Xen so far:
> 
>   https://bugzilla.redhat.com/show_bug.cgi?id=1219197
> 
> I usually end up following this page to get some serial output:
> 
>   http://wiki.xen.org/wiki/Xen_Serial_Console
> 
> Once you get some serial output and prevent Xen from rapidly power cycling, 
> you should get something moderately useful for troubleshooting on the 
> graphical or serial console.
> 
> The noreboot=true and sync_console options might help you troubleshoot, too:
> 
>   http://xenbits.xen.org/docs/4.2-testing/misc/xen-command-line.html
> 
> --
> Major Hayden
> --
> xen mailing list
> xen@lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/xen
--
xen mailing list
xen@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/xen

Re: [Fedora-xen] Running fedora xen on top of KVM?

2015-09-15 Thread M A Young


On Tue, 15 Sep 2015, Cole Robinson wrote:

> Anyone know how to get fedora + xen running in a KVM VM? I'd like to be able
> to do basic xen/libxl/libvirt testing without needed to reboot a physical 
> machine.
> 
> Trying with F23 AMD host, F22+xen L1, trying to boot into xen in the L1 VM
> just reboots very soon after trying to boot the kernel. Tried disabling all
> virtio for L1 VM, disabling virt extensions for the L1 VM, but it didn't seem
> to change anything. Unfortunately the messages scroll by so quickly I can't
> tell what's happening right before it reboots, and all efforts to convince it
> to print more debugging haven't worked.
> 
> FWIW this does work with rhel5+xen L1, but that's a world away at this point.
> 
> So anyone know if it's even possible? Is there a trick to it? If not,
> suggestions on getting more debug output from xen + grub2?

It works for me after a basic and probably sub-optimal install, as follows

* qemu-kvm -cdrom Fedora-Server-DVD-x86_64-22.iso -m 1024 -hda kvm.img
* do a minimal install
* after reboot dnf install xen xen-hypervisor
* select "Fedora, with Xen hypervisor" in the boot menu

If you need more debugging, boot without xen, and edit the grub.cfg file,
adding console=com1 after xen.gz and replacing rhgb quiet with 
console=hvc0 in the 'Fedora, with Xen hypervisor' section, then boot kvm 
with -serial eg. -serial file:boot.log which should give you xen logging 
after grub has finished.

Michael Young
--
xen mailing list
xen@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/xen