Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Aug 2014 11:51:16 -0700
From:      Craig Rodrigues <rodrigc@FreeBSD.org>
To:        John Baldwin <jhb@freebsd.org>
Cc:        "freebsd-virtualization@freebsd.org" <freebsd-virtualization@freebsd.org>
Subject:   Re: libvirt and rebooting of a bhyve VM
Message-ID:  <CAG=rPVdesa%2Bd%2BJ%2BffrqRsKwDfY25X9YRQ=kYgg-5CoJvmRe%2BVA@mail.gmail.com>
In-Reply-To: <201408201115.50392.jhb@freebsd.org>
References:  <CAG=rPVcGFSnMcMdrNtWjUtHUc0RLXps-t9WwzokNtyHQwWDfFQ@mail.gmail.com> <201408191332.48730.jhb@freebsd.org> <CAG=rPVfi0fwUyHF_dkzKX9ejo4Na4wLSuufaqBoo0U7p7ypCZA@mail.gmail.com> <201408201115.50392.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--001a11c2696ac78693050114164b
Content-Type: text/plain; charset=ISO-8859-1

On Wed, Aug 20, 2014 at 8:15 AM, John Baldwin <jhb@freebsd.org> wrote:
> It probably would be good to document the return codes in the man page, but
> eventually they will all go away.  The long term plan is to make bhyve operate
> more like other hypervisors in which case a single process invocation will
> mimic a power-on to power-off cycle of a machine and you wouldn't need
> vmrun.sh at all (you would just run bhyve with appropriate args / config
> file).  In that case, the return codes will change since it won't exit for
> reboots anymore.


Hi,

I wasn't aware of the longer term direction of bhyve.  If the return
codes may change
in the future, I don't know if it is a good idea to document them in
the man page.

However, documenting the return codes in comments in the vmrun.sh
script might be OK, since it
is just an example that can be changed easily.

What do you think of these changes to vmrun.sh:

 (1)  Move bhyvectl --destroy outside of the while loop.  It doesn't
need to run if the VM has been reset.
 (2)  Write some comments about return code of bhyve process.


--
Craig

--001a11c2696ac78693050114164b
Content-Type: text/plain; charset=US-ASCII; name="vmrun.sh.diff.txt"
Content-Disposition: attachment; filename="vmrun.sh.diff.txt"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_hz30jy340

LS0tIH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