Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jan 2019 14:38:05 +0530
From:      Pratyush Yadav <pratiy0100@gmail.com>
To:        Uni Gaia <unigaia@fastmail.jp>
Cc:        FreeBSD-Xen <freebsd-xen@freebsd.org>, freebsd-virtualization@freebsd.org
Subject:   Re: FreeBSD/Xen suspend/resume
Message-ID:  <CA%2BX=3T%2BS9OEgwbW7ubB%2BokFCOVtitVsdbDHwudwwK-mBtwo5XA@mail.gmail.com>
In-Reply-To: <744cbbfe-a87f-1bae-df4c-f604deece104@fastmail.jp>
References:  <8eacf0ad-e8e7-c76e-08b8-3b9a4564a291@fastmail.jp> <7a2cebf8-f29c-ec72-52b9-23bdf7489c58@shrew.net> <CA%2BX=3TJmaSCQ-5LUHEX-1gR63qCSLqQY%2BM91eS45bBbOE7oHEA@mail.gmail.com> <744cbbfe-a87f-1bae-df4c-f604deece104@fastmail.jp>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 21 Jan 2019 at 12:07, Uni Gaia <unigaia@fastmail.jp> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2BX=3T%2BS9OEgwbW7ubB%2BokFCOVtitVsdbDHwudwwK-mBtwo5XA>