FYI, virt-install/virt-manager are discussed primarily on
virt-tools-list(a)redhat.com
On 10/01/2010 04:19 PM, Stanley, Jon [Tech] wrote:
So virt-install is a really nice piece of software, but it's a
bit too complicated for our use case :).
We would want some mode of it to simply generate XML and go home :). The use case is
that we have a script which carries out a number of other actions in addition to creating
a guest, and creating a guest and putting an OS on it are two separate steps.
Historically we've resisted adding such an option because most install
scenarios generate more than 1 XML configuration. For example, non-windows
CDROM installs generate 1 configuration for booting from CDROM media, and a
final configuration set to boot from disk. There is also the problem of URL
installs downloading temporary media like kernel/initrd. Basically anything
that has an actual install phase.
Nowadays though we have options like --import and --boot that don't really
install anything, so --xml-only would be more useful. We could also print a
descriptive error if the user tries to use the option with a URL or CDROM install.
Additionally we could add an option for virt-install to install an OS into an
existing VM. So your sequence of events could be
virt-install <typical options> --boot hd --xml-only > foo.xml
<extra pre-install config>
virt-install --reinstall-xml foo.xml --location
http://example.com/distro
It would also be nice to have some command line interface to modify a
guest's boot selection, for example, changing from PXE to local disk. Even nicer
would be a concept of boot order - we have a setup where the first normal boot order is
PXE, and if that fails (which it should a majority of the time) then go to local disk.
Libvirt supports setting a boot order, just specify multiple <boot dev=/>
elements in the desired order. Latest virt-install allows setting this with
the --boot option.
Also, a new tool is forthcoming that will provide the existing virt-install
options (where applicable) for use against an existing domain or XML input. So
to change the boot device of an existing domain to local disk, a possible
invocation might look like
virt-xml --domain $vmname --boot hd
The tool doesn't exist yet, but all the plumbing is their in virtinst for it
to be a pretty straightforward job. Of course, any assistance would be
appreciated :)
- Cole