summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* numad: Always output 'placement' of <vcpu>Osier Yang2012-05-0851-51/+51
| | | | | | | <vcpu> is not an optional node. The value for its 'placement' actually always defaults to 'static' in the underlying codes. (Even no 'cpuset' and 'placement' is specified, the domain process will be pinned to all the available pCPUs).
* Xen: Fix <clock> handlingPhilipp Hahn2012-04-0251-51/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | XenD-3.1 introduced managed domains. HV-domains have rtc_timeoffset (hgd24f37b31030 from 2007-04-03), which tracks the offset between the hypervisors clock and the domains RTC, and is persisted by XenD. In combination with localtime=1 this had a bug until XenD-3.4 (hg5d701be7c37b from 2009-04-01) (I'm not 100% sure how that bug manifests, but at least for me in TZ=Europe/Berlin I see the previous offset relative to utc being applied to localtime again, which manifests in an extra hour being added) XenD implements the following variants for clock/@offset: - PV domains don't have a RTC → 'localtime' | 'utc' - <3.1: no managed domains → 'localtime' | 'utc' - ≥3.1: the offset is tracked for HV → 'variable' due to the localtime=1 bug → 'localtime' | 'utc' - ≥3.4: the offset is tracked for HV → 'variable' Current libvirtd still thinks XenD only implements <clock offset='utc'/> and <clock offset='localtime'/>, which is wrong, since the semantic of 'utc' and 'localtime' specifies, that the offset will be reset on domain-restart, while with 'variable' the offset is kept. (keeping the offset over "virsh edit" is important, since otherwise the clock might jump, which confuses certain guest OSs) xendConfigVersion was last incremented to 4 by the xen-folks for xen-3.1.0. I know of no way to reliably detect the version of XenD (user space tools), which may be different from the version of the hypervisor (kernel) version! Because of this only the change from 'utc'/'localtime' to 'variable' in XenD-3.1 is handled, not the buggy behaviour of XenD-3.1 until XenD-3.4. For backward compatibility with previous versions of libvirt Xen-HV still accepts 'utc' and 'localtime', but they are returned as 'variable' on the next read-back from Xend to libvirt, since this is what XenD implements: The RTC is NOT reset back to the specified time on next restart, but the previous offset is kept. This behaviour can be turned off by adding the additional attribute adjustment='reset', in which case libvirt will report an error instead of doing the conversion. The attribute can also be used as a shortcut to offset='variable' with basis='...'. With these changes, it is also necessary to adjust the xen tests: "localtime = 0" is always inserted, because otherwise on updates the value is not changed within XenD. adjustment='reset' is inserted for all cases, since they're all < XEND_CONFIG_VERSION_3_1_0, only 3.1 introduced persistent rtc_timeoffset. Some statements change their order because code was moved around. Signed-off-by: Philipp Hahn <hahn@univention.de>
* xml: output memory unit for clarityEric Blake2012-03-0751-102/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make it obvious to 'dumpxml' readers what unit we are using, since our default of KiB for memory (1024) differs from qemu's default of MiB; and differs from our use of bytes for storage. Tests were updated via: $ find tests/*data tests/*out -name '*.xml' | \ xargs sed -i 's/<\(memory\|currentMemory\|hard_limit\|soft_limit\|min_guarantee\|swap_hard_limit\)>/<\1 unit='"'KiB'>/" $ find tests/*data tests/*out -name '*.xml' | \ xargs sed -i 's/<\(capacity\|allocation\|available\)>/<\1 unit='"'bytes'>/" followed by a few fixes for the stragglers. Note that with this patch, the RNG for <memory> still forbids validation of anything except unit='KiB', since the code silently ignores the attribute; a later patch will expand <memory> to allow scaled input in the code and update the RNG to match. * docs/schemas/basictypes.rng (unit): Add 'bytes'. (scaledInteger): New define. * docs/schemas/storagevol.rng (sizing): Use it. * docs/schemas/storagepool.rng (sizing): Likewise. * docs/schemas/domaincommon.rng (memoryKBElement): New define; use for memory elements. * src/conf/storage_conf.c (virStoragePoolDefFormat) (virStorageVolDefFormat): Likewise. * src/conf/domain_conf.h (_virDomainDef): Document unit used internally. * src/conf/storage_conf.h (_virStoragePoolDef, _virStorageVolDef): Likewise. * tests/*data/*.xml: Update all tests. * tests/*out/*.xml: Likewise. * tests/define-dev-segfault: Likewise. * tests/openvzutilstest.c (testReadNetworkConf): Likewise. * tests/qemuargv2xmltest.c (blankProblemElements): Likewise.
* xen_xs: Guard against set but empty kernel argumentGuido Günther2011-10-102-0/+50
| | | | | | | | | | | | | | | On xen 4.1 I observed configurations that look like: (image (hvm (kernel '') (loader '/foo/bar') )) The kernel element is there but unset. This leads to an empty <kernel/> element in the XML and even worse makes us skip the boot order parsing and therefore not emit a <boot device='$dev>'/> element which breaks CD booting.
* conf: add <listen> subelement to domain <graphics> elementLaine Stump2011-07-283-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Once it's plugged in, the <listen> element will be an optional replacement for the "listen" attribute that graphics elements already have. If the <listen> element is type='address', it will have an attribute called 'address' which will contain an IP address or dns name that the guest's display server should listen on. If, however, type='network', the <listen> element should have an attribute called 'network' that will be set to the name of a network configuration to get the IP address from. * docs/schemas/domain.rng: updated to allow the <listen> element * docs/formatdomain.html.in: document the <listen> element and its attributes. * src/conf/domain_conf.[hc]: 1) The domain parser, formatter, and data structure are modified to support 0 or more <listen> subelements to each <graphics> element. The old style "legacy" listen attribute is also still accepted, and will be stored internally just as if it were a separate <listen> element. On output (i.e. format), the address attribute of the first <listen> element of type 'address' will be duplicated in the legacy "listen" attribute of the <graphic> element. 2) The "listenAddr" attribute has been removed from the unions in virDomainGRaphicsDef for graphics types vnc, rdp, and spice. This attribute is now in the <listen> subelement (aka virDomainGraphicsListenDef) 3) Helper functions were written to provide simple access (both Get and Set) to the listen elements and their attributes. * src/libvirt_private.syms: export the listen helper functions * src/qemu/qemu_command.c, src/qemu/qemu_hotplug.c, src/qemu/qemu_migration.c, src/vbox/vbox_tmpl.c, src/vmx/vmx.c, src/xenxs/xen_sxpr.c, src/xenxs/xen_xm.c Modify all these files to use the listen helper functions rather than directly referencing the (now missing) listenAddr attribute. There can be multiple <listen> elements to a single <graphics>, but the drivers all currently only support one, so all replacements of direct access with a helper function indicate index "0". * tests/* - only 3 of these are new files added explicitly to test the new <listen> element. All the others have been modified to reflect the fact that any legacy "listen" attributes passed in to the domain parse will be saved in a <listen> element (i.e. one of the virDomainGraphicsListenDefs), and during the domain format function, both the <listen> element as well as the legacy attributes will be output.
* Do not drop kernel cmdline for xen pv domainsJim Fehlig2011-07-112-0/+32
| | | | | | | | | | | | | Kernel cmdline args can be passed to xen pv domains even when a bootloader is specified. The current config-to-sxpr mapping ignores cmdline when bootloader is present. Since the xend sub-driver is used with many xen toolstack versions, this patch takes conservative approach of adding an else block to existing !def->os.bootloader, and only appends sxpr if def->os.cmdline is non-NULL. V2: Fix existing testcase broken by this patch and add new testcases
* xen: parse and generate hpet item in sxprPaolo Bonzini2011-05-104-0/+106
| | | | | | | | | | | | | | Recent versions of Xen disable the virtual HPET by default. This is usually more precise because tick policies are not implemented for the HPET in Xen. However, there may be several reasons to control the HPET manually: 1) to test the emulation; 2) because distros may provide the knob while leaving the default to "enabled" for compatibility reasons. This patch provides support for the hpet item in both sexpr and xm formats, and translates it to a <timer> element. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* maint: avoid long lines in more testsEric Blake2011-03-0342-42/+369
| | | | | | * tests/xml2sexprdata/*.sexpr: Add backslash-newlines. * tests/sexpr2xmldata/*.sexpr: Likewise. * tests/qemuxml2argvdata/qemuxml2argv-disk-aio.args: Likewise.
* Add support for multiple serial ports into the Xen driverMichal Novotny2011-02-254-0/+104
| | | | | | | | | | | | | | | this is the patch to add support for multiple serial ports to the libvirt Xen driver. It support both old style (serial = "pty") and new style (serial = [ "/dev/ttyS0", "/dev/ttyS1" ]) definition and tests for xml2sexpr, sexpr2xml and xmconfig have been added as well. Written and tested on RHEL-5 Xen dom0 and working as designed but the Xen version have to have patch for RHBZ #614004 but this patch is for upstream version of libvirt. Also, this patch is addressing issue described in RHBZ #670789. Signed-off-by: Michal Novotny <minovotn@redhat.com>
* maint: improve tests distributionEric Blake2010-12-171-2/+0
| | | | | | | | | | | * tests/Makefile.am (EXTRA_DIST): Sort, and add directories. (SUBDIRS): Drop automake recursion into subdirs. * tests/commanddata/Makefile.am: Delete. * tests/confdata/Makefile.am: Likewise. * tests/sexpr2xmldata/Makefile.am: Likewise. * tests/xencapsdata/Makefile.am: Likewise. * tests/xmconfigdata/Makefile.am: Likewise. * tests/xml2sexprdata/Makefile.am: Likewise.
* vcpu: improve vcpu support in xen command lineEric Blake2010-10-192-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | This patch series focuses on xendConfigVersion 2 (xm_internal) and 3 (xend_internal), but leaves out changes for xenapi drivers. See this link for more details about vcpu_avail for xm usage. http://lists.xensource.com/archives/html/xen-devel/2009-11/msg01061.html This relies on the fact that def->maxvcpus can be at most 32 with xen. * src/xen/xend_internal.c (xenDaemonParseSxpr) (sexpr_to_xend_domain_info, xenDaemonFormatSxpr): Use vcpu_avail when current vcpus is less than maximum. * src/xen/xm_internal.c (xenXMDomainConfigParse) (xenXMDomainConfigFormat): Likewise. * tests/xml2sexprdata/xml2sexpr-pv-vcpus.sexpr: New file. * tests/sexpr2xmldata/sexpr2xml-pv-vcpus.sexpr: Likewise. * tests/sexpr2xmldata/sexpr2xml-pv-vcpus.xml: Likewise. * tests/xmconfigdata/test-paravirt-vcpu.cfg: Likewise. * tests/xmconfigdata/test-paravirt-vcpu.xml: Likewise. * tests/xml2sexprtest.c (mymain): New test. * tests/sexpr2xmltest.c (mymain): Likewise. * tests/xmconfigtest.c (mymain): Likewise.
* Fix Xen SEXPR generation to properly quote strings containing ()Daniel P. Berrange2010-10-132-0/+27
| | | | | | | | | | | * src/xen/sexpr.c: Ensure () are escaped in sexpr2string * tests/sexpr2xmldata/sexpr2xml-boot-grub.sexpr, tests/sexpr2xmldata/sexpr2xml-boot-grub.xml, tests/xml2sexprdata/xml2sexpr-boot-grub.sexpr, tests/xml2sexprdata/xml2sexpr-boot-grub.xml: Data files to check escaping * tests/sexpr2xmltest.c, tests/xml2sexprtest.c: Add boot-grub escaping test case
* Add tests for Xen's blktap2 implementationJim Fehlig2010-08-312-0/+28
| | | | xml2sexpr and sexpr2xml tests for blktap2
* domain conf: Track <console> target typeCole Robinson2010-07-2830-30/+30
| | | | | | | | | | | All <console> devices now export a <target> type attribute. QEMU defaults to 'serial', UML defaults to 'uml, xen can be either 'serial' or 'xen' depending on fullvirt. Understandably there is lots of test fallout. This will be used to differentiate between a serial vs. virtio console for QEMU. Signed-off-by: Cole Robinson <crobinso@redhat.com>
* maint: simplify some ignore filesEric Blake2010-06-151-2/+0
| | | | | | | | | | | | | | * .hgignore: Delete, no longer used. * examples/python/.gitignore: Delete, covered globally. * include/.gitignore: Likewise. * python/tests/.gitignore: Likewise. * docs/schemas/.gitignore: Likewise. * tests/xml2sexprdata/.gitignore: Likewise. * tests/sexpr2xmldata/.gitignore: Likewise. * tests/confdata/.gitignore: Likewise. * tests/xencapsdata/.gitignore: Likewise. * tests/xmconfigdata/.gitignore: Likewise. * tests/xml2sexprdata/.gitignore: Likewise.
* xen: Fix chardev listen sexpr formattingCole Robinson2010-05-273-3/+3
| | | | | | | | | | | 'listen' isn't a valid qemu-dm option, as reported a long time ago here: https://bugzilla.redhat.com/show_bug.cgi?id=492958 Matches the near identical logic in qemu_conf.c v2: When parsing sexpr, only match on ",server", rather than full ',server,nowait'.
* build: avoid non-srcdir "make distcheck" failures (srcdir vs wildcard)Jim Meyering2010-02-251-2/+2
| | | | | | | | * tests/xencapsdata/Makefile.am: Use $(wildcard in $(srcdir)-aware manner * tests/xmconfigdata/Makefile.am: Likewise. * tests/xml2sexprdata/Makefile.am: Likewise. * tests/sexpr2xmldata/Makefile.am (EXTRA_DIST): Likewise. * Makefile.am (XML_EXAMPLES): Use $(wildcard in $(srcdir)-aware manner.
* Tests for interface type/model configurationJiri Denemark2009-12-044-0/+86
| | | | add a set of tests for Xen interface type and model configurations
* Don't blindly reorder disk drivesDaniel P. Berrange2009-09-021-1/+1
| | | | | | | | | | | | | | | | | | | Calling qsort() on the disks array causes disk to be unneccessarily re-ordered, potentially breaking the ability to boot if the boot disk gets moved later in the list. The new algorithm will insert a new disk as far to the end of the list as possible, while being ordered correctly wrt other disks on the same bus. * src/domain_conf.c, src/domain_conf.h: Remove disk sorting routines. Add API to insert a disk into existing list at the optimal position, without resorting disks * src/libvirt_private.syms: Export virDomainDiskInsert * src/xend_internal.c, src/xm_internal.c: Remove calls to qsort, use virDomainDiskInsert instead. * src/qemu_driver.c: Remove calls to qsort, use virDoaminDiskInsert instead. Fix reordering bugs when hotunplugging disks and networks. Fix memory leak in disk/net unplug
* Add test for recently fixed crash with latest XenDDaniel P. Berrange2009-08-192-0/+117
| | | | | | | | | | | | | Test case for the fix applied in commit 14435163a086c0bcdff04308077fa46a5fa08bb0 Author: Daniel Veillard <veillard@redhat.com> Date: Fri Jun 26 18:14:16 2009 +0000 * tests/sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.sexpr, tests/sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml: Data files exhibiting the crash * tests/sexpr2xmltest.c: Process new data files
* remove all trailing blank linesJim Meyering2009-07-1614-14/+0
| | | | | | | by running this command: git ls-files -z | xargs -0 perl -pi -0777 -e 's/\n\n+$/\n/' This is in preparation for a more strict make syntax-check rule that will detect trailing blank lines.
* remove all .cvsignore filesJim Meyering2009-07-081-2/+0
|
* Support PCI passthrough for XenDaniel P. Berrange2009-04-032-0/+39
|
* Fix localtime handling for newer XenDDaniel P. Berrange2009-04-012-0/+29
|
* add missing filesJohn Levon2009-01-292-0/+134
|
* parse IP address for bridge interfacesJohn Levon2009-01-232-0/+36
|
* Support script for bridge interface typeJohn Levon2009-01-2222-0/+22
|
* Support ac97 soundcard modelDaniel P. Berrange2009-01-201-1/+0
|
* generate .gitignore files from .cvsignore onesJim Meyering2008-10-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.maint (sync-vcs-ignore-files): New target. Prompted by a patch from James Morris. http://thread.gmane.org/gmane.comp.emulators.libvirt/8619/focus=8773 Add all (now-generated) .gitignore files. * .gitignore: New file. * build-aux/.gitignore: New file. * docs/.gitignore: New file. * docs/devhelp/.gitignore: New file. * docs/examples/.gitignore: New file. * docs/examples/python/.gitignore: New file. * gnulib/lib/.gitignore: New file. * gnulib/lib/arpa/.gitignore: New file. * gnulib/lib/netinet/.gitignore: New file. * gnulib/lib/sys/.gitignore: New file. * gnulib/tests/.gitignore: New file. * include/.gitignore: New file. * include/libvirt/.gitignore: New file. * po/.gitignore: New file. * proxy/.gitignore: New file. * python/.gitignore: New file. * python/tests/.gitignore: New file. * qemud/.gitignore: New file. * src/.gitignore: New file. * tests/.gitignore: New file. * tests/confdata/.gitignore: New file. * tests/sexpr2xmldata/.gitignore: New file. * tests/virshdata/.gitignore: New file. * tests/xencapsdata/.gitignore: New file. * tests/xmconfigdata/.gitignore: New file. * tests/xml2sexprdata/.gitignore: New file.
* Switch domain device objects to array instead of linked listDaniel P. Berrange2008-10-101-5/+5
|
* Fix reading vncdisplay from xend, add several test cases for xen vnc corner caseCole Robinson2008-09-092-0/+31
| | | | s.
* Convert XenD SEXPR->XML convesion to new domain XML APIsDaniel P. Berrange2008-07-2536-287/+314
|
* virDomainBlockPeek callRichard W.M. Jones2008-06-052-10/+10
| | | | | | | | | | | | | | * configure.in: Document AC_SYS_LARGEFILE. * docs/hvsupport.html.in: Document HV support for virDomainBlockPeek. * include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c, src/libvirt_sym.version: Add virDomainBlockPeek infrastructure. * src/qemu_driver.c, src/test.c: Null versions of this call. * src/xen_unified.c, src/xend_internal.c, src/xend_internal.h, src/xm_internal.c, src/xm_internal.h: Xen implementation. * tests/sexpr2xmldata/sexpr2xml-curmem.xml, tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output has been reordered slightly in the Xen driver, but should be functionally the same.
* Added disk target bus type to Xen driverDaniel P. Berrange2008-05-0834-55/+55
|
* More regression tests for sound supportDaniel Veillard2008-05-074-0/+86
| | | | | | | | | | | | | | | * tests/qemuxml2argvdata/qemuxml2argv-sound.args tests/qemuxml2argvdata/qemuxml2argv-sound.xml tests/sexpr2xmldata/sexpr2xml-fv-sound-all.sexpr tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml tests/sexpr2xmldata/sexpr2xml-fv-sound.sexpr tests/sexpr2xmldata/sexpr2xml-fv-sound.xml tests/xmconfigdata/test-fullvirt-sound.cfg tests/xmconfigdata/test-fullvirt-sound.xml tests/xml2sexprdata/xml2sexpr-fv-sound.sexpr tests/xml2sexprdata/xml2sexpr-fv-sound.xml: other regression tests from previous commit Daniel
* Added support for network interface model settingDaniel P. Berrange2008-04-302-0/+34
|
* Added full support for serial and parallel devices to Xen driversDaniel P. Berrange2008-04-2634-0/+535
|
* Added support for booting off kenrel+initrd with HVM guestsDaniel P. Berrange2008-02-054-0/+130
|
* Fix XML generation for Xen USB devicesDaniel P. Berrange2008-01-302-2/+2
|
* * tests/sexpr2xmltest.c tests/xml2sexprtest.c: warn before exitingDaniel Veillard2007-11-202-0/+26
| | | | | | | | | | | if the path environment variable is missing, add the tests for <shareable/> from/to w! ode for disk * tests/sexpr2xmldata/sexpr2xml-disk-block-shareable.sexpr tests/sexpr2xmldata/sexpr2xml-disk-block-shareable.xml tests/xml2sexprdata/xml2sexpr-disk-block-shareable.sexpr tests/xml2sexprdata/xml2sexpr-disk-block-shareable.xml: the new tests data Daniel
* Only use bootloader for paravirt guestsDaniel P. Berrange2007-09-301-1/+0
|
* * include/libvirt/libvirt.h include/libvirt/libvirt.h.inDaniel Veillard2007-09-301-0/+1
| | | | | | | | | | | | | | | | | src/driver.h src/libvirt.c src/openvz_driver.c src/qemu_driver.c src/test.c src/xen_unified.c src/xend_internal.c: add new API virNodeGetFreeMemory(), extends the driver. Lacks remote and QEmu support though. * src/libvirt.c: allows to fix virNodeGetCellsFreeMemory() adding parameter check for startCell. * proxy/libvirt_proxy.c src/xend_internal.[ch] include/libvirt/libvirt.h include/libvirt/libvirt.h.in: applied vncpasswd dump patch from Mark Johnson but with the virDomainXMLFlags extension as suggested by Daniel Berrange this changed a couple of internal APIs too * tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: fix one of the tests affected by bootloader dump change. Daniel
* Tue Aug 21 09:45:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>Richard W.M. Jones2007-08-2110-0/+10
| | | | | | * src/xend_internal.c: Return the interface device name as <target dev='vifX.Y'/> in domain XML. * tests/*: Update XML in regression tests.
* Cleanup UUID apis & constantsDaniel P. Berrange2007-08-0918-18/+18
|
* Added support for input devicesDaniel P. Berrange2007-07-1812-0/+90
|
* Added new <clock/> element in XML for choosing utc/localtimeDaniel P. Berrange2007-07-167-0/+81
|
* * src/xend_internal.c src/xm_internal.c src/xml.c: add supportDaniel Veillard2007-06-072-0/+19
| | | | | | | | | | | for arguments to bootloader, patch from Hugh Brock * tests/sexpr2xmltest.c tests/xml2sexprtest.c tests/sexpr2xmldata/sexpr2xml-pv-bootloader.sexpr tests/sexpr2xmldata/sexpr2xml-pv-bootloader.xml tests/xml2sexprdata/xml2sexpr-pv-bootloader.sexpr tests/xml2sexprdata/xml2sexpr-pv-bootloader.xml: add specific regression tests Daniel
* Fixed up various functions for Xen 3.0.5Daniel P. Berrange2007-04-131-1/+2
|
* * src/xend_internal.c src/xml.c: applied patch from Nobuhiro ItouDaniel Veillard2007-04-112-0/+102
| | | | | | | | | | | to handle CDRom devices with no device name * tests/sexpr2xmltest.c tests/xml2sexprtest.c tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.sexpr tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml tests/xml2sexprdata/xml2sexpr-no-source-cdrom.sexpr tests/xml2sexprdata/xml2sexpr-no-source-cdrom.xml: added regression tests for this case based on Nobuhiro Itou test inputs. Daniel
* Added support for keymap in VNC displayDaniel P. Berrange2007-03-068-8/+8
|