- 24 11月, 2010 2 次提交
-
-
由 Osier Yang 提交于
* src/qemu/qemu_driver.c (add function qemuDomainIsUpdated)
-
由 Osier Yang 提交于
* src/driver.h (new typedef, new callback member for "_virDriver") * src/esx/esx_driver.c * src/lxc/lxc_driver.c * src/opennebula/one_driver.c * src/openvz/openvz_driver.c * src/phyp/phyp_driver.c * src/qemu/qemu_driver.c * src/remote/remote_driver.c * src/test/test_driver.c * src/uml/uml_driver.c * src/vbox/vbox_tmpl.c * src/xen/xen_driver.c * src/xenapi/xenapi_driver.c
-
- 23 11月, 2010 5 次提交
-
-
由 Daniel P. Berrange 提交于
When running non-root, the QEMU log file is usually opened with truncation, since there is no logrotate for non-root usage. This means that when libvirt logs the shutdown timestamp, the log is accidentally truncated * src/qemu/qemu_driver.c: Never truncate log file with shutdown message
-
由 Cole Robinson 提交于
Currently changes to the persistent config aren't flushed to disk, meaning they are lost if the domain is redefined or libvirtd is restarted.
-
由 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 提交于
Doing 'virsh setvcpus $vm --config 10' doesn't check the value against the domains maxvcpus value. A larger value for example will prevent the guest from starting. Also make a similar change to the test driver.
-
由 Cole Robinson 提交于
The current semantics of non-persistent hotplug/update are confusing: the changes will persist as long as the in memory domain definition isn't overwritten. This means hotplug changes stay around until the domain is redefined or libvirtd is restarted. Call virDomainObjSetDefTransient at VM startup, so that we properly discard hotplug changes when the VM is shutdown.
-
- 17 11月, 2010 3 次提交
-
-
由 Eric Blake 提交于
* bootstrap.conf (gnulib_modules): Add configmake. * daemon/Makefile.am (libvirtd_CFLAGS): Drop defines provided by gnulib. * src/Makefile.am (INCLUDES): Likewise. * tests/Makefile.am (INCLUDES): Likewise. * tools/Makefile.am (virsh_CFLAGS): Likewise. * daemon/libvirtd.c (qemudInitPaths, usage, main): Update clients. * src/cpu/cpu_map.c (CPUMAPFILE): Likewise. * src/driver.c (DEFAULT_DRIVER_DIR): Likewise. * src/internal.h (_): Likewise. * src/libvirt.c (virInitialize): Likewise. * src/lxc/lxc_conf.h (LXC_CONFIG_DIR, LXC_STATE_DIR, LXC_LOG_DIR): Likewise. * src/lxc/lxc_conf.c (lxcCapsInit, lxcLoadDriverConfig): Likewise. * src/network/bridge_driver.c (NETWORK_PID_DIR) (NETWORK_STATE_DIR, DNSMASQ_STATE_DIR, networkStartup): Likewise. * src/nwfilter/nwfilter_driver.c (nwfilterDriverStartup): Likewise. * src/qemu/qemu_conf.c (qemudLoadDriverConfig): Likewise. * src/qemu/qemu_driver.c (qemudStartup): Likewise. * src/remote/remote_driver.h (LIBVIRTD_PRIV_UNIX_SOCKET) (LIBVIRTD_PRIV_UNIX_SOCKET_RO, LIBVIRTD_CONFIGURATION_FILE) (LIBVIRT_PKI_DIR): Likewise. * src/secret/secret_driver.c (secretDriverStartup): Likewise. * src/security/security_apparmor.c (VIRT_AA_HELPER): Likewise. * src/security/virt-aa-helper.c (main): Likewise. * src/storage/storage_backend_disk.c (PARTHELPER): Likewise. * src/storage/storage_driver.c (storageDriverStartup): Likewise. * src/uml/uml_driver.c (TEMPDIR, umlStartup): Likewise. * src/util/hooks.c (LIBVIRT_HOOK_DIR): Likewise. * tools/virsh.c (main): Likewise. * docs/hooks.html.in: Likewise.
-
由 Stefan Berger 提交于
Similarly to deprecating close(), I am now deprecating fclose() and introduce VIR_FORCE_FCLOSE() and VIR_FCLOSE(). Also, fdopen() is replaced with VIR_FDOPEN(). Most of the files are opened in read-only mode, so usage of VIR_FORCE_CLOSE() seemed appropriate. Others that are opened in write mode already had the fclose()< 0 check and I converted those to VIR_FCLOSE()< 0. I did not find occurrences of possible double-closed files on the way.
-
由 Osier Yang 提交于
Currently only support domain start and shutdown, for domain start, record timestamp before the qemu command line, and for domain shutdown, just say it's shutting down with timestamp. * src/qemu/qemu_driver.c (qemudStartVMDaemon, qemudShutdownVMDaemon introduced two macros - START_POSTFIX, SHUTDOWN_POSTFIX)
-
- 12 11月, 2010 3 次提交
-
-
由 Daniel P. Berrange 提交于
This provides an implementation of the virDomainOpenConsole API with the QEMU driver. For the streams code, this reuses most of the code previously added for the tunnelled migration streams since it is generic. * src/qemu/qemu_driver.c: Support virDomainOpenConsole
-
由 Daniel P. Berrange 提交于
To avoid the need for duplicating implementations of virStream drivers, provide a generic implementation that can handle any FD based stream. This code is copied from the existing impl in the QEMU driver, with the locking moved into the stream impl, and addition of a read callback The FD stream code will refuse to operate on regular files or block devices, since those can't report EAGAIN properly when they would block on I/O * include/libvirt/virterror.h, include/libvirt/virterror.h: Add VIR_FROM_STREAM error domain * src/qemu/qemu_driver.c: Remove code obsoleted by the new generic streams driver. * src/fdstream.h, src/fdstream.c, src/fdstream.c, src/libvirt_private.syms: Generic reusable FD based streams
-
由 Daniel P. Berrange 提交于
To enable virsh console (or equivalent) to be used remotely it is necessary to provide remote access to the /dev/pts/XXX pseudo-TTY associated with the console/serial/parallel device in the guest. The virStream API provide a bi-directional I/O stream capability that can be used for this purpose. This patch thus introduces a virDomainOpenConsole API that uses the stream APIs. * src/libvirt.c, src/libvirt_public.syms, include/libvirt/libvirt.h.in, src/driver.h: Define the new virDomainOpenConsole API * src/esx/esx_driver.c, src/lxc/lxc_driver.c, src/opennebula/one_driver.c, src/openvz/openvz_driver.c, src/phyp/phyp_driver.c, src/qemu/qemu_driver.c, src/remote/remote_driver.c, src/test/test_driver.c, src/uml/uml_driver.c, src/vbox/vbox_tmpl.c, src/xen/xen_driver.c, src/xenapi/xenapi_driver.c: Stub API entry point
-
- 11 11月, 2010 1 次提交
-
-
由 Cole Robinson 提交于
QEMU allows forcing a CDROM eject even if the guest has locked the device. Expose this via a new UpdateDevice flag, VIR_DOMAIN_DEVICE_MODIFY_FORCE. This has been requested for RHEV: https://bugzilla.redhat.com/show_bug.cgi?id=626305 v2: Change flag name, bool cleanups
-
- 10 11月, 2010 1 次提交
-
-
由 Stefan Berger 提交于
Using automated replacement with sed and editing I have now replaced all occurrences of close() with VIR_(FORCE_)CLOSE() except for one, of course. Some replacements were straight forward, others I needed to pay attention. I hope I payed attention in all the right places... Please have a look. This should have at least solved one more double-close error.
-
- 09 11月, 2010 3 次提交
-
-
由 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 提交于
In common with VNC, the QEMU driver configuration file is used specify the host level TLS certificate location and a default password / listen address * src/qemu/qemu.conf: Add spice_listen, spice_tls, spice_tls_x509_cert_dir & spice_password config params * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Parsing of spice config parameters and updating -spice arg generation to use them * tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-rhel6.args, tests/qemuxml2argvtest.c: Expand test case to cover driver level configuration
-
由 Daniel P. Berrange 提交于
* src/qemu/qemu_driver.c: Allocate the TCP ports for SPICE before starting guest
-
- 08 11月, 2010 1 次提交
-
-
由 Daniel Veillard 提交于
Read and store the data when initializing the driver.
-
- 06 11月, 2010 1 次提交
-
-
由 Matthias Bolte 提交于
-
- 02 11月, 2010 2 次提交
-
-
由 Daniel P. Berrange 提交于
Commit 06f81c63 attempted to make QEMU driver ignore the failure to relabel 'stdin_path' if it was on NFS. The actual result was that it ignores *all* failures to label any aspect of the VM, unless stdin_path is non-NULL and is not on NFS. * src/qemu/qemu_driver.c: Treat all relabel failures as terminal
-
由 Diego Elio Pettenò 提交于
Make sure that the QEmu process within the cgroup can access the device file for the USB device that has to be connected to the virtual domain.
-
- 30 10月, 2010 2 次提交
-
-
由 KAMEZAWA Hiroyuki 提交于
-
由 KAMEZAWA Hiroyuki 提交于
Add dump_image_format[] to qemu.conf and support compressed dump at virsh dump. coredump compression is important for saving disk space in an environment where multiple guests run. In general, "disk space for dump" is specially allocated and will be a dead space in the system. It's used only at emergency. So, it's better to have both of save_image_format and dump_image_format. "save" is done in scheduled manner with enough calculated disk space for it. This code reuses some of save_image_format[] and supports the same format. Changelog: - modified libvirtd_qemu.aug - modified test_libvirtd_qemu.aug - fixed error handling of qemudSaveCompressionTypeFromString()
-
- 29 10月, 2010 1 次提交
-
-
由 Lai Jiangshan 提交于
When we mount any cgroup without "-o devices", we will fail to start vms: error: Failed to start domain vm1 error: Unable to deny all devices for vm1: No such file or directory When we mount any cgroup without "-o cpu", we will fail to get schedinfo: Scheduler : posix error: unable to get cpu shares tunable: No such file or directory We should only use the cgroup controllers which are mounted on host. So I add virCgroupMounted() for qemuCgroupControllerActive() Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
-
- 28 10月, 2010 5 次提交
-
-
由 Eric Blake 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=638285 - when migrating a guest, it was very easy to provoke a race where an application could query block information on a VM that had just been migrated away. Any time qemu code obtains a job lock, it must also check that the VM was not taken down in the time where it was waiting for the lock. * src/qemu/qemu_driver.c (qemudDomainSetMemory) (qemudDomainGetInfo, qemuDomainGetBlockInfo): Check that vm still exists after obtaining job lock, before starting monitor action.
-
由 Daniel P. Berrange 提交于
Add auditing of all initial disk/net assignments to QEMU guests at startup. Add auditing for all hotplug & unplug events and disk media changes. * src/qemu/qemu_driver.c: Add disk/net resource auditing
-
由 Daniel P. Berrange 提交于
Add auditing of the allocated security label in the QEMU driver VM startup code * src/qemu/qemu_driver.c: Audit security label
-
由 Daniel P. Berrange 提交于
Add audit hooks to report all start and stop events on QEMU guest domains. * src/qemu/qemu_driver.c: Audit start/stop events
-
由 Daniel P. Berrange 提交于
Revert most of commit a8b5f9bd. The audit hooks will be re-added directly in the QEMU driver code in a future commit * daemon/remote.c: Remove all audit logging hooks * src/qemu/qemu_driver.c: Remove all audit logging hooks
-
- 21 10月, 2010 2 次提交
-
-
由 Matthias Bolte 提交于
There is no point in trying to fill params beyond the first error, because when qemuDomainGetMemoryParameters returns -1 then the caller cannot detect which values in params are valid.
-
由 Matthias Bolte 提交于
To get them under the common VIR_DOMAIN_MEMORY_* prefix.
-
- 20 10月, 2010 5 次提交
-
-
由 Miloslav Trmač 提交于
Most operations are audited at the libvirtd level; auditing in src/libvirt.c would result in two audit entries per operation (one in the client, one in libvirtd). The only exception is a domain stopping of its own will (e.g. because the user clicks on "shutdown" inside the interface). There can often be no client connected at the time the domain stops, so libvirtd does not have any virConnectPtr object on which to attach an event watch. This patch therefore adds auditing directly inside the qemu driver (other drivers are not supported).
-
由 Eric Blake 提交于
* src/qemu/qemu_driver.c (qemudDomainSetVcpusFlags) (qemudDomainGetVcpusFlags): Support all feasible flag combinations.
-
由 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.
-
由 Eric Blake 提交于
Note - this wrapping is completely mechanical; the old API will function identically, since the new API validates that the exact same flags are provided by the old API. On a per-driver basis, it may make sense to have the old API pass a different set of flags, but that should be done in the per-driver patch that implements the full range of flag support in the new API. * src/esx/esx_driver.c (esxDomainSetVcpus, escDomainGetMaxVpcus): Move guts... (esxDomainSetVcpusFlags, esxDomainGetVcpusFlags): ...to new functions. (esxDriver): Trivially support the new API. * src/openvz/openvz_driver.c (openvzDomainSetVcpus) (openvzDomainSetVcpusFlags, openvzDomainGetMaxVcpus) (openvzDomainGetVcpusFlags, openvzDriver): Likewise. * src/phyp/phyp_driver.c (phypDomainSetCPU) (phypDomainSetVcpusFlags, phypGetLparCPUMAX) (phypDomainGetVcpusFlags, phypDriver): Likewise. * src/qemu/qemu_driver.c (qemudDomainSetVcpus) (qemudDomainSetVcpusFlags, qemudDomainGetMaxVcpus) (qemudDomainGetVcpusFlags, qemuDriver): Likewise. * src/test/test_driver.c (testSetVcpus, testDomainSetVcpusFlags) (testDomainGetMaxVcpus, testDomainGetVcpusFlags, testDriver): Likewise. * src/vbox/vbox_tmpl.c (vboxDomainSetVcpus) (vboxDomainSetVcpusFlags, virDomainGetMaxVcpus) (virDomainGetVcpusFlags, virDriver): Likewise. * src/xen/xen_driver.c (xenUnifiedDomainSetVcpus) (xenUnifiedDomainSetVcpusFlags, xenUnifiedDomainGetMaxVcpus) (xenUnifiedDomainGetVcpusFlags, xenUnifiedDriver): Likewise. * src/xenapi/xenapi_driver.c (xenapiDomainSetVcpus) (xenapiDomainSetVcpusFlags, xenapiDomainGetMaxVcpus) (xenapiDomainGetVcpusFlags, xenapiDriver): Likewise. (xenapiError): New helper macro.
-
由 Eric Blake 提交于
* src/driver.h (virDrvDomainSetVcpusFlags) (virDrvDomainGetVcpusFlags): New typedefs. (_virDriver): New callback members. * src/esx/esx_driver.c (esxDriver): Add stub for driver. * src/lxc/lxc_driver.c (lxcDriver): Likewise. * src/opennebula/one_driver.c (oneDriver): Likewise. * src/openvz/openvz_driver.c (openvzDriver): Likewise. * src/phyp/phyp_driver.c (phypDriver): Likewise. * src/qemu/qemu_driver.c (qemuDriver): Likewise. * src/remote/remote_driver.c (remote_driver): Likewise. * src/test/test_driver.c (testDriver): Likewise. * src/uml/uml_driver.c (umlDriver): Likewise. * src/vbox/vbox_tmpl.c (Driver): Likewise. * src/xen/xen_driver.c (xenUnifiedDriver): Likewise. * src/xenapi/xenapi_driver.c (xenapiDriver): Likewise.
-
- 19 10月, 2010 2 次提交
-
-
由 Dan Kenigsberg 提交于
Over root-squashing nfs, when virFileOperation() is called as uid==0, it may fail with EACCES, but also with EPERM, due to virFileOperationNoFork()'s failed attemp to chown a writable file. qemudDomainSaveFlag() should expect this case, too.
-
由 Dan Kenigsberg 提交于
qemudOpenAsUID is intended to open a file with the credentials of a specified uid. Current implementation fails if the file is accessible to one of uid's groups but not owned by uid. This patch replaces the supplementary group list that the child process inherited from libvirtd with the default group list of uid.
-
- 15 10月, 2010 1 次提交
-
-
由 Laine Stump 提交于
-