Re: Is it possible to run Xen in a VirtualBox VM?

2018-05-15 Thread Roger Pau Monné
On Tue, May 15, 2018 at 11:37:43AM +0530, Pratyush Yadav wrote:
> On Mon, May 14, 2018 at 11:25 PM, Roger Pau Monné  
> wrote:
> > On Mon, May 14, 2018 at 10:49:43PM +0530, Pratyush Yadav wrote:
> >> I am working on the Xen grant table handlers (for my Google Summer of
> >> Code project [0]) , so do you think I would need to run Xen + FreeBSD
> >> when testing?
> >
> > Yes, I think you will need to be able to run Xen + FreeBSD. You can
> > probably manage to complete the first part using Xen + Linux and
> > running FreeBSD as a guest, but you will need Xen + FreeBSD Dom0 for
> > the second part (adding handlers for mapping operations used by the
> > backend).
> >> Also, how can I fix the error I'm currently getting about Intel
> >> processor not being supported?
> >
> > Which error? Can you please paste the full log?
> >
> > Roger.
> 
> Ah, my bad. I misread your message. I thought you were saying we can
> run Xen + FreeBSD Dom0 but not a FreeBSD DomU.
> 
> Anyway, I can't get the logs because they are not outputting to the
> serial port for some reason. I wrote what I could read from the 5
> seconds I get before the reboot in my first email.

You can set noreboot [0] in xen_cmdline in order to prevent Xen from
rebooting automatically. That should give you more time to read the
error message.

> You answered my
> question, but if you want a look at the error message I could read,
> check my first email. I'll also paste it below [0].
> 
> Thanks for your help.
> 
> -- 
> Regards,
> Pratyush Yadav
> 
> [0]:
> xenoprof: Initialization failed. Intel processor family 6 model 60 is
> not supported.
> Dom0 has maximum 600 PIRQs
> 
> ***
> Panic on cpu 0:
> Error creating domain 0
> ***

This seems to be missing some lines. A panic usually contains a
message with the reason of the panic.

Roger.

[0] http://xenbits.xenproject.org/docs/unstable/misc/xen-command-line.html
___
freebsd-xen@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-xen
To unsubscribe, send any mail to "freebsd-xen-unsubscr...@freebsd.org"


Re: Is it possible to run Xen in a VirtualBox VM?

2018-05-15 Thread Roger Pau Monné
On Tue, May 15, 2018 at 07:06:49AM +, Marcin Cieslak wrote:
> On Tue, 15 May 2018, Pratyush Yadav wrote:
> 
> > On Mon, May 14, 2018 at 11:25 PM, Roger Pau Monné  
> > wrote:
> > > Yes, I think you will need to be able to run Xen + FreeBSD. You can
> > > probably manage to complete the first part using Xen + Linux and
> > > running FreeBSD as a guest, but you will need Xen + FreeBSD Dom0 for
> > > the second part (adding handlers for mapping operations used by the
> > > backend).
> > 
> > One more thing, is there any other VM like VirtualBox that can run Xen
> > + FreeBSD as Dom0, or do I have to run it on a different computer.
> 
> I have solved this problem for me by renting a physical server at the hosting 
> company.
> But serious hacking requires having access to the physical console (most
> hosting providers provide something like that).
> 
> I don't know how others are working on this? Anyone running Xen on their 
> laptop for example?

Xen also supports printing to a USB debug port (EHCI debug port) [0],
but some laptops don't even have the USB debug port accessible, and
then you need a special adapter which is impossible to find nowadays.

So, the easier way to debug is to get a box with SOL or a working
serial DB9 port.

Roger.

[0] https://www.coreboot.org/EHCI_Debug_Port
___
freebsd-xen@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-xen
To unsubscribe, send any mail to "freebsd-xen-unsubscr...@freebsd.org"


Re: Linux domU only works with xen_platform_pci=0 ?

