|
|

07-07-2008, 11:51 PM
|
|
|
Add OS variant options to virt-convert
# HG changeset patch
# User john.levon@sun.com
# Date 1215470455 25200
# Node ID 26beabc283b11e40ed01584be33678fd0840fed2
# Parent 9d9b282172f77f9d77035017bb0bc8e219be18ba
Add OS variant options to virt-convert.
And use them to set ACPI, APIC, clock, and USB tablet.
Signed-off-by: John Levon <john.levon@sun.com>
diff --git a/man/en/virt-convert.1 b/man/en/virt-convert.1
--- a/man/en/virt-convert.1
+++ b/man/en/virt-convert.1
@@ -186,6 +186,151 @@ Print debugging information
.IP "-q, --quiet" 4
.IX Item "-q, --quiet"
Avoid verbose output.
+.IP "--os-type=OS_TYPE" 4
+.IX Item "--os-type=OS_TYPE"
+Optimize the guest configuration for a type of operating system. This will
+attempt to pick the most suitable s-1ACPIs0 & s-1APICs0 settings, optimally supported
+mouse drivers and generally accommodate other operating system quirks. The
+valid operating system types are
+.RS 4
+.IP "linux" 4
+.IX Item "linux"
+Linux 2.x series
+.IP "windows" 4
+.IX Item "windows"
+Microsoft Windows 9x or later
+.IP "unix" 4
+.IX Item "unix"
+Traditional s-1UNIXs0 s-1BSDs0 or SysV derivatives
+.IP "other" 4
+.IX Item "other"
+Operating systems not in one of the 3 prior groups
+.RE
+.RS 4
+.RE
+.IP "--os-variant=OS_VARIANT" 4
+.IX Item "--os-variant=OS_VARIANT"
+Further optimize the guest configuration for a specific operating system
+variant. This parameter is optional. The valid variants are
+.RS 4
+.IP "linux" 4
+.IX Item "linux"
+.RS 4
+.PD 0
+.IP "rhel2.1" 4
+.IX Item "rhel2.1"
+.PD
+Red Hat Enterprise Linux 2.1
+.IP "rhel3" 4
+.IX Item "rhel3"
+Red Hat Enterprise Linux 3
+.IP "rhel4" 4
+.IX Item "rhel4"
+Red Hat Enterprise Linux 4
+.IP "rhel5" 4
+.IX Item "rhel5"
+Red Hat Enterprise Linux 5
+.IP "centos5" 4
+.IX Item "centos5"
+Cent s-1OSs0 5
+.IP "fedora5" 4
+.IX Item "fedora5"
+Fedora Core 5
+.IP "fedora6" 4
+.IX Item "fedora6"
+Fedora Core 6
+.IP "fedora7" 4
+.IX Item "fedora7"
+Fedora 7
+.IP "sles10" 4
+.IX Item "sles10"
+Suse Linux Enterprise Server 10.x
+.IP "debianEtch" 4
+.IX Item "debianEtch"
+Debian 4.0 (Etch)
+.IP "debianLenny" 4
+.IX Item "debianLenny"
+Debian Lenny
+.IP "generic26" 4
+.IX Item "generic26"
+Generic Linux 2.6.x kernel
+.IP "generic24" 4
+.IX Item "generic24"
+Generic Linux 2.4.x kernel
+.RE
+.RS 4
+.RE
+.IP "windows" 4
+.IX Item "windows"
+.RS 4
+.PD 0
+.IP "winxp" 4
+.IX Item "winxp"
+.PD
+Microsoft Windows s-1XPs0
+.IP "win2k" 4
+.IX Item "win2k"
+Microsoft Windows 2000
+.IP "win2k3" 4
+.IX Item "win2k3"
+Microsoft Windows 2003
+.IP "vista" 4
+.IX Item "vista"
+Microsoft Windows Vista
+.RE
+.RS 4
+.RE
+.IP "unix" 4
+.IX Item "unix"
+.RS 4
+.PD 0
+.IP "solaris9" 4
+.IX Item "solaris9"
+.PD
+Sun Solaris 9
+.IP "solaris10" 4
+.IX Item "solaris10"
+Sun Solaris 10
+.IP "freebsd6" 4
+.IX Item "freebsd6"
+Free s-1BSDs0 6.x
+.IP "openbsd4" 4
+.IX Item "openbsd4"
+Open s-1BSDs0 4.x
+.RE
+.RS 4
+.RE
+.IP "other" 4
+.IX Item "other"
+.RS 4
+.PD 0
+.IP "msdos" 4
+.IX Item "msdos"
+.PD
+Microsoft s-1DOSs0
+.IP "netware4" 4
+.IX Item "netware4"
+Novell Netware 4
+.IP "netware5" 4
+.IX Item "netware5"
+Novell Netware 5
+.IP "netware6" 4
+.IX Item "netware6"
+Novell Netware 6
+.RE
+.RS 4
+.RE
+.RE
+.RS 4
+.RE
+.IP "--noapic" 4
+.IX Item "--noapic"
+Override the s-1OSs0 type / variant to disables the s-1APICs0 setting for fully
+virtualized guest.
+.IP "--noacpi" 4
+.IX Item "--noacpi"
+Override the s-1OSs0 type / variant to disables the s-1ACPIs0 setting for fully
+virtualized guest.
.SH "EXAMPLES"
.IX Header "EXAMPLES"
Convert a paravirt guest from f(CW*(C`image.vmx*(C'fR:
diff --git a/man/en/virt-convert.pod b/man/en/virt-convert.pod
--- a/man/en/virt-convert.pod
+++ b/man/en/virt-convert.pod
@@ -72,6 +72,176 @@ Print debugging information
Avoid verbose output.
+=item --os-type=OS_TYPE
+
+Optimize the guest configuration for a type of operating system. This will
+attempt to pick the most suitable ACPI & APIC settings, optimally supported
+mouse drivers and generally accommodate other operating system quirks. The
+valid operating system types are
+
+=over 4
+
+=item linux
+
+Linux 2.x series
+
+=item windows
+
+Microsoft Windows 9x or later
+
+=item unix
+
+Traditional UNIX BSD or SysV derivatives
+
+=item other
+
+Operating systems not in one of the 3 prior groups
+
+=back
+
+=item --os-variant=OS_VARIANT
+
+Further optimize the guest configuration for a specific operating system
+variant. This parameter is optional. The valid variants are
+
+=over 4
+
+=item linux
+
+=over 4
+
+=item rhel2.1
+
+Red Hat Enterprise Linux 2.1
+
+=item rhel3
+
+Red Hat Enterprise Linux 3
+
+=item rhel4
+
+Red Hat Enterprise Linux 4
+
+=item rhel5
+
+Red Hat Enterprise Linux 5
+
+=item centos5
+
+Cent OS 5
+
+=item fedora5
+
+Fedora Core 5
+
+=item fedora6
+
+Fedora Core 6
+
+=item fedora7
+
+Fedora 7
+
+=item sles10
+
+Suse Linux Enterprise Server 10.x
+
+=item debianEtch
+
+Debian 4.0 (Etch)
+
+=item debianLenny
+
+Debian Lenny
+
+=item generic26
+
+Generic Linux 2.6.x kernel
+
+=item generic24
+
+Generic Linux 2.4.x kernel
+
+=back
+
+=item windows
+
+=over 4
+
+=item winxp
+
+Microsoft Windows XP
+
+=item win2k
+
+Microsoft Windows 2000
+
+=item win2k3
+
+Microsoft Windows 2003
+
+=item vista
+
+Microsoft Windows Vista
+
+=back
+
+=item unix
+
+=over 4
+
+=item solaris9
+
+Sun Solaris 9
+
+=item solaris10
+
+Sun Solaris 10
+
+=item freebsd6
+
+Free BSD 6.x
+
+=item openbsd4
+
+Open BSD 4.x
+
+=back
+
+=item other
+
+=over 4
+
+=item msdos
+
+Microsoft DOS
+
+=item netware4
+
+Novell Netware 4
+
+=item netware5
+
+Novell Netware 5
+
+=item netware6
+
+Novell Netware 6
+
+=back
+
+=back
+
+=item --noapic
+
+Override the OS type / variant to disables the APIC setting for fully
+virtualized guest.
+
+=item --noacpi
+
+Override the OS type / variant to disables the ACPI setting for fully
+virtualized guest.
+
=back
=head1 EXAMPLES
diff --git a/virt-convert b/virt-convert
--- a/virt-convert
+++ b/virt-convert
@@ -73,6 +73,16 @@ def parse_args():
help=("This guest should be a fully virtualized guest"))
opts.add_option("-p", "--paravirt", action="store_true", dest="paravirt",
help=("This guest should be a paravirtualized guest"))
+ opts.add_option("", "--os-type", type="string", dest="os_type",
+ action="callback", callback=cli.check_before_store,
+ help=("The OS type for fully virtualized guests, e.g. 'linux', 'unix', 'windows'"))
+ opts.add_option("", "--os-variant", type="string", dest="os_variant",
+ action="callback", callback=cli.check_before_store,
+ help=("The OS variant for fully virtualized guests, e.g. 'fedora6', 'rhel5', 'solaris10', 'win2k', 'vista'"))
+ opts.add_option("", "--noapic", action="store_true", dest="noapic",
+ help=("Disables APIC for fully virtualized guest (overrides value in os-type/os-variant db)"), default=False)
+ opts.add_option("", "--noacpi", action="store_true", dest="noacpi",
+ help=("Disables ACPI for fully virtualized guest (overrides value in os-type/os-variant db)"), default=False)
(options, args) = opts.parse_args()
if len(args) < 1:
@@ -187,6 +197,10 @@ def main():
vmdef.type = vmconfig.VM_TYPE_HVM
vmdef.arch = options.arch
+ vmdef.os_type = options.os_type
+ vmdef.os_variant = options.os_variant
+ vmdef.noapic = options.noapic
+ vmdef.noacpi = options.noacpi
created_dir = False
unixname = vmdef.name.replace(" ", "-")
diff --git a/virtconv/parsers/virtimage.py b/virtconv/parsers/virtimage.py
--- a/virtconv/parsers/virtimage.py
+++ b/virtconv/parsers/virtimage.py
@@ -20,12 +20,15 @@
from string import ascii_letters
import virtconv.vmconfig as vmconfig
+import virtinst.FullVirtGuest as fv
pv_boot_template = """
<boot type="xen">
<guest>
<arch>%(arch)s</arch>
<features>
+ $(acpi)s
+ $(apic)s
<pae />
</features>
</guest>
@@ -70,6 +73,37 @@ image_template = """
</image>
"""
+def export_os_params(vm):
+ """
+ Export OS-specific parameters.
+ """
+ ostype = None
+ osvariant = None
+
+ ostype = fv.OS_TYPES.get(vm.os_type)
+ if ostype:
+ osvariant = ostype.variants.get(vm.os_variant)
+
+ def get_os_val(key, default):
+ val = None
+ if osvariant:
+ val = osvariant.get(key)
+ if not val and ostype:
+ val = ostype.get(key)
+ if not val:
+ val = default
+ return val
+
+ acpi = ""
+ if vm.noacpi is False and get_os_val("acpi", True):
+ acpi = "<acpi />"
+
+ apic = ""
+ if vm.noapic is False and get_os_val("apic", False):
+ apic = "<apic />"
+
+ return acpi, apic
+
class virtimage_parser(vmconfig.parser):
"""
Support for virt-install's image format (see virt-image man page).
@@ -135,6 +169,8 @@ class virtimage_parser(vmconfig.parser):
if len(vm.netdevs):
interface = "<interface />"
+ acpi, apic = export_os_params(vm)
+
if vm.type == vmconfig.VM_TYPE_PV:
boot_template = pv_boot_template
else:
@@ -144,6 +180,8 @@ class virtimage_parser(vmconfig.parser):
"pv_disks" : "".join(pv_disks),
"hvm_disks" : "".join(hvm_disks),
"arch" : vm.arch,
+ "acpi" : acpi,
+ "apic" : apic,
}
out = image_template % {
diff --git a/virtconv/parsers/virtinstance.py b/virtconv/parsers/virtinstance.py
--- a/virtconv/parsers/virtinstance.py
+++ b/virtconv/parsers/virtinstance.py
@@ -20,6 +20,7 @@
from string import ascii_letters
import virtconv.vmconfig as vmconfig
+import virtinst.FullVirtGuest as fv
import re
@@ -78,21 +79,131 @@ instance_template = """
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
+ <clock offset='%(clock)s'/>
<features>
- <acpi />
+ %(acpi)s
+ %(apic)s
<pae />
</features>
<devices>
%(emulator)s
%(disks)s
%(netdevs)s
+ <graphics type='vnc' port='-1' />
<input type='mouse' bus='ps2' />
- <input type='tablet' bus='usb' />
- <graphics type='vnc' port='-1' />
+ %(usbtablet)s
%(console)s
</devices>
</domain>
"""
+
+def export_netdevs(vm):
+ """
+ Export code for the network devices.
+ """
+
+ netdevs = []
+
+ for number, netdev in sorted(vm.netdevs.iteritems()):
+ mac = ""
+ if netdev.mac != "auto":
+ mac = "<mac address='%s' />" % netdev.mac
+
+ nettype = {
+ vmconfig.NETDEV_TYPE_DEV : "ethernet",
+ vmconfig.NETDEV_TYPE_BRIDGE : "bridge",
+ vmconfig.NETDEV_TYPE_UNKNOWN : "bridge",
+ vmconfig.NETDEV_TYPE_NETWORK : "network",
+ }.get(netdev.type)
+
+ source = ""
+ if netdev.source:
+ srcattr = nettype
+ if netdev.type == vmconfig.NETDEV_TYPE_DEV:
+ srcattr = "dev"
+ source = "<source %s='%s' />" % (srcattr, netdev.source)
+
+ # FIXME: should warn here
+ if not nettype:
+ continue
+
+ model = ""
+ if netdev.driver:
+ model = "<model type='%s' />" % netdev.driver
+
+ netdevs.append(netdev_template % {
+ "type" : nettype,
+ "source" : source,
+ "mac" : mac,
+ "model": model,
+ })
+
+ return netdevs
+
+def export_disks(vm):
+ """
+ Export code for the disks.
+ """
+
+ disk_prefix = "xvd"
+ if (vm.type == vmconfig.VM_TYPE_HVM):
+ disk_prefix = "hd"
+
+ disks = []
+
+ for devid, disk in sorted(vm.disks.iteritems()):
+ if disk.type != vmconfig.DISK_TYPE_DISK:
+ continue
+
+ # FIXME: needs updating for later Xen enhancements; need to
+ # implement capabilities checking for max disks etc.
+ drive_nr = ascii_letters[int(devid[1]) % 26]
+
+ disks.append(disk_template % {
+ "path" : disk.path,
+ "prefix" : disk_prefix,
+ "dev" : drive_nr
+ })
+
+ return disks
+
+def export_os_params(vm):
+ """
+ Export OS-specific parameters.
+ """
+ ostype = None
+ osvariant = None
+
+ ostype = fv.OS_TYPES.get(vm.os_type)
+ if ostype:
+ osvariant = ostype.variants.get(vm.os_variant)
+
+ def get_os_val(key, default):
+ val = None
+ if osvariant:
+ val = osvariant.get(key)
+ if not val and ostype:
+ val = ostype.get(key)
+ if not val:
+ val = default
+ return val
+
+ acpi = ""
+ if vm.noacpi is False and get_os_val("acpi", True):
+ acpi = "<acpi />"
+
+ apic = ""
+ if vm.noapic is False and get_os_val("apic", False):
+ apic = "<apic />"
+
+ clock = get_os_val("clock", "utc")
+
+ usbtablet = ""
+ if get_os_val("input", [ "tablet", "usb" ])[0] == "tablet":
+ usbtablet = "<input type='tablet' bus='usb' />"
+
+ return acpi, apic, clock, usbtablet
+
class virtinstance_parser(vmconfig.parser):
"""
@@ -150,61 +261,13 @@ class virtinstance_parser(vmconfig.parse
vmname = re.sub(r'[^A-Za-z0-9_.:/+-]+', '_', vm.name)
vmtype = "xen"
- disk_prefix = "xvd"
if (vm.type == vmconfig.VM_TYPE_HVM):
vmtype = "hvm"
- disk_prefix = "hd"
-
- disks = []
- netdevs = []
-
- for devid, disk in sorted(vm.disks.iteritems()):
- if disk.type != vmconfig.DISK_TYPE_DISK:
- continue
-
- # FIXME: needs updating for later Xen enhancements; need to
- # implement capabilities checking for max disks etc.
- drive_nr = ascii_letters[int(devid[1]) % 26]
-
- disks.append(disk_template % {
- "path" : disk.path,
- "prefix" : disk_prefix,
- "dev" : drive_nr
- })
-
- for number, netdev in sorted(vm.netdevs.iteritems()):
- mac = ""
- if netdev.mac != "auto":
- mac = "<mac address='%s' />" % netdev.mac
-
- nettype = {
- vmconfig.NETDEV_TYPE_DEV : "ethernet",
- vmconfig.NETDEV_TYPE_BRIDGE : "bridge",
- vmconfig.NETDEV_TYPE_UNKNOWN : "bridge",
- vmconfig.NETDEV_TYPE_NETWORK : "network",
- }.get(netdev.type)
-
- source = ""
- if netdev.source:
- srcattr = nettype
- if netdev.type == vmconfig.NETDEV_TYPE_DEV:
- srcattr = "dev"
- source = "<source %s='%s' />" % (srcattr, netdev.source)
-
- # FIXME: should warn here
- if not nettype:
- continue
-
- model = ""
- if netdev.driver:
- model = "<model type='%s' />" % netdev.driver
-
- netdevs.append(netdev_template % {
- "type" : nettype,
- "source" : source,
- "mac" : mac,
- "model": model,
- })
+
+ netdevs = export_netdevs(vm)
+ disks = export_disks(vm)
+
+ acpi, apic, clock, usbtablet = export_os_params(vm)
out = instance_template % {
"name" : vmname.replace(" ", "-"),
@@ -215,9 +278,13 @@ class virtinstance_parser(vmconfig.parse
# Mb to Kb
"memory" : int(vm.memory) * 1024,
"nr_vcpus" : vm.nr_vcpus,
+ "clock" : clock,
+ "acpi" : acpi,
+ "apic" : apic,
"emulator" : emulators[vm.type],
+ "disks" : "".join(disks),
"netdevs" : "".join(netdevs),
- "disks" : "".join(disks),
+ "usbtablet" : usbtablet,
"console" : consoles[vm.type],
}
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
|
|

07-08-2008, 01:30 PM
|
|
|
Add OS variant options to virt-convert
On Mon, Jul 07, 2008 at 03:51:39PM -0700, john.levon@sun.com wrote:
> # HG changeset patch
> # User john.levon@sun.com
> # Date 1215470455 25200
> # Node ID 26beabc283b11e40ed01584be33678fd0840fed2
> # Parent 9d9b282172f77f9d77035017bb0bc8e219be18ba
> Add OS variant options to virt-convert.
>
> And use them to set ACPI, APIC, clock, and USB tablet.
Again, I don't think libvirt domain XML should be handled by this tool
precisely because of the issues you're attempting to address here.
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
|
|

07-08-2008, 01:49 PM
|
|
|
Add OS variant options to virt-convert
On Tue, Jul 08, 2008 at 01:30:42PM +0100, Daniel P. Berrange wrote:
> > Add OS variant options to virt-convert.
> >
> > And use them to set ACPI, APIC, clock, and USB tablet.
>
> Again, I don't think libvirt domain XML should be handled by this tool
> precisely because of the issues you're attempting to address here.
What do you mean "again" ?
libvirt is only part of the problem: it's not the only virt format with
hypervisor specific settings. Even if you were to enforce the use of
virt-image, you've still got the same problems if we ever want true
mobility between other formats.
Even worse, the image XML is very lossy. Whilst I imagine that
virt-image will *typically* be used, enforcing an information-removing
step doesn't make much sense to me.
And finally, there is currently no way to generate image XML from a
domain config (AFAIK). So we want this for libvirt import anyway.
regards
john
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
|
|

07-08-2008, 09:32 PM
|
|
|
Add OS variant options to virt-convert
On Tue, Jul 08, 2008 at 01:49:41PM +0100, John Levon wrote:
> On Tue, Jul 08, 2008 at 01:30:42PM +0100, Daniel P. Berrange wrote:
>
> > > Add OS variant options to virt-convert.
> > >
> > > And use them to set ACPI, APIC, clock, and USB tablet.
> >
> > Again, I don't think libvirt domain XML should be handled by this tool
> > precisely because of the issues you're attempting to address here.
>
> What do you mean "again" ?
>
> libvirt is only part of the problem: it's not the only virt format with
> hypervisor specific settings. Even if you were to enforce the use of
> virt-image, you've still got the same problems if we ever want true
> mobility between other formats.
This isn't really solving the mobility problem though - its exchanging
one problem (a VMWare specific config file) for another equally bad
problem (a 32-bit Xen speciifc libvirt XML config). The virt-image
or OVF formats are the only two I'm aware of that achieve any degree
of mobility because they remove all instance specific metadata and
focus on the core requirements of a VM.
> Even worse, the image XML is very lossy. Whilst I imagine that
> virt-image will *typically* be used, enforcing an information-removing
> step doesn't make much sense to me.
It is delibrately lossy in many areas. It explicitly excludes info that
is fundamentally specific to a particular deployment of a VM. It fills
this info in at time of instantiation based on the capabilities XML
presented by the hypervisor being deployed onto.
If we accept we want to use virt-convert to generate libvirt XML, then
we need to require a hypervisor connection URI for this conversion so
we can fetch the capabilities data and fill in the deployment specific
bits. And the resulting libvirt XML generated will be specific to the
machine it was generated on (or another with equivalent setup).
> And finally, there is currently no way to generate image XML from a
> domain config (AFAIK). So we want this for libvirt import anyway.
Yes, we do need a way to go from libvirt XML to virt-image XML, but this
is a far easier problem because we're not hardcoding hypervisor specific
data, rather we're removing it.
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
|
|

07-08-2008, 09:55 PM
|
|
|
Add OS variant options to virt-convert
On Tue, Jul 08, 2008 at 09:32:49PM +0100, Daniel P. Berrange wrote:
> > > Again, I don't think libvirt domain XML should be handled by this tool
> > > precisely because of the issues you're attempting to address here.
> >
> > What do you mean "again" ?
> >
> > libvirt is only part of the problem: it's not the only virt format with
> > hypervisor specific settings. Even if you were to enforce the use of
> > virt-image, you've still got the same problems if we ever want true
> > mobility between other formats.
>
> This isn't really solving the mobility problem though - its exchanging
> one problem (a VMWare specific config file) for another equally bad
> problem (a 32-bit Xen speciifc libvirt XML config). The virt-image
> or OVF formats are the only two I'm aware of that achieve any degree
> of mobility because they remove all instance specific metadata and
> focus on the core requirements of a VM.
You're perfectly right, but I'm not trying to solve the general mobility
problem, nor is virt-convert. (If it were trying to do that, then there
wouldn't be a .vmx importer in the first place.)
> If we accept we want to use virt-convert to generate libvirt XML, then
> we need to require a hypervisor connection URI for this conversion so
> we can fetch the capabilities data and fill in the deployment specific
> bits. And the resulting libvirt XML generated will be specific to the
> machine it was generated on (or another with equivalent setup).
Why is this an improvement over specifying stuff on the command line
(like --arch) ?
regards
john
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
|
|

07-08-2008, 10:21 PM
|
|
|
Add OS variant options to virt-convert
On Tue, 2008-07-08 at 13:49 +0100, John Levon wrote:
> On Tue, Jul 08, 2008 at 01:30:42PM +0100, Daniel P. Berrange wrote:
>
> > > Add OS variant options to virt-convert.
> > >
> > > And use them to set ACPI, APIC, clock, and USB tablet.
> >
> > Again, I don't think libvirt domain XML should be handled by this tool
> > precisely because of the issues you're attempting to address here.
>
> What do you mean "again" ?
>
> libvirt is only part of the problem: it's not the only virt format with
> hypervisor specific settings. Even if you were to enforce the use of
> virt-image, you've still got the same problems if we ever want true
> mobility between other formats.
>
> Even worse, the image XML is very lossy. Whilst I imagine that
> virt-image will *typically* be used, enforcing an information-removing
> step doesn't make much sense to me.
As far as this patch is concernd, ACPI and APIC can be requested in the
virt-image XML; and clock and USB tablet should probably be added to it.
The clock setting is a little weird, but I can imagine scenarios where
that's not really a deployment specific option (or one that sets a
default that can be overridden)
What other VM attributes do you need to preserve ? Other things like MAC
address fall into the category of 'needed in some cases, but not in
others' IMHO
> And finally, there is currently no way to generate image XML from a
> domain config (AFAIK).
Yes, that's definitely a gap.
> So we want this for libvirt import anyway.
Are you talking about a libvirt -> VMWare etc. conversion or something
else ?
David
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
|
|

07-08-2008, 10:38 PM
|
|
|
Add OS variant options to virt-convert
On Tue, Jul 08, 2008 at 09:21:11PM +0000, David Lutterkort wrote:
> > > > And use them to set ACPI, APIC, clock, and USB tablet.
> > >
> > > Again, I don't think libvirt domain XML should be handled by this tool
> > > precisely because of the issues you're attempting to address here.
> >
> > What do you mean "again" ?
> >
> > libvirt is only part of the problem: it's not the only virt format with
> > hypervisor specific settings. Even if you were to enforce the use of
> > virt-image, you've still got the same problems if we ever want true
> > mobility between other formats.
> >
> > Even worse, the image XML is very lossy. Whilst I imagine that
> > virt-image will *typically* be used, enforcing an information-removing
> > step doesn't make much sense to me.
>
> As far as this patch is concernd, ACPI and APIC can be requested in the
> virt-image XML; and clock and USB tablet should probably be added to it.
> The clock setting is a little weird, but I can imagine scenarios where
> that's not really a deployment specific option (or one that sets a
> default that can be overridden)
It's not just about these particular options, it's a general thing.
Whilst I agree that the virt-image route is the right one for most
cases, and I expect us to use it for most things, it doesn't make sense
for a conversion tool to purposefully throw away useful information.
A concrete example: several hypervisors can make use of qemu char device
specs (putting the serial console on a particular port for telnet, for
example). Without direct output, we'd throw that information out.
Now, there are a lot of use cases where we *don't* care about that
stuff, and that's great: we have virt-image as the default output format
for that.
Furthermore, the more of these things you add, the more you'll find
yourself with non-agnostic XML. Today, for example, the ACPI/APIC
settings are already host-specific (apic=1 kills a UP Solaris domU, but
presumably not on VMWare, maybe not on kvm, etc.).
> > And finally, there is currently no way to generate image XML from a
> > domain config (AFAIK).
> > So we want this for libvirt import anyway.
>
> Are you talking about a libvirt -> VMWare etc. conversion
That, plus building templates based on existing domUs etc. For example,
if I bring a dom0 under the control of oVirt (or whatever), I most
definitely want to dig out virt-image format descriptions of each of the
domUs.
Hope that makes my thinking on this a little clearer.
regards,
john
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
|
|

07-09-2008, 04:28 PM
|
|
|
Add OS variant options to virt-convert
On Tue, Jul 08, 2008 at 09:55:57PM +0100, John Levon wrote:
> > If we accept we want to use virt-convert to generate libvirt XML, then
> > we need to require a hypervisor connection URI for this conversion so
> > we can fetch the capabilities data and fill in the deployment specific
> > bits. And the resulting libvirt XML generated will be specific to the
> > machine it was generated on (or another with equivalent setup).
>
> Why is this an improvement over specifying stuff on the command line
> (like --arch) ?
I take that back, whilst certainly the capabilities stuff is irrelevant
today for Xen (based on what I get back on Solaris, anyway), I can see
that it will matter in the future.
So yes, we need a --connect option. It would typically default to none
except when needed, and then we use the default connection.
regards
john
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
|
|
|
All times are GMT. The time now is 12:16 PM.
VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org
|