- 18 2月, 2011 1 次提交
-
-
由 Laine Stump 提交于
When the <driver> element (and its "name" attribute) was added to the domain XML's interface element, a "backend" enum was simply added to the toplevel of the virDomainNetDef struct. Ignoring the naming inconsistency ("name" vs. "backend"), this is fine when there's only a single item contained in the driver element of the XML, but doesn't scale well as we add more attributes that apply to the backend of the virtio-net driver, or add attributes applicable to other drivers. This patch changes virDomainNetDef in two ways: 1) Rename the item in the struct from "backend" to "name", so that it's the same in the XML and in the struct, hopefully avoiding confusion for someone unfamiliar with the function of the attribute. 2) Create a "driver" union within virDomainNetDef, and a "virtio" struct in that struct, which contains the "name" enum value. 3) Move around the virDomainNetParse and virDomainNetFormat functions to allow for simple plugin of new attributes without disturbing existing code. (you'll note that this results in a seemingly redundant if() in the format function, but that will no longer be the case as soon as a 2nd attribute is added). In the future, new attributes for the virtio driver backend can be added to the "virtio" struct, and any other network device backend that needs an attribute will have its own struct added to the "driver" union.
-
- 09 2月, 2011 1 次提交
-
-
由 Gui Jianfeng 提交于
Implement blkio tunable XML configuration and parsing. Reviewed-by: N"Nikunj A. Dadhania" <nikunj@linux.vnet.ibm.com> Signed-off-by: NGui Jianfeng <guijianfeng@cn.fujitsu.com>
-
- 05 2月, 2011 1 次提交
-
-
由 Eric Blake 提交于
Adds <smartcard mode='passthrough' type='spicevmc'/>, which uses the new <channel name='smartcard'/> of <graphics type='spice'>. * docs/schemas/domain.rng: Support new XML. * docs/formatdomain.html.in: Document it. * src/conf/domain_conf.h (virDomainGraphicsSpiceChannelName): New enum value. (virDomainChrSpicevmcName): New enum. (virDomainChrSourceDef): Distinguish spicevmc types. * src/conf/domain_conf.c (virDomainGraphicsSpiceChannelName): Add smartcard. (virDomainSmartcardDefParseXML): Parse it. (virDomainChrDefParseXML, virDomainSmartcardDefParseXML): Set spicevmc name. (virDomainChrSpicevmc): New enum conversion functions. * src/libvirt_private.syms: Export new functions. * src/qemu/qemu_command.c (qemuBuildChrChardevStr): Conditionalize name. * tests/qemuxml2argvtest.c (domain): New test. * tests/qemuxml2argvdata/qemuxml2argv-smartcard-passthrough-spicevmc.args: New file. * tests/qemuxml2argvdata/qemuxml2argv-smartcard-passthrough-spicevmc.xml: Likewise.
-
- 04 2月, 2011 3 次提交
-
-
由 Daniel P. Berrange 提交于
Inspired by https://bugzilla.redhat.com/show_bug.cgi?id=615757 Add a new character device backend for virtio serial channels that activates the QEMU spice agent on the main channel using the vdagent spicevmc connection. The <target> must be type='virtio', and supports an optional name that specifies how the guest will see the channel (for now, name must be com.redhat.spice.0). <channel type='spicevmc'> <target type='virtio'/> <address type='virtio-serial' controller='1' bus='0' port='3'/> </channel> * docs/schemas/domain.rng: Support new XML. * docs/formatdomain.html.in: Document it. * src/conf/domain_conf.h (virDomainChrType): New enum value. * src/conf/domain_conf.c (virDomainChr): Add spicevmc. (virDomainChrDefParseXML, virDomainChrSourceDefParseXML) (virDomainChrDefParseTargetXML): Parse and enforce proper use. (virDomainChrSourceDefFormat, virDomainChrDefFormat): Format. * src/qemu/qemu_command.c (qemuBuildChrChardevStr) (qemuBuildCommandLine): Add qemu support. * tests/qemuxml2argvtest.c (domain): New test. * tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc.xml: New file. * tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc.args: Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
* src/conf/domain_conf.h (virDomainSmartcardType): New enum. (virDomainSmartcardDef, virDomainDeviceCcidAddress): New structs. (virDomainDef): Include smartcards. (virDomainSmartcardDefIterator): New typedef. (virDomainSmartcardDefFree, virDomainSmartcardDefForeach): New prototypes. (virDomainControllerType, virDomainDeviceAddressType): Add ccid enum values. (virDomainDeviceInfo): Add ccid address type. * src/conf/domain_conf.c (virDomainSmartcard): Convert between enum and string. (virDomainSmartcardDefParseXML, virDomainSmartcardDefFormat) (virDomainSmartcardDefFree, virDomainDeviceCcidAddressParseXML) (virDomainDefMaybeAddSmartcardController): New functions. (virDomainDefParseXML): Parse the new XML. (virDomainDefFormat): Convert back to XML. (virDomainDefFree): Clean up. (virDomainDeviceInfoIterate): Iterate over passthrough aliases. (virDomainController, virDomainDeviceAddress) (virDomainDeviceInfoParseXML, virDomainDeviceInfoFormat) (virDomainDefAddImplicitControllers): Support new values. * src/libvirt_private.syms (domain_conf.h): New exports. * cfg.mk (useless_free_options): List new function.
-
由 Jiri Denemark 提交于
-
- 29 1月, 2011 1 次提交
-
-
由 Matthias Dahl 提交于
Allows io={threads|native} as an optional attribute to <driver>. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 25 1月, 2011 1 次提交
-
-
由 Cole Robinson 提交于
In QEMU, the card itself is a PCI device, but it requires a codec (either -device hda-output or -device hda-duplex) to actually output sound. Specifying <sound model='ich6'/> gives us -device intel-hda -device hda-duplex I think it's important that a simple <sound model='ich6'/> sets up a useful codec, to have consistent behavior with all other sound cards. This is basically Dan's proposal of <sound model='ich6'> <codec type='output' slot='0'/> <codec type='duplex' slot='3'/> </sound> without the codec bits implemented. The important thing is to keep a consistent API here, we don't want some <sound> devs require tweaking codecs but not others. Steps I see to accomplishing this: - every <sound> device has a <codec type='default'/> (unless codecs are manually specified) - <codec type='none'/> is required to specify 'no codecs' - new audio settings like mic=on|off could then be exposed in <sound> or <codec> in a consistent manner for all sound models v2: Use model='ich6' v3: Use feature detection, from eblake Set codec id, bus, and cad values v4: intel-hda isn't supported if -device isn't available v5: Comment spelling fixes
-
- 22 1月, 2011 2 次提交
-
-
由 Cole Robinson 提交于
QEMU supports serving VNC over a unix domain socket rather than traditional TCP host/port. This is specified with: <graphics type='vnc' socket='/foo/bar/baz'/> This provides better security access control than VNC listening on 127.0.0.1, but will cause issues with tools that rely on the lax security (virt-manager in fedora runs as regular user by default, and wouldn't be able to access a socket owned by 'qemu' or 'root'). Also not currently supported by any clients, though I have patches for virt-manager, and virt-viewer should be simple to update. v2: schema: Make listen vs. socket a <choice>
-
由 Cole Robinson 提交于
This will allow us to record transient runtime state in vm->def, like default VNC parameters. Accomplish this by adding an extra 'live' parameter to SetDefTransient, with similar semantics to the 'live' flag for AssignDef.
-
- 18 1月, 2011 1 次提交
-
-
由 Jiri Denemark 提交于
Currently, boot order can be specified per device class but there is no way to specify exact disk/NIC device to boot from. This patch adds <boot order='N'/> element which can be used inside <disk/> and <interface/>. This is incompatible with the older os/boot element. Since not all hypervisors support per-device boot specification, new deviceboot flag is included in capabilities XML for hypervisors which understand the new boot element. Presence of the flag allows (but doesn't require) users to use the new style boot order specification.
-
- 15 1月, 2011 4 次提交
-
-
由 Laine Stump 提交于
This is in response to a request in: https://bugzilla.redhat.com/show_bug.cgi?id=665293 In short, under heavy load, it's possible for qemu's networking to lock up due to the tap device's default 1MB sndbuf being inadequate. adding "sndbuf=0" to the qemu commandline -netdevice option will alleviate this problem (sndbuf=0 actually sets it to 0xffffffff). Because we must be able to explicitly specify "0" as a value, the standard practice of "0 means not specified" won't work here. Instead, virDomainNetDef also has a sndbuf_specified, which defaults to 0, but is set to 1 if some value was given. The sndbuf value is put inside a <tune> element of each <interface> in the domain. The intent is that further tunable settings will also be placed inside this element. <interface type='network'> ... <tune> <sndbuf>0</sndbuf> ... </tune> </interface>
-
由 Laine Stump 提交于
This patch is in response to https://bugzilla.redhat.com/show_bug.cgi?id=643050 The existing libvirt support for the vhost-net backend to the virtio network driver happens automatically - if the vhost-net device is available, it is always enabled, otherwise the standard userland virtio backend is used. This patch makes it possible to force whether or not vhost-net is used with a bit of XML. Adding a <driver> element to the interface XML, eg: <interface type="network"> <model type="virtio"/> <driver name="vhost"/> will force use of vhost-net (if it's not available, the domain will fail to start). if driver name="qemu", vhost-net will not be used even if it is available. If there is no <driver name='xxx'/> in the config, libvirt will revert to the pre-existing automatic behavior - use vhost-net if it's available, and userland backend if vhost-net isn't available.
-
由 Eric Blake 提交于
* src/conf/domain_conf.h (virDomainChrDeviceType): Drop monitor. * src/conf/domain_conf.c (virDomainChrDevice) (virDomainChrDefParseTargetXML, virDomainChrDefFormat): Drop monitor support. * src/qemu/qemu_command.h (qemuBuildCommandLine): Alter signature. * src/qemu/qemu_monitor.h (qemuMonitorOpen): Likewise. * src/qemu/qemu_domain.h (_qemuDomainObjPrivate): Change type of monConfig. * src/qemu/qemu_domain.c (qemuDomainObjPrivateFree) (qemuDomainObjPrivateXMLFormat, qemuDomainObjPrivateXMLParse): Adjust to type change. * src/qemu/qemu_command.c (qemuBuildCommandLine): Likewise. * src/qemu/qemu_driver.c (qemuPrepareMonitorChr) (qemudStartVMDaemon, qemuDomainXMLToNative, qemuConnectMonitor) (qemudShutdownVMDaemon): Likewise. * src/qemu/qemu_hotplug.c (qemuDomainAttachNetDevice): Likewise. * src/qemu/qemu_monitor.c (qemuMonitorOpen): Likewise. * tests/qemuxml2argvtest.c (testCompareXMLToArgvFiles): Likewise.
-
由 Eric Blake 提交于
This opens up the possibility of reusing the smaller ChrSourceDef for both qemu monitor and a passthrough smartcard device. * src/conf/domain_conf.h (_virDomainChrDef): Factor host details... (_virDomainChrSourceDef): ...into new struct. (virDomainChrSourceDefFree): New prototype. * src/conf/domain_conf.c (virDomainChrDefFree) (virDomainChrDefParseXML, virDomainChrDefFormat): Split... (virDomainChrSourceDefClear, virDomainChrSourceDefFree) (virDomainChrSourceDefParseXML, virDomainChrSourceDefFormat): ...into new functions. (virDomainChrDefParseTargetXML): Update clients to reflect type split. * src/vmx/vmx.c (virVMXParseSerial, virVMXParseParallel) (virVMXFormatSerial, virVMXFormatParallel): Likewise. * src/xen/xen_driver.c (xenUnifiedDomainOpenConsole): Likewise. * src/xen/xend_internal.c (xenDaemonParseSxprChar) (xenDaemonFormatSxprChr): Likewise. * src/vbox/vbox_tmpl.c (vboxDomainDumpXML, vboxAttachSerial) (vboxAttachParallel): Likewise. * src/security/security_dac.c (virSecurityDACSetChardevLabel) (virSecurityDACSetChardevCallback) (virSecurityDACRestoreChardevLabel) (virSecurityDACRestoreChardevCallback): Likewise. * src/security/security_selinux.c (SELinuxSetSecurityChardevLabel) (SELinuxSetSecurityChardevCallback) (SELinuxRestoreSecurityChardevLabel) (SELinuxSetSecurityChardevCallback): Likewise. * src/security/virt-aa-helper.c (get_files): Likewise. * src/lxc/lxc_driver.c (lxcVmStart, lxcDomainOpenConsole): Likewise. * src/uml/uml_conf.c (umlBuildCommandLineChr): Likewise. * src/uml/uml_driver.c (umlIdentifyOneChrPTY, umlIdentifyChrPTY) (umlDomainOpenConsole): Likewise. * src/qemu/qemu_command.c (qemuBuildChrChardevStr) (qemuBuildChrArgStr, qemuBuildCommandLine) (qemuParseCommandLineChr): Likewise. * src/qemu/qemu_domain.c (qemuDomainObjPrivateXMLFormat) (qemuDomainObjPrivateXMLParse): Likewise. * src/qemu/qemu_cgroup.c (qemuSetupChardevCgroup): Likewise. * src/qemu/qemu_hotplug.c (qemuDomainAttachNetDevice): Likewise. * src/qemu/qemu_driver.c (qemudFindCharDevicePTYsMonitor) (qemudFindCharDevicePTYs, qemuPrepareChardevDevice) (qemuPrepareMonitorChr, qemudShutdownVMDaemon) (qemuDomainOpenConsole): Likewise. * src/qemu/qemu_command.h (qemuBuildChrChardevStr) (qemuBuildChrArgStr): Delete, now that they are static. * src/libvirt_private.syms (domain_conf.h): New exports. * cfg.mk (useless_free_options): Update list. * tests/qemuxml2argvtest.c (testCompareXMLToArgvFiles): Update tests.
-
- 14 1月, 2011 1 次提交
-
-
由 Jim Fehlig 提交于
Extend the virDomainFeature enumeration to include HAP (hardware assisted paging) feature. Hardware features such as Extended Page Table and Nested Page Table augment hypervisor software techniques such as shadow page table. Adding HAP to the virDomainFeature enumeration allows users to select between hardware and software memory management mechanisms for their guests.
-
- 10 12月, 2010 3 次提交
-
-
由 Josh Durgin 提交于
Changes common to all network disks: -Make source name optional in the domain schema, since NBD doesn't use it -Add a hostName type to the domain schema, and use it instead of genericName, which doesn't include . -Don't leak host names or ports -Set the source protocol in qemuParseCommandline Signed-off-by: NJosh Durgin <joshd@hq.newdream.net>
-
由 MORITA Kazutaka 提交于
This patch adds network disk support to libvirt/QEMU. The currently supported protocols are nbd, rbd, and sheepdog. The XML syntax is like this: <disk type="network" device="disk"> <driver name="qemu" type="raw" /> <source protocol='rbd|sheepdog|nbd' name="...some image identifier..."> <host name="mon1.example.org" port="6000"> <host name="mon2.example.org" port="6000"> <host name="mon3.example.org" port="6000"> </source> <target dev="vda" bus="virtio" /> </disk> Signed-off-by: NMORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
-
由 Hu Tao 提交于
`dump' watchdog action lets libvirtd to dump the guest when receives a watchdog event (which probably means a guest crash) Currently only qemu is supported.
-
- 24 11月, 2010 1 次提交
-
-
由 Osier Yang 提交于
introduce new public API "virDomainIsUpdated" * src/conf/domain_conf.h (new member "updated" for "virDomainObj") * src/libvirt_public.syms * include/libvirt/libvirt.h.in
-
- 23 11月, 2010 2 次提交
-
-
由 Cole Robinson 提交于
Do this by adding a helper function to get the persistent domain config. This should be useful for other functions that may eventually want to alter the persistent domain config (attach/detach device). Also make similar changes to the test drivers setvcpus command. A caveat is that the function will return the running config for a transient domain, rather than error. This simplifies callers, as long as they use other methods to ensure the guest is persistent.
-
由 Cole Robinson 提交于
This function sets the running domain definition as transient, by reparsing the persistent config and assigning it to newDef. This ensures that any changes made to the running definition and not the persistent config are discarded when the VM is shutdown.
-
- 09 11月, 2010 5 次提交
-
-
由 Daniel P. Berrange 提交于
This extends the SPICE XML to allow channel security options <graphics type='spice' port='-1' tlsPort='-1' autoport='yes'> <channel name='main' mode='secure'/> <channel name='record' mode='insecure'/> </graphics> Any non-specified channel uses the default, which allows both secure & insecure usage * src/conf/domain_conf.c, src/conf/domain_conf.h, src/libvirt_private.syms: Add XML syntax for specifying per channel security options for spice. * src/qemu/qemu_conf.c: Configure channel security with spice
-
由 Daniel P. Berrange 提交于
This extends the XML syntax for <graphics> to allow a password expiry time to be set eg <graphics type='vnc' port='5900' autoport='yes' keymap='en-us' passwd='12345' passwdValidTo='2010-04-09T15:51:00'/> The timestamp is in UTC. * src/conf/domain_conf.h: Pull passwd out into separate struct virDomainGraphicsAuthDef to allow sharing between VNC & SPICE * src/conf/domain_conf.c: Add parsing/formatting of new passwdValidTo argument * src/opennebula/one_conf.c, src/qemu/qemu_conf.c, src/qemu/qemu_driver.c, src/xen/xend_internal.c, src/xen/xm_internal.c: Update for changed struct containing VNC password
-
由 Daniel P. Berrange 提交于
This adds an element <graphics type='spice' port='5903' tlsPort='5904' autoport='yes' listen='127.0.0.1'/> This is the bare minimum that should be exposed in the guest config for SPICE. Other parameters are better handled as per host level configuration tunables * docs/schemas/domain.rng: Define the SPICE <graphics> schema * src/domain_conf.h, src/domain_conf.c: Add parsing and formatting for SPICE graphics config * src/qemu_conf.c: Complain about unsupported graphics types
-
由 Daniel P. Berrange 提交于
* src/qemu_conf.c: Add dummy entry in enumeration * docs/schemas/domain.rng: Add 'qxl' as a type for the <video> tag * src/domain_conf.c, src/domain_conf.h: Add QXL to video type enumerations
-
由 Matthias Bolte 提交于
Suggested by danpb, as it's not up-to-date anymore and lacks many functions that were added to libvirtd.
-
- 08 11月, 2010 3 次提交
-
-
由 Daniel Veillard 提交于
Move existing routines about virSysinfoDef to an util module, add a new entry point virSysinfoRead() to read the host values with dmidecode * src/conf/domain_conf.c src/conf/domain_conf.h src/util/sysinfo.c src/util/sysinfo.h: move to a new module, add virSysinfoRead() * src/Makefile.am: handle the new module build * src/libvirt_private.syms: new internal symbols * include/libvirt/virterror.h src/util/virterror.c: defined a new error code for that module * po/POTFILES.in: add new file for translations
-
由 Daniel Veillard 提交于
the element has a mode attribute allowing only 3 values: - emulate: use the smbios emulation from the hypervisor - host: try to use the smbios values from the node - sysinfo: grab the values from the <sysinfo> fields * docs/schemas/domain.rng: extend the schemas * src/conf/domain_conf.h: add the flag to the domain config * src/conf/domain_conf.h: parse and serialize the smbios if present
-
由 Daniel Veillard 提交于
* src/conf/domain_conf.h: defines a new internal type added to the domain structure * src/conf/domain_conf.c: parsing and serialization of that new type
-
- 20 10月, 2010 1 次提交
-
-
由 Eric Blake 提交于
Although this patch adds a distinction between maximum vcpus and current vcpus in the XML, the values should be identical for all drivers at this point. Only in subsequent per-driver patches will a distinction be made. In general, virDomainGetInfo should prefer the current vcpus. * src/conf/domain_conf.h (_virDomainDef): Adjust vcpus to unsigned short, to match virDomainGetInfo limit. Add maxvcpus member. * src/conf/domain_conf.c (virDomainDefParseXML) (virDomainDefFormat): parse and print out vcpu details. * src/xen/xend_internal.c (xenDaemonParseSxpr) (xenDaemonFormatSxpr): Manage both vcpu numbers, and require them to be equal for now. * src/xen/xm_internal.c (xenXMDomainConfigParse) (xenXMDomainConfigFormat): Likewise. * src/phyp/phyp_driver.c (phypDomainDumpXML): Likewise. * src/openvz/openvz_conf.c (openvzLoadDomains): Likewise. * src/openvz/openvz_driver.c (openvzDomainDefineXML) (openvzDomainCreateXML, openvzDomainSetVcpusInternal): Likewise. * src/vbox/vbox_tmpl.c (vboxDomainDumpXML, vboxDomainDefineXML): Likewise. * src/xenapi/xenapi_driver.c (xenapiDomainDumpXML): Likewise. * src/xenapi/xenapi_utils.c (createVMRecordFromXml): Likewise. * src/esx/esx_vmx.c (esxVMX_ParseConfig, esxVMX_FormatConfig): Likewise. * src/qemu/qemu_conf.c (qemuBuildSmpArgStr) (qemuParseCommandLineSmp, qemuParseCommandLine): Likewise. * src/qemu/qemu_driver.c (qemudDomainHotplugVcpus): Likewise. * src/opennebula/one_conf.c (xmlOneTemplate): Likewise.
-
- 14 10月, 2010 1 次提交
-
-
由 Harsh Prateek Bora 提交于
This introduces new attribute to filesystem element to support customizable access mode for mount type. Valid accessmode are: passthrough, mapped and squash. Usage: <filesystem type='mount' accessmode='passthrough'> <source dir='/export/to/guest'/> <target dir='mount_tag'/> </filesystem> passthrough is the default model if not specified, that's also the current behaviour.
-
- 13 10月, 2010 1 次提交
-
-
由 Nikunj A. Dadhania 提交于
Adding parsing code for memory tunables in the domain xml file also change the internal define structures used for domain memory informations Adds a new specific test
-
- 02 10月, 2010 1 次提交
-
-
由 Matthias Bolte 提交于
Since version 4.1 ESX(i) can expose virtual serial devices over TCP. Add support in the VMX handling code for this, add test cases to cover it and add links to some documentation. ESX supports two additional protocols: TELNETS and TLS. Add them to the list of serial-over-TCP protocols.
-
- 25 8月, 2010 1 次提交
-
-
由 Soren Hansen 提交于
Other drivers will need this same functionality, so move it to up to conf/domain_conf.c and give it a more general name. Signed-off-by: NSoren Hansen <soren@linux2go.dk>
-
- 21 8月, 2010 1 次提交
-
-
由 Jim Fehlig 提交于
Xen supports on_crash actions coredump-{destroy,restart}. libvirt cannot parse config returned by xend that contains either of these actions xen52 # xm li -l test | grep on_crash (on_crash coredump-restart) xen52 # virsh dumpxml test error: internal error unknown lifecycle type coredump-restart This patch adds a new virDomainLifecycleCrash enum and appends the new options to existing destroy, restart, preserve, and rename-restart options.
-
- 11 8月, 2010 1 次提交
-
-
由 Daniel Veillard 提交于
The balloon device is automatically added to qemu guests if supported, but it may be useful to desactivate it. The simplest to not change the existing behaviour is to allow <memballoon type="none"/> as an extra option to desactivate it (it is automatically added if the memballoon construct is missing for the domain). The following simple patch just adds the extra option and does not change the default behaviour but avoid creating a balloon device if type="none" is used. * docs/schemas/domain.rng: add the extra type attribute value * src/conf/domain_conf.c src/conf/domain_conf.h: add the extra enum value * src/qemu/qemu_conf.c: if enum is NONE, don't activate the device, i.e. don't pass the args to qemu/kvm
-
- 29 7月, 2010 3 次提交
-
-
由 Cole Robinson 提交于
Enable specifying a virtio console device with: <console type='pty'> <target type='virtio'/> </console>
-
由 Cole Robinson 提交于
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: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
targetType only tracks the actual <target> format we are parsing. Currently we only fill abide this value for channel devices. Signed-off-by: NCole Robinson <crobinso@redhat.com>
-