2018-05-15 Thread Roger Pau Monné
On Mon, May 14, 2018 at 08:34:54PM -0600, Nathan Friess wrote:
> On 2018-05-14 07:04 AM, Roger Pau Monné wrote:
> > On Sun, May 13, 2018 at 07:33:03PM +0200, Kai Otto wrote:
> > > On 13/05/18 17:16, Roger Pau Monné wrote:
> > > > On Sun, May 13, 2018 at 03:51:36PM +0200, Kai Otto wrote:
> > > > > Hello,
> > > > > 
> > > > > I'm trying to set up a FreeBSD 11.1 system as Xen virtualization host.
> > > > > Following a combination of handbook [1] and wiki [2], I was able to 
> > > > > get
> > > > > get a FreeBSD dom0 in PVH mode, and FreeBSD domU in HVM mode running,
> > > > > including installation to disk and networking.
> > > > > 
> > > > > It seemed to me as if the switch 'xen_platform_pci' doesn't have an
> > > > > effect on FreeBSD domU's, as I see e.g. a xenpci0 and xbd0 in dmesg no
> > > > > matter if I set it to 1 or 0.
> > > > > 
> > > > > Do I understand it correctly, that this switch makes the difference
> > > > > between HVM and PVHVM mode?
> > > > > According to xl.cfg(5), it 'enables a guest Operating System [...] to
> > > > > make use of paravirtualization features such as disk and network 
> > > > > devices'.
> > > > > 
> > > > > 
> > > > > Afterwards, I tried to create a Linux domU. Both Centos 7 and Alpine
> > > > > Linux only detected the harddisk with xen_platform_pci=0.
> > > > > 
> > > > > For Alpine Linux, with xen_platform_pci=1, I get the following 
> > > > > messages
> > > > > on the console:
> > > > > 
> > > > > vbd vbd-5632: 19 xenbus_dev_probe on device/vbd/5632
> > > > That's ENODEV IIRC, I think there's something wrong with FreeBSD disk
> > > > backend.
> > > > 
> > > > > vbd vbd-5632: failed to write error node for device/vbd/5632 (19
> > > > > xenbus_dev_probe on device/vbd/5632)
> > > > > 
> > > > > After waiting for a couple minutes it boots, but doesn't detect the 
> > > > > disk.
> 
> I had similar issues with Linux domUs being unable to detect their disks
> when FreeBSD 11.1-RELEASE is the backend:
> 
> https://lists.freebsd.org/pipermail/freebsd-xen/2016-December/002924.html
> 
> 
> What seems to be happening is that on my system the frontend and backend may
> go from state InitWait to Initialised in different orders and so either end
> may end up getting stuck waiting for the other side to change state when the
> other side already has done so.
> 
> I have been running with the attached patch since my last message above and
> Linux domUs have been working perfectly since then.  I realize that the call
> to pause() is not the correct solution but it demonstrates that some fine
> tuning of how the states are handled will help.

Can you please give a try to the patch at:

https://lists.freebsd.org/pipermail/freebsd-xen/2018-May/003132.html

I think this is the proper way to solve the issue, and I would like to
commit it ASAP in order to MFC it to stable-11 before 11.2 is
released, but it could benefit from some more testing.

Thanks, Roger.
___
freebsd-xen@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-xen
To unsubscribe, send any mail to "freebsd-xen-unsubscr...@freebsd.org"


Re: Is it possible to run Xen in a VirtualBox VM?

2018-05-15 Thread Pratyush Yadav
On Tue, May 15, 2018 at 12:36 PM, Marcin Cieslak  wrote:
> On Tue, 15 May 2018, Pratyush Yadav wrote:
>
>> On Mon, May 14, 2018 at 11:25 PM, Roger Pau Monné  
>> wrote:
>> > Yes, I think you will need to be able to run Xen + FreeBSD. You can
>> > probably manage to complete the first part using Xen + Linux and
>> > running FreeBSD as a guest, but you will need Xen + FreeBSD Dom0 for
>> > the second part (adding handlers for mapping operations used by the
>> > backend).
>>
>> One more thing, is there any other VM like VirtualBox that can run Xen
>> + FreeBSD as Dom0, or do I have to run it on a different computer.
>
> I have solved this problem for me by renting a physical server at the hosting 
> company.
> But serious hacking requires having access to the physical console (most
> hosting providers provide something like that).
>
> I don't know how others are working on this? Anyone running Xen on their 
> laptop for example?

