91 lines
3.0 KiB
Diff
91 lines
3.0 KiB
Diff
From 56d11ce780d8f3b01a557b12d88058daec95bff7 Mon Sep 17 00:00:00 2001
|
|
Message-Id: <56d11ce780d8f3b01a557b12d88058daec95bff7@dist-git>
|
|
From: Pavel Hrdina <phrdina@redhat.com>
|
|
Date: Tue, 13 Nov 2018 16:18:06 +0100
|
|
Subject: [PATCH] virt-xml: Accept --os-variant option
|
|
|
|
From: Andrea Bolognani <abologna@redhat.com>
|
|
|
|
We're not doing anything with it yet, but having the
|
|
parser accept it means we can write tests and see how
|
|
their output changes once we wire it up in earnest.
|
|
|
|
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
|
(cherry picked from commit ade53764fc4e86db1d37012c3723e92b81c6b4c9)
|
|
|
|
https://bugzilla.redhat.com/show_bug.cgi?id=1649406
|
|
|
|
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
|
---
|
|
man/virt-xml.pod | 30 ++++++++++++++++++++++++++++++
|
|
virt-xml | 5 +++++
|
|
2 files changed, 35 insertions(+)
|
|
|
|
diff --git a/man/virt-xml.pod b/man/virt-xml.pod
|
|
index bae492ac..a24a04fa 100644
|
|
--- a/man/virt-xml.pod
|
|
+++ b/man/virt-xml.pod
|
|
@@ -160,6 +160,30 @@ Before defining or updating the domain, show the generated XML diff and interact
|
|
|
|
|
|
|
|
+=head1 GUEST OS OPTIONS
|
|
+
|
|
+=over 4
|
|
+
|
|
+=item B<--os-variant> OS_VARIANT
|
|
+
|
|
+Optimize the guest configuration for a specific operating system (ex.
|
|
+'fedora29', 'rhel7', 'win10'). While not required, specifying this
|
|
+options is HIGHLY RECOMMENDED, as it can greatly increase performance
|
|
+by specifying virtio among other guest tweaks.
|
|
+
|
|
+If the guest has been installed using virt-manager version 2.0.0 or newer,
|
|
+providing this information should not be necessary, as the OS variant will
|
|
+have been stored in the guest configuration during installation and virt-xml
|
|
+will retrieve it from there automatically.
|
|
+
|
|
+Use the command "osinfo-query os" to get the list of the accepted OS
|
|
+variants.
|
|
+
|
|
+=back
|
|
+
|
|
+
|
|
+
|
|
+
|
|
=head1 XML OPTIONS
|
|
|
|
=over 4
|
|
@@ -331,6 +355,12 @@ Create a 10G qcow2 disk image and attach it to 'fedora18' for the next VM startu
|
|
# virt-xml fedora18 --add-device \
|
|
--disk /var/lib/libvirt/images/newimage.qcow2,format=qcow2,size=10
|
|
|
|
+Same as above, but ensure the disk is attached to the most appropriate bus
|
|
+for the guest OS by providing information about it on the command line:
|
|
+
|
|
+ # virt-xml fedora18 --os-variant fedora18 --add-device \
|
|
+ --disk /var/lib/libvirt/images/newimage.qcow2,format=qcow2,size=10
|
|
+
|
|
Hotunplug the disk vdb from the running domain 'rhel7':
|
|
|
|
# virt-xml rhel7 --update --remove-device --disk target=vdb
|
|
diff --git a/virt-xml b/virt-xml
|
|
index 9bdde95d..65d9b55f 100755
|
|
--- a/virt-xml
|
|
+++ b/virt-xml
|
|
@@ -360,6 +360,11 @@ def parse_args():
|
|
outg.add_argument("--confirm", action="store_true",
|
|
help=_("Require confirmation before saving any results."))
|
|
|
|
+ osg = parser.add_argument_group(_("OS options"))
|
|
+ osg.add_argument("--os-variant", dest="distro_variant",
|
|
+ help=_("The OS variant installed in the guest, "
|
|
+ "e.g. 'fedora29', 'rhel7', 'win10 etc."))
|
|
+
|
|
g = parser.add_argument_group(_("XML options"))
|
|
cli.add_disk_option(g, editexample=True)
|
|
cli.add_net_option(g)
|
|
--
|
|
2.19.2
|
|
|