[libvirt] [PATCH] docs: bhyve driver documentation improvements

- Document 'domxml-to-native' command - Mention that the nmdm console support needs an appropriate kernel module loaded --- docs/drvbhyve.html.in | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/drvbhyve.html.in b/docs/drvbhyve.html.in index 603be80..ecd7c0c 100644 --- a/docs/drvbhyve.html.in +++ b/docs/drvbhyve.html.in @@ -98,6 +98,9 @@ the following to the domain XML (<span class="since">Since 1.2.4</span>): </devices> ...</pre> + +<p>Make sure to load the <code>nmdm</code> kernel module if you plan to use that.</p> + <p> Then <code>virsh console</code> command can be used to connect to the text console of a guest.</p> @@ -110,6 +113,24 @@ to let a guest boot or start a guest using:</p> <pre>start --console domname</pre> +<h3><a name="xmltonative">Converting from domain XML to Bhyve args</a></h3> + +<p> +The <code>virsh domxml-to-native</code> command allows to preview the actual <code>bhyve</code> commands +that will be executed for a given domain. It outputs two lines, the first line is a <code>bhyveload</code> +command and the second is a <code>bhyve</code> command. +</p> + +<p>Please note that the <code>virsh domxml-to-native</code> doesn't do any real actions but printing the command, +for example, it doesn't try to find a proper TAP interface and create it, like it's done when starting a domain, and +always returns <code>tap0</code> for the network interface. So if you're going to run these commands manually, most likely +you might want to tweak them.</p> + +<pre> +# virsh -c "bhyve:///system" domxml-to-native --format bhyve-argv --xml /path/to/bhyve.xml +/usr/sbin/bhyveload -m 214 -d /home/user/vm1.img vm1 +/usr/sbin/bhyve -c 2 -m 214 -A -I -H -P -s 0:0,hostbridge -s 3:0,virtio-net,tap0,mac=52:54:00:5d:74:e3 -s 2:0,virtio-blk,/home/user/vm1.img -s 1,lpc -l com1,/dev/nmdm0A vm1 +</pre> </body> </html> -- 1.9.0

On 05/11/2014 09:30 AM, Roman Bogorodskiy wrote:
- Document 'domxml-to-native' command - Mention that the nmdm console support needs an appropriate kernel module loaded --- docs/drvbhyve.html.in | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
ACK from a non-native speaker. (and safe for 1.2.5) Jan

Ján Tomko wrote:
On 05/11/2014 09:30 AM, Roman Bogorodskiy wrote:
- Document 'domxml-to-native' command - Mention that the nmdm console support needs an appropriate kernel module loaded --- docs/drvbhyve.html.in | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
ACK from a non-native speaker. (and safe for 1.2.5)
Thanks, pushed with Eric's grammar fixes and line wrapping (except the <pre> section). Roman Bogorodskiy

On 05/11/2014 01:30 AM, Roman Bogorodskiy wrote:
- Document 'domxml-to-native' command - Mention that the nmdm console support needs an appropriate kernel module loaded --- docs/drvbhyve.html.in | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
Long lines; you may want to wrap to fit in 80 columns.
+<p> +The <code>virsh domxml-to-native</code> command allows to preview the actual <code>bhyve</code> commands
s/allows to/can/
+that will be executed for a given domain. It outputs two lines, the first line is a <code>bhyveload</code> +command and the second is a <code>bhyve</code> command. +</p> + +<p>Please note that the <code>virsh domxml-to-native</code> doesn't do any real actions but printing the command,
s/but/other than/
+for example, it doesn't try to find a proper TAP interface and create it, like it's done when starting a domain, and
s/it's/what is/ s/domain,/domain;/
+always returns <code>tap0</code> for the network interface. So if you're going to run these commands manually, most likely +you might want to tweak them.</p> + +<pre> +# virsh -c "bhyve:///system" domxml-to-native --format bhyve-argv --xml /path/to/bhyve.xml +/usr/sbin/bhyveload -m 214 -d /home/user/vm1.img vm1 +/usr/sbin/bhyve -c 2 -m 214 -A -I -H -P -s 0:0,hostbridge -s 3:0,virtio-net,tap0,mac=52:54:00:5d:74:e3 -s 2:0,virtio-blk,/home/user/vm1.img -s 1,lpc -l com1,/dev/nmdm0A vm1 +</pre>
</body> </html>
-- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (3)
-
Eric Blake
-
Ján Tomko
-
Roman Bogorodskiy