- 14 12月, 2009 5 次提交
-
-
由 Daniel Veillard 提交于
Those were pointed by DanB in his review but not yet fixed * src/qemu/qemu_driver.c: qemudWaitForMonitor() use EnterMonitorWithDriver() and ExitMonitorWithDriver() there * src/qemu/qemu_monitor_text.c: checking fro strdu failure and hash table add error in qemuMonitorTextGetPtyPaths()
-
由 Matthew Booth 提交于
This change makes the QEMU driver get pty paths from the output of the monitor 'info chardev' command. This output is structured, and contains both the name of the device and the path on the same line. This is considerably more reliable than parsing the startup log output, which requires the parsing code to know which order QEMU will print pty information in. Note that we still need to parse the log output as the monitor itself may be on a pty. This should be rare, however, and the new code will replace all pty paths parsed by the log output method once the monitor is available. * src/qemu/qemu_monitor.(c|h) src/qemu_monitor_text.(c|h): Implement qemuMonitorGetPtyPaths(). * src/qemu/qemu_driver.c: Get pty path information using qemuMonitorGetPtyPaths().
-
由 Matthew Booth 提交于
* src/qemu/qemu_driver.c: Parse pty devices for channels
-
由 Matthew Booth 提交于
Change -monitor, -serial and -parallel output to use -chardev if it is available. * src/qemu/qemu_conf.c: Update qemudBuildCommandLine to use -chardev where available. * tests/qemuxml2argvtest.c tests/qemuxml2argvdata/: Add -chardev equivalents for all current serial and parallel tests.
-
由 Ryota Ozaki 提交于
Even if qemudStartVMDaemon suceeds, an error was logged such as 'qemuRemoveCgroup:1778 : internal error Unable to find cgroup for'. This is because qemudStartVMDaemon calls qemuRemoveCgroup to ensure that old cgroup does not remain. This workaround makes sense but leaving an error message may confuse users. * src/qemu/qemu_driver.c: a an option to the function to suppress the error being logged
-
- 11 12月, 2009 3 次提交
-
-
由 Paolo Bonzini 提交于
This adds a new flag, VIR_MIGRATE_PAUSED, that mandates pausing the migrated VM before starting it. * include/libvirt/libvirt.h.in (virDomainMigrateFlags): Add VIR_MIGRATE_PAUSED. * src/qemu/qemu_driver.c (qemudDomainMigrateFinish2): Handle VIR_MIGRATE_PAUSED. * tools/virsh.c (opts_migrate): Add --suspend. (cmdMigrate): Handle it. * tools/virsh.pod (migrate): Document it.
-
由 Paolo Bonzini 提交于
This makes a small change on the failed-migration path. Up to now, all VMs that failed non-live migration after the "stop" command were restarted. This must not be done when the VM was paused in the first place. * src/qemu/qemu_driver.c (qemudDomainMigratePerform): Do not restart a paused VM that fails migration. Set paused state after "stop", reset it after failure.
-
由 Richard Jones 提交于
See also: https://bugzilla.redhat.com/show_bug.cgi?id=545400#c1
-
- 10 12月, 2009 1 次提交
-
-
由 Matthias Bolte 提交于
Replace free(virBufferContentAndReset()) with virBufferFreeAndReset(). Update documentation and replace all remaining calls to free() with calls to VIR_FREE(). Also add missing calls to virBufferFreeAndReset() and virReportOOMError() in OOM error cases.
-
- 09 12月, 2009 2 次提交
-
-
由 Daniel P. Berrange 提交于
The QEMU 0.10.0 release (and possibly other 0.10.x) has a bug where it sometimes/often forgets to display the initial monitor greeting line, soley printing a (qemu). This in turn confuses the text console parsing because it has a '(qemu)' it is not expecting. The confusion results in a negative malloc. Bad things follow. This re-writes the text console handling to be more robust. The key idea is that it should only look for a (qemu), once it has seen the original command echo'd back. This ensures it'll skip the bogus stray (qemu) with broken QEMUs. * src/qemu/qemu_monitor.c: Add some (disabled) debug code * src/qemu/qemu_monitor_text.c: Re-write way command replies are detected
-
由 Daniel P. Berrange 提交于
Since the monitor I/O is processed out of band from the main thread(s) invoking monitor commands, the virDomainObj may be deleted by the I/O thread. The qemuDomainObjBeginJob takes an extra reference to protect against final deletion, but this reference is released by the corresponding EndJob call. THus after the EndJob call it may not be valid to reference the virDomainObj any more. To allow callers to detect this, the EndJob call is changed to return the remaining reference count. * src/conf/domain_conf.c: Make virDomainObjUnref return the remaining reference count * src/qemu/qemu_driver.c: Avoid referencing virDomainObjPtr after qemuDomainObjEndJob if it has been deleted.
-
- 08 12月, 2009 10 次提交
-
-
由 Daniel P. Berrange 提交于
* src/qemu/qemu_monitor_json.c: Hook up reset, shutdown, poweroff and stop events
-
由 Daniel P. Berrange 提交于
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add callbacks for reset, shutdown, poweroff and stop events. Add convenience methods for emiting those events
-
由 Daniel P. Berrange 提交于
With addition of events there will be alot of callbacks. To avoid having to add many APIs to register callbacks, provide them all at once in a big table * src/qemu/qemu_driver.c: Pass in a callback table to QEMU monitor code * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h Replace the EOF and disk secret callbacks with a callback table
-
由 Daniel P. Berrange 提交于
Initial support for the new QEMU monitor protocol using JSON as the data encoding format instead of plain text * po/POTFILES.in: Add src/qemu/qemu_monitor_json.c * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Hack to turn on QMP mode. Replace with a version number check on >= 0.12 later * src/qemu/qemu_monitor.c: Delegate to json monitor if enabled * src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_json.h: Add impl of QMP protocol * src/Makefile.am: Add src/qemu/qemu_monitor_json.{c,h}
-
由 Daniel P. Berrange 提交于
Now that drivers are using a private domain object state blob, the virDomainObjFormat/Parse methods are no longer able to directly serialize all neccessary state to/from XML. It is thus neccessary to introduce a pair of callbacks fo serializing private state. The code for serializing vCPU PIDs and the monitor device config can now move out of domain_conf.c and into the qemu_driver.c where they belong. * src/conf/capabilities.h: Add callbacks for serializing private state to/from XML * src/conf/domain_conf.c, src/conf/domain_conf.h: Remove the monitor, monitor_chr, monitorWatch, nvcpupids and vcpupids fields from virDomainObjPtr. Remove code that serialized those fields * src/libvirt_private.syms: Export virXPathBoolean * src/qemu/qemu_driver.c: Add callbacks for serializing monitor and vcpupid data to/from XML * src/qemu/qemu_monitor.h, src/qemu/qemu_monitor.c: Pass monitor char device config into qemuMonitorOpen directly.
-
由 Daniel P. Berrange 提交于
The code to start CPUs executing has nothing todo with CPU affinity masks, so pull it out of the qemudInitCpuAffinity() method and up into qemudStartVMDaemon() * src/qemu/qemu_driver.c: Pull code to start CPUs executing out of qemudInitCpuAffinity()
-
由 Daniel P. Berrange 提交于
The current QEMU disk media change does not support setting the disk format. The new JSON monitor will support this, so add an extra parameter to pass this info in * src/qemu/qemu_driver.c: Pass in disk format when changing media * src/qemu/qemu_monitor.h, src/qemu/qemu_monitor.c, src/qemu/qemu_monitor_text.c, src/qemu/qemu_monitor_text.h: Add a 'format' arg to qemuMonitorChangeMedia()
-
由 Daniel P. Berrange 提交于
* src/qemu/qemu_monitor_text.c: Add missing underscore in the migrate_cancel monitor command impl
-
由 Daniel P. Berrange 提交于
The qemuMonitorEscape() method, and the VIR_ENUM for migration status will be needed by the JSON monitor too, so move that code into the shared qemu_monitor.c file instead of qemu_monitor_text.c * src/qemu/qemu_monitor.h: Declare qemuMonitorMigrationStatus enum and qemuMonitorEscapeArg and qemuMonitorEscapeShell methods * src/qemu/qemu_monitor.c: Implement qemuMonitorMigrationStatus enum and qemuMonitorEscapeArg and qemuMonitorEscapeShell methods * src/qemu/qemu_monitor_text.c: Remove above methods/enum
-
由 Daniel P. Berrange 提交于
If QEMU shuts down while we're in the middle of processing a monitor command, the monitor will be freed, and upon cleaning up we attempt to do qemuMonitorUnlock(priv->mon) when priv->mon is NULL. To address this we introduce proper reference counting into the qemuMonitorPtr object, and hold an extra reference whenever executing a command. * src/qemu/qemu_driver.c: Hold a reference on the monitor while executing commands, and only NULL-ify the priv->mon field when the last reference is released * src/qemu/qemu_monitor.h, src/qemu/qemu_monitor.c: Add reference counting to handle safe deletion of monitor objects
-
- 04 12月, 2009 1 次提交
-
-
由 Matthias Bolte 提交于
* src/conf/domain_conf.c: don't call virDomainObjUnlock twice * src/qemu/qemu_driver.c: relock driver lock if an error occurs in qemuDomainObjBeginJobWithDriver, enter/exit monitor with driver in qemudDomainSave
-
- 26 11月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
* src/qemu/qemu_driver.c: Free cgroup ACLs
-
- 24 11月, 2009 2 次提交
-
-
由 Daniel P. Berrange 提交于
* src/qemu/qemu_conf.c: Fix default disk type to be 'FILE' again, after previous commit accidentally changed it
-
由 Gerhard Stenzel 提交于
* src/qemu/qemu_driver.c: remove the port filter if the network device is detached via virDomainDetachDevice.
-
- 23 11月, 2009 2 次提交
-
-
由 Daniel P. Berrange 提交于
Introduce a new type="dir" mode for <disks> that allows use of QEMU's virtual FAT block device driver. eg <disk type='dir' device='floppy'> <source dir='/tmp/test'/> <target dev='fda' bus='fdc'/> <readonly/> </disk> gets turned into -drive file=fat:floppy:/tmp/test,if=floppy,index=0 Only read-only disks are supported with virtual FAT mode * src/conf/domain_conf.c, src/conf/domain_conf.h: Add type="dir" * docs/schemas/domain.rng: Document new disk type * src/xen/xend_internal.c, src/xen/xm_internal.c: Raise error for unsupported disk types * tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.args: Fix empty disk file handling * tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fat.args, tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fat.xml, tests/qemuxml2argvdata/qemuxml2argv-floppy-drive-fat.args, tests/qemuxml2argvdata/qemuxml2argv-floppy-drive-fat.xml tests/qemuxml2argvtest.c: Test QEMU vitual FAT driver * src/qemu/qemu_conf.c: Support generating fat:/some/dir type disk args * src/security/security_selinux.c: Temporarily skip labelling of directory based disks
-
由 Daniel P. Berrange 提交于
* src/Makefile.am: Add processinfo.h/processinfo.c * src/util/processinfo.c, src/util/processinfo.h: Module providing APIs for getting/setting process CPU affinity * src/qemu/qemu_driver.c: Switch over to new APIs for schedular affinity * src/libvirt_private.syms: Export virProcessInfoSetAffinity and virProcessInfoGetAffinity to internal drivers
-
- 20 11月, 2009 1 次提交
-
-
由 Steve Yarmie 提交于
Recent qemu releases require command option '-enable-qemu' in order for the kvm functionality be activated. Libvirt needs to pass this flag to qemu when starting a domain. Note that without the option, even if both the kernel and qemu support KVM, KVM will not be activated and VMs will be very slow. * src/qemu/qemu_conf.h src/qemu/qemu_conf.c: parse the extra command line option from help and add it when running kvm * tests/qemuhelptest.c: this modified the flags output for qemu-0.10.5 and qemu-kvm-0.11.0-rc2 regression tests
-
- 19 11月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
The qemudStartVMDaemon() and several functions it calls use the QEMU monitor. The QEMU driver is locked while this function is executing, so it is rquired to release the driver lock and reacquire it either side of issuing a monitor command. It failed todo so, leading to deadlock * qemu/qemu_driver.c: Release driver when in qemudStartVMDaemon and things it calls
-
- 17 11月, 2009 1 次提交
-
-
由 Matthew Booth 提交于
-
- 13 11月, 2009 2 次提交
-
-
由 Daniel P. Berrange 提交于
The QEMU monitor open method would not take a reference on the virDomainObjPtr until it had successfully opened the monitor. The cleanup code upon failure to open though would call qemuMonitorClose() which would in turn decrement the reference count. This caused the virDoaminObjPtr to be mistakenly freed and then the whole driver crashes * src/qemu/qemu_monitor.c: Fix reference counting in qemuMonitorOpen
-
由 Matthew Booth 提交于
* src/qemu/qemu_conf.c: Remove and inline qemudBuildCommandLineChrDevTargetStr
-
- 12 11月, 2009 3 次提交
-
-
由 Cole Robinson 提交于
There is currently no way to determine the libvirt version of a remote libvirtd we are connected to. This is a useful piece of data to enable feature detection.
-
由 pritesh 提交于
* src/conf/domain_conf.h src/conf/domain_conf.c: add the new entry in the enum and lists of virDomainDiskBus * src/qemu/qemu_conf.c: same for virDomainDiskQEMUBus
-
由 Ryota Ozaki 提交于
* src/qemu/qemu_monitor.c: add error check for qemuMonitorOpenXXX returned file descriptor
-
- 11 11月, 2009 5 次提交
-
-
由 Daniel P. Berrange 提交于
When running qemu:///system instance, libvirtd runs as root, but QEMU may optionally be configured to run non-root. When then saving a guest to a state file, the file is initially created as root, and thus QEMU cannot write to it. It is also missing labelling required to allow access via SELinux. * src/qemu/qemu_driver.c: Set ownership on save image before running migrate command in virDomainSave impl. Call out to security driver to set save image labelling * src/security/security_driver.h: Add driver APIs for setting and restoring saved state file labelling * src/security/security_selinux.c: Implement saved state file labelling for SELinux
-
由 Gerhard Stenzel 提交于
* src/qemu/qemu.conf: disables the mac_filter config switch by default to match existing convention, also document the option
-
由 Ryota Ozaki 提交于
* src/qemu/qemu_conf.c: don't initialize ebtables if disabled
-
由 Ryota Ozaki 提交于
* src/qemu/qemu_monitor.c src/qemu/qemu_monitor_text.c: cast size_t to int when passing to '%d'
-
由 Daniel P. Berrange 提交于
This implements the virConnectIsSecure, virConnectIsEncrypted, virDomainIsPersistent, virDomainIsActive, virNetworkIsActive, virNetworkIsPersistent, virStoragePoolIsActive, virStoragePoolIsPersistent, virInterfaceIsActive APIs in (nearly) all drivers. Exceptions are: phyp: missing domainIsActive/Persistent esx: missing domainIsPersistent opennebula: missing domainIsActive/Persistent * src/remote/remote_protocol.x: Define remote wire ABI for newly added APIs. * daemon/remote_dispatch*.h: Re-generated from remote_protocol.x * src/esx/esx_driver.c, src/lxc/lxc_driver.c, src/network/bridge_driver.c, src/opennebula/one_driver.c, src/openvz/openvz_conf.c, src/openvz/openvz_driver.c, src/phyp/phyp_driver.c, src/remote/remote_driver.c, src/storage/storage_driver.c, src/test/test_driver.c, src/uml/uml_driver.c, src/vbox/vbox_tmpl.c, src/xen/xen_driver.c, src/xen/xen_driver.h, src/xen/xen_inotify.c, src/xen/xen_inotify.h: Implement all the new APIs where possible
-