I'm trying exactly that. I am running a Linux Dom0 with a FreeBSD DomU
on my current laptop. I have an old laptop lying around and I'll try
to run a FreeBSD Dom0 on it.

-- 
Regards,
Pratyush Yadav
___
freebsd-xen@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-xen
To unsubscribe, send any mail to "freebsd-xen-unsubscr...@freebsd.org"


Re: Is it possible to run Xen in a VirtualBox VM?

2018-05-15 Thread Marcin Cieslak
On Tue, 15 May 2018, Pratyush Yadav wrote:

> On Mon, May 14, 2018 at 11:25 PM, Roger Pau Monné  
> wrote:
> > Yes, I think you will need to be able to run Xen + FreeBSD. You can
> > probably manage to complete the first part using Xen + Linux and
> > running FreeBSD as a guest, but you will need Xen + FreeBSD Dom0 for
> > the second part (adding handlers for mapping operations used by the
> > backend).
> 
> One more thing, is there any other VM like VirtualBox that can run Xen
> + FreeBSD as Dom0, or do I have to run it on a different computer.

I have solved this problem for me by renting a physical server at the hosting 
company.
But serious hacking requires having access to the physical console (most
hosting providers provide something like that).

I don't know how others are working on this? Anyone running Xen on their laptop 
for example?

Marcin

smime.p7s
Description: S/MIME Cryptographic Signature


Re: Is it possible to run Xen in a VirtualBox VM?

2018-05-15 Thread Pratyush Yadav
On Mon, May 14, 2018 at 11:25 PM, Roger Pau Monné  wrote:
> Yes, I think you will need to be able to run Xen + FreeBSD. You can
> probably manage to complete the first part using Xen + Linux and
> running FreeBSD as a guest, but you will need Xen + FreeBSD Dom0 for
> the second part (adding handlers for mapping operations used by the
> backend).

One more thing, is there any other VM like VirtualBox that can run Xen
+ FreeBSD as Dom0, or do I have to run it on a different computer.

Thanks,
Pratyush Yadav
___
freebsd-xen@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-xen
To unsubscribe, send any mail to "freebsd-xen-unsubscr...@freebsd.org"


Re: Is it possible to run Xen in a VirtualBox VM?

2018-05-15 Thread Pratyush Yadav
On Mon, May 14, 2018 at 11:25 PM, Roger Pau Monné  wrote:
> On Mon, May 14, 2018 at 10:49:43PM +0530, Pratyush Yadav wrote:
>> I am working on the Xen grant table handlers (for my Google Summer of
>> Code project [0]) , so do you think I would need to run Xen + FreeBSD
>> when testing?
>
> Yes, I think you will need to be able to run Xen + FreeBSD. You can
> probably manage to complete the first part using Xen + Linux and
> running FreeBSD as a guest, but you will need Xen + FreeBSD Dom0 for
> the second part (adding handlers for mapping operations used by the
> backend).
>> Also, how can I fix the error I'm currently getting about Intel
>> processor not being supported?
>
> Which error? Can you please paste the full log?
>
> Roger.

Ah, my bad. I misread your message. I thought you were saying we can
run Xen + FreeBSD Dom0 but not a FreeBSD DomU.

Anyway, I can't get the logs because they are not outputting to the
serial port for some reason. I wrote what I could read from the 5
seconds I get before the reboot in my first email. You answered my
question, but if you want a look at the error message I could read,
check my first email. I'll also paste it below [0].

Thanks for your help.

-- 
Regards,
Pratyush Yadav

[0]:
xenoprof: Initialization failed. Intel processor family 6 model 60 is
not supported.
Dom0 has maximum 600 PIRQs

***
Panic on cpu 0:
Error creating domain 0
***
___
freebsd-xen@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-xen
To unsubscribe, send any mail to "freebsd-xen-unsubscr...@freebsd.org"