Re: FreeBSD/Xen suspend/resume

2019-01-19 Thread Matthew Grooms

On 1/19/2019 4:59 AM, Uni Gaia wrote:

Does anyone know if suspend/resume works for a FreeBSD/Xen dom0 ? domU?


Hey Uni,

I'm not sure how many folks are subscribed to the xen@ mailing list. You 
may get a better answer here:


FreeBSD dom0 is based on the Xen PVH virtualization mode which has seen 
two major iterations. PVHv1 has been in the tree for some time. I can't 
remember when PVHv2 hit the tree but I'm pretty sure it supplanted v1. 
It might be in 12-RELEASE? Check the release notes. You probably want v2 
as it's more feature complete. The port was done by Roger who, I 
believe, works for Cirtix Research. My point being that the port should 
be of very high quality and he/they probably want to hear if something 
isn't working with PVHv2.If I'm misrepresented anything, hopefully he'll 
chime in here.


Hope this helps,

-Matthew

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


Re: FreeBSD/Xen suspend/resume

2019-01-20 Thread Pratyush Yadav
Hey Uni,

On 1/19/2019 4:59 AM, Uni Gaia wrote:
> Does anyone know if suspend/resume works for a FreeBSD/Xen dom0 ? domU?

I'm guessing by suspend/resume you mean xl save and xl restore. They
work for FreeBSD domU (with Linux dom0), tested on 13-CURRENT r342020.
I have not tested for FreeBSD as dom0 because I do not have it set up.

Hey Matthew
On Sun, 20 Jan 2019 at 04:32, Matthew Grooms  wrote:
>
> On 1/19/2019 4:59 AM, Uni Gaia wrote:
> > Does anyone know if suspend/resume works for a FreeBSD/Xen dom0 ? domU?
>
> Hey Uni,
>
> I'm not sure how many folks are subscribed to the xen@ mailing list. You
> may get a better answer here:
>
> FreeBSD dom0 is based on the Xen PVH virtualization mode which has seen
> two major iterations. PVHv1 has been in the tree for some time. I can't
> remember when PVHv2 hit the tree but I'm pretty sure it supplanted v1.
> It might be in 12-RELEASE?

Roger committed it to CURRENT on July 19 [0], and AFAIK it has made it
into 12-RELEASE.

> Check the release notes. You probably want v2
> as it's more feature complete. The port was done by Roger who, I
> believe, works for Cirtix Research. My point being that the port should
> be of very high quality and he/they probably want to hear if something
> isn't working with PVHv2.If I'm misrepresented anything, hopefully he'll
> chime in here.

I'm guessing you replied to the wrong thread, and you meant to reply
to the ARM/ARM64 thread?

> Hope this helps,
>
> -Matthew
>



[0] https://lists.freebsd.org/pipermail/freebsd-xen/2018-July/003189.html

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


Re: FreeBSD/Xen suspend/resume

2019-01-20 Thread Uni Gaia

On 1/20/19 11:21 AM, Pratyush Yadav wrote:

Hey Uni,

On 1/19/2019 4:59 AM, Uni Gaia wrote:

Does anyone know if suspend/resume works for a FreeBSD/Xen dom0 ? domU?


I'm guessing by suspend/resume you mean xl save and xl restore. They
work for FreeBSD domU (with Linux dom0), tested on 13-CURRENT r342020.
I have not tested for FreeBSD as dom0 because I do not have it set up.


I am sorry, perhaps it wasn't clear enough.

I mean the domU successfully restoring (and obviously, suspending 
properly in the first place) upon a dom0 suspend/resume cycle.


For instance, with QubesOS, which is Linux/Xen based, all virtual 
machines resume working normally after suspending and resuming the machine.


I am considering FreeBSD for a home project, and it requires 
virtualization (jails not enough).


Because it makes no sense to keep the machine on 24/7 in this scenario, 
and because it would be cumbersome to shutdown the machine every night, 
I am looking for the possibility of suspending/resuming.


I know this works with a Linux dom0 and at least Linux domUs.

My preference is FreeBSD dom0 and domUs.

But if FreeBSD dom0 fails to suspend/resume and domUs work, I might 
consider (reluctantly) Linux for the dom0 role.

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


Re: FreeBSD/Xen suspend/resume

2019-01-21 Thread Roger Pau Monné
On Sat, Jan 19, 2019 at 05:00:56PM -0600, Matthew Grooms wrote:
> On 1/19/2019 4:59 AM, Uni Gaia wrote:
> > Does anyone know if suspend/resume works for a FreeBSD/Xen dom0 ? domU?
> 
> Hey Uni,
> 
> I'm not sure how many folks are subscribed to the xen@ mailing list. You may
> get a better answer here:
> 
> FreeBSD dom0 is based on the Xen PVH virtualization mode which has seen two
> major iterations. PVHv1 has been in the tree for some time. I can't remember
> when PVHv2 hit the tree but I'm pretty sure it supplanted v1. It might be in
> 12-RELEASE? Check the release notes. You probably want v2 as it's more
> feature complete. The port was done by Roger who, I believe, works for
> Cirtix Research. My point being that the port should be of very high quality
> and he/they probably want to hear if something isn't working with PVHv2.If
> I'm misrepresented anything, hopefully he'll chime in here.

Thanks for the detailed description! PVHv1 was more similar to classic
PV, while PVHv2 is more similar to HVM.

PVHv1 support has been removed from upstream Xen since 4.10 IIRC, so I
would strongly recommend to use PVHv2. In fact that's the only way to
use the 4.11 Xen packages in the ports tree.

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


Re: FreeBSD/Xen suspend/resume

2019-01-21 Thread Pratyush Yadav
On Mon, 21 Jan 2019 at 12:07, Uni Gaia  wrote:
>
> On 1/20/19 11:21 AM, Pratyush Yadav wrote:
> > Hey Uni,
> >
> > On 1/19/2019 4:59 AM, Uni Gaia wrote:
> >> Does anyone know if suspend/resume works for a FreeBSD/Xen dom0 ? domU?
> >
> > I'm guessing by suspend/resume you mean xl save and xl restore. They
> > work for FreeBSD domU (with Linux dom0), tested on 13-CURRENT r342020.
> > I have not tested for FreeBSD as dom0 because I do not have it set up.
>
> I am sorry, perhaps it wasn't clear enough.
>
> I mean the domU successfully restoring (and obviously, suspending
> properly in the first place) upon a dom0 suspend/resume cycle.
>
> For instance, with QubesOS, which is Linux/Xen based, all virtual
> machines resume working normally after suspending and resuming the machine.
>
> I am considering FreeBSD for a home project, and it requires
> virtualization (jails not enough).
>
> Because it makes no sense to keep the machine on 24/7 in this scenario,
> and because it would be cumbersome to shutdown the machine every night,
> I am looking for the possibility of suspending/resuming.
>
> I know this works with a Linux dom0 and at least Linux domUs.
>
> My preference is FreeBSD dom0 and domUs.
>
> But if FreeBSD dom0 fails to suspend/resume and domUs work, I might
> consider (reluctantly) Linux for the dom0 role.

AFAIK, FreeBSD does not support suspend/resume to disk at all [0], let
alone FreeBSD with Xen (someone correct me if I'm wrong). There is
support for suspending to RAM, but that is shaky from what I can
gather [1].

But you can look into Xen's save and restore features (xl save and xl
restore). They save/restore a domU to/from disk. So if in your setup
you can shut down your dom0, and saving states of domUs is enough, you
can set up a script to save your domUs to a file before shutdown and
get them running back up on boot.

Otherwise, you can look into bhyve, FreeBSD's virtualization solution.
I don't know if bhyve supports suspend and resuming of VMs, but you
can ask the folks at the freebsd-virtualization@ mailing list.



[0] https://wiki.freebsd.org/IdeasPage#Suspend_to_disk
[1] https://wiki.freebsd.org/SuspendResume

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


Re: FreeBSD/Xen suspend/resume

2019-01-21 Thread Matthew Grooms

On 1/21/2019 3:08 AM, Pratyush Yadav wrote:

...
Otherwise, you can look into bhyve, FreeBSD's virtualization solution.
I don't know if bhyve supports suspend and resuming of VMs, but you
can ask the folks at the freebsd-virtualization@ mailing list.


Not at present. But, support for suspend, resume & migration is getting 
closer every day ...


https://github.com/FreeBSD-UPB/freebsd/branches

-Matthew

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