- 24 6月, 2014 2 次提交
-
-
由 Nehal J Wani 提交于
Use virNetworkGetDHCPLeases and virNetworkGetDHCPLeasesForMAC in virsh. The new feature supports the follwing methods: 1. Retrieve leases info for a given virtual network 2. Retrieve leases info for given network interface tools/virsh-domain-monitor.c * Introduce new command : net-dhcp-leases Example Usage: net-dhcp-leases <network> [mac] virsh # net-dhcp-leases --network default6 Expiry Time MAC address Protocol IP address Hostname Client ID or DUID ------------------------------------------------------------------------------------------------------------------- 2014-06-16 03:40:14 52:54:00:85:90:e2 ipv4 192.168.150.231/24 fedora20-test 01:52:54:00:85:90:e2 2014-06-16 03:40:17 52:54:00:85:90:e2 ipv6 2001:db8:ca2:2:1::c0/64 fedora20-test 00:04:b1:d8:86:42:e1:6a:aa:cf:d5:86:94:23:6f:94:04:cd 2014-06-16 03:34:42 52:54:00:e8:73:eb ipv4 192.168.150.181/24 ubuntu14-vm - 2014-06-16 03:34:46 52:54:00:e8:73:eb ipv6 2001:db8:ca2:2:1::5b/64 - 00:01:00:01:1b:30:c6:aa:52:54:00:e8:73:eb tools/virsh.pod * Document new command src/internal.h * Introduce new macro: EMPTYSTR
-
由 Michal Privoznik 提交于
In the 404bac14 the @tmp variable was introduced. It's purpose is to avoid typecasting when parsing --pagesize argument. However, if the argument is not presented, tmp may be used uninitialized resulting in bogus virNodeGetFreePages() API call: virsh freepages --cellno 2 error: Failed to open file '/sys/devices/system/node/node2/hugepages/hugepages-4294967295kB/free_hugepages': No such file or directory Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 19 6月, 2014 4 次提交
-
-
由 Eric Blake 提交于
Commit 9e3efe53 broke the build under valgrind or clang, by writing 8 bytes through an allocation of 4 bytes. It also risks multiplication overflow when mallocing (that's a pervasive problem that needs an audit in the rest of the code, but we might as well fix this one while we are here), and had a typo. * tools/virsh-host.c (cmdFreepages): Avoid integer overflow and undefined behavior. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Michal Privoznik 提交于
The new API is exposed under 'freepages' command. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Eric Blake 提交于
Add knobs to virsh to manage a 2-phase active commit of the top layer, similar to knobs already present on blockcopy. While this code will fail until later patches actually implement the new knobs in the qemu driver, doing it now proves that the API is usable and also makes it easier for testing the qemu changes as they are made. * tools/virsh-domain.c (cmdBlockCommit): Add --active, --pivot, and --keep-overlay options, modeled after blockcopy. (blockJobImpl): Support --active flag. * tools/virsh.pod (blockcommit): Document new flags. (blockjob): Mention 2-phase commit interaction. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
When the block job event was first added, it was for block pull, where the active layer of the disk remains the same name. It was also in a day where we only cared about local files, and so we always had a canonical absolute file name. But two things have changed since then: we now have network disks, where determining a single absolute string does not really make sense; and we have two-phase jobs (copy and active commit) where the name of the active layer changes between the first event (ready, on the old name) and second (complete, on the pivoted name). Adam Litke reported that having an unstable string between events makes life harder for clients. Furthermore, all of our API that operate on a particular disk of a domain accept multiple strings: not only the absolute name of the active layer, but also the destination device name (such as 'vda'). As this latter name is stable, even for network sources, it serves as a better string to supply in block job events. But backwards-compatibility demands that we should not change the name handed to users unless they explicitly request it. Therefore, this patch adds a new event, BLOCK_JOB_2 (alas, I couldn't think of any nicer name - but at least Migrate2 and Migrate3 are precedent for a number suffix). We must double up on emitting both old-style and new-style events according to what clients have registered for (see also how IOError and IOErrorReason emits double events, but there the difference was a larger struct rather than changed meaning of one of the struct members). Unfortunately, adding a new event isn't something that can easily be broken into pieces, so the commit is rather large. * include/libvirt/libvirt.h.in (virDomainEventID): Add a new id for VIR_DOMAIN_EVENT_ID_BLOCK_JOB_2. (virConnectDomainEventBlockJobCallback): Document new semantics. * src/conf/domain_event.c (_virDomainEventBlockJob): Rename field, to ensure we catch all clients. (virDomainEventBlockJobNew): Add parameter. (virDomainEventBlockJobDispose) (virDomainEventBlockJobNewFromObj) (virDomainEventBlockJobNewFromDom) (virDomainEventDispatchDefaultFunc): Adjust clients. (virDomainEventBlockJob2NewFromObj) (virDomainEventBlockJob2NewFromDom): New functions. * src/conf/domain_event.h: Add new prototypes. * src/libvirt_private.syms (domain_event.h): Export new functions. * src/qemu/qemu_driver.c (qemuDomainBlockJobImpl): Generate two different events. * src/qemu/qemu_process.c (qemuProcessHandleBlockJob): Likewise. * src/remote/remote_protocol.x (remote_domain_event_block_job_2_msg): New struct. (REMOTE_PROC_DOMAIN_EVENT_BLOCK_JOB_2): New RPC. * src/remote/remote_driver.c (remoteDomainBuildEventBlockJob2): New handler. (remoteEvents): Register new event. * daemon/remote.c (remoteRelayDomainEventBlockJob2): New handler. (domainEventCallbacks): Register new event. * tools/virsh-domain.c (vshEventCallbacks): Likewise. (vshEventBlockJobPrint): Adjust client. * src/remote_protocol-structs: Regenerate. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 18 6月, 2014 2 次提交
-
-
由 Peter Krempa 提交于
s/QEemu/QEMU/g
-
由 Peter Krempa 提交于
The version command now takes the --daemon parameter for a while and the output example was pretty outdated. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1110673
-
- 13 6月, 2014 1 次提交
-
-
由 Eric Blake 提交于
Peter's review of an early version of my addition of active block commit pointed out some issues that I was copying from the block copy code; fix them up now before perpetuating them. For virsh commands that manage a single API call, it's nice to have a 1:1 mapping of options to flags, so that we can test that lower-layer software handles flag combinations correctly. But where virsh is introducing syntactic sugar to combine multiple API calls into a single user interface, we might as well make that interface compact. That is, we should allow the shorter command-line of 'blockcopy $dom $disk --pivot' without having to explicitly specify --wait, because this isn't directly a flag passed to a single underlying API call. Also, my use of embedded ?: ternaries bordered on unreadable. * tools/virsh-domain.c (cmdBlockCopy): Make --pivot, --finish, and --timeout imply --wait. Drop excess ?: operators. * tools/virsh.pod (blockcopy): Update documentation. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 12 6月, 2014 5 次提交
-
-
由 Jincheng Miao 提交于
The vcpupin command allowed specifying a negative number for the --vcpu argument. This would the overflow when the underlying virDomainPinVcpu API was called. $ virsh vcpupin r7 -1 0 error: numerical overflow: input too large: 4294967295 Switch the vCPU variable to a unsigned int and parse it using the corresponding function. Also improve the vcpupin test to cover all the defects. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1101059Signed-off-by: NJincheng Miao <jmiao@redhat.com> Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
To follow the new semantics of the vshCommandOptToU* functions convert this one to reject negative numbers too. To allow using -1 for "maximum" semantics for the vol-*load two bandwidth functions that use this helper introduce vshCommandOptULongLongWrap.
-
由 Peter Krempa 提交于
To follow the new semantics of the vshCommandOptToU* functions convert this one to reject negative numbers too. To allow using -1 for "maximum" semantics for the two bandwidth functions that use this helper introduce vshCommandOptULWrap. Although currently the migrate-setspeed function for the qemu driver will reject -1 as maximum.
-
由 Peter Krempa 提交于
Use virStrToLong_uip instead of virStrToLong_ui to reject negative numbers in the helper. None of the callers expects the wraparound "feature" for negative numbers. Also add a function that allows wrapping of negative numbers as it might be used in the future and be explicit about the new semantics in the function docs.
-
由 Roman Bogorodskiy 提交于
Add 'Bhyve' in hypervisor list reported by 'virsh -V' if it's compiled it.
-
- 11 6月, 2014 2 次提交
-
-
由 Chen Fan 提交于
the 'migration_host' description may be a bit difficult to understand for some users, so enhance the manual Signed-off-by: NChen Fan <chen.fan.fnst@cn.fujitsu.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
Now that qemu 2.0 allows commit of the active layer, people are attempting to use virsh blockcommit and getting into a stuck state, because libvirt is unprepared to handle the two-phase commit required by qemu. Stepping back a bit, there are two valid semantics for a commit operation: 1. Maintain a 'golden' base, and a transient overlay. Make changes in the overlay, and if everything appears to work, commit those changes into the base, but still keep the overlay for the next round of changes; repeat the cycle as desired. 2. Create an external snapshot, then back up the stable state in the backing file. Once the backup is complete, commit the overlay back into the base, and delete the temporary snapshot. Since qemu doesn't know up front which of the two styles is preferred, a block commit of the active layer merely gets the job into a synchronized state, and sends an event; then the user must either cancel (case 1) or complete (case 2), where qemu then sends a second event that actually ends the job. However, until commit e6bcbcd3, libvirt was blindly assuming the semantics that apply to a commit of an intermediate image, where there is only one sane conclusion (the job automatically ends with fewer elements in the chain); and getting stuck because it wasn't prepared for qemu to enter a second phase of the job. This patch adds a flag to the libvirt API that a user MUST supply in order to acknowledge that they will be using two-phase semantics. It might be possible to have a mode where if the flag is omitted, we automatically do the case 2 semantics on the user's behalf; but before that happens, I must do additional patches to track the fact that we are doing an active commit in the domain XML. Later patches will add support of the flag, and once 2-phase semantics are working, we can then decide whether to relax things to allow an omitted flag to cause an automatic pivot. * include/libvirt/libvirt.h.in (VIR_DOMAIN_BLOCK_COMMIT_ACTIVE) (VIR_DOMAIN_BLOCK_JOB_TYPE_ACTIVE_COMMIT): New enums. * src/libvirt.c (virDomainBlockCommit): Document two-phase job when committing active layer, through new flag. (virDomainBlockJobAbort): Document that pivot also occurs after active commit. * tools/virsh-domain.c (vshDomainBlockJob): Cover new job. * src/qemu/qemu_driver.c (qemuDomainBlockCommit): Explicitly reject active copy; later patches will add it in. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 06 6月, 2014 3 次提交
-
-
由 Ján Tomko 提交于
Report CPU affinities / online CPUs in human-readable form when this flag is present: Before: CPU Affinity: y-yy After: CPU Affinity: 0,2-3 (out of 4) https://bugzilla.redhat.com/show_bug.cgi?id=985980
-
由 Ján Tomko 提交于
This allows reuse of the result printing code.
-
由 Ján Tomko 提交于
Initialize 'ret' to false and introduce a cleanup label.
-
- 03 6月, 2014 1 次提交
-
-
由 Michal Privoznik 提交于
Our public free functions explicitly don't accept NULL pointers (sigh). Therefore, callers must do something like this: if (dev) virNodeDeviceFree(dev); And we are not doing that on two places I've found. This leads to dummy error message thrown by virsh: virsh # nodedev-dumpxml nonexistent-device error: Could not find matching device 'nonexistent-device' error: invalid node device pointer in virNodeDeviceFree Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 02 6月, 2014 1 次提交
-
-
由 Peter Krempa 提交于
When looking up storage volumes virsh uses multiple lookup steps. Some of the steps don't require a pool name specified. This resulted into a possibility that a volume would be part of a different pool than the user specified: Let's have a /var/lib/libvirt/images/test.qcow image in the 'default' pool and a second pool 'emptypool': Currently we'd return: $ virsh vol-info --pool emptypool /var/lib/libvirt/images/test.qcow Name: test.qcow Type: file Capacity: 100.00 MiB Allocation: 212.00 KiB After the fix: $ tools/virsh vol-info --pool emptypool /var/lib/libvirt/images/test.qcow error: Requested volume '/var/lib/libvirt/images/test.qcow' is not in pool 'emptypool' Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1088667
-
- 29 5月, 2014 1 次提交
-
-
由 Eric Blake 提交于
* tools/virsh.pod (attach-disk): Drop duplicate --config, fix typo in --sourcetype. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 20 5月, 2014 1 次提交
-
-
由 Eric Blake 提交于
Commit d5c86278 was incomplete; other functions also triggered compiler warnings about collisions in the use of 'sync'. * src/qemu/qemu_driver.c (qemuDomainSetTime): Fix another client. * tools/virsh-domain-monitor.c (cmdDomTime): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 16 5月, 2014 1 次提交
-
-
由 Eric Blake 提交于
The VIR_ENUM_DECL/VIR_ENUM_IMPL helper macros already append 'Type' to the enum name being converted; it looks silly to have functions with 'TypeType' in their name. Even though some of our enums have to have a 'Type' suffix, the corresponding string conversion functions do not. * src/conf/secret_conf.h (VIR_ENUM_DECL): Rename virSecretUsageType. * src/conf/storage_conf.h (VIR_ENUM_DECL): Rename virStoragePoolAuthType, virStoragePoolSourceAdapterType, virStoragePartedFsType. * src/conf/domain_conf.c (virDomainDiskDefParseXML) (virDomainFSDefParseXML, virDomainFSDefFormat): Update callers. * src/conf/secret_conf.c (virSecretDefParseUsage) (virSecretDefFormatUsage): Likewise. * src/conf/storage_conf.c (virStoragePoolDefParseAuth) (virStoragePoolDefParseSource, virStoragePoolSourceFormat): Likewise. * src/lxc/lxc_controller.c (virLXCControllerSetupLoopDevices): Likewise. * src/storage/storage_backend_disk.c (virStorageBackendDiskPartFormat): Likewise. * src/util/virstorageencryption.c (virStorageEncryptionSecretParse) (virStorageEncryptionSecretFormat): Likewise. * tools/virsh-secret.c (cmdSecretList): Likewise. * src/libvirt_private.syms (secret_conf.h, storage_conf.h): Export corrected names. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 15 5月, 2014 3 次提交
-
-
由 Michal Privoznik 提交于
These APIs are exposed under new virsh command 'domtime' which both gets and sets (not at the same time of course :)). Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Li Yang 提交于
For now, if only '--wipe-storage' is assigned, user can undefine a domain normally. But actually '--wipe-storage' doesn't do anything, and this may confuse user. Better is to require that '--wipe-storage' only works if the user specifies volumes to be removed. Before: $ virsh undefine virt-tests-vm1 --wipe-storage Domain virt-tests-vm1 has been undefined After: $ virsh undefine virt-tests-vm1 --wipe-storage error: '--wipe-storage' requires '--storage <string>' or '--remove-all-storage' Signed-off-by: NLi Yang <liyang.fnst@cn.fujitsu.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Julio Faracco 提交于
In "src/conf/" there are many enumeration (enum) declarations. Similar to the recent cleanup to "src/util" directory, it's better to use a typedef for variable types, function types and other usages. Other enumeration and folders will be changed to typedef's in the future. Most of the files changed in this commit are related to storage (storage_conf) enums. Signed-off-by: NJulio Faracco <jcfaracco@gmail.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 13 5月, 2014 2 次提交
-
-
由 Peter Krempa 提交于
Commit 9976c4b9 broke the output for VNC displays as the port number is converted to VNC display number by subtracting 5900. This yields port 0 for the first display and thus the output would be skipped. Before: $ virsh domdisplay VM vnc://localhost After: $ tools/virsh domdisplay VM vnc://localhost:0
-
由 Tomoki Sekiyama 提交于
These are exposed under domfsfreeze command and domfsthaw command. Signed-off-by: NTomoki Sekiyama <tomoki.sekiyama@hds.com>
-
- 06 5月, 2014 2 次提交
-
-
由 Li Yang 提交于
Signed-off-by: NLi Yang <liyang.fnst@cn.fujitsu.com>
-
由 Jim Fehlig 提交于
Add a new flag to virDomain{Reboot,Shutdown}FlagValues to allow shutting down and rebooting a domain via the Xen paravirt control interface.
-
- 25 4月, 2014 1 次提交
-
-
由 Daniel P. Berrange 提交于
Add calls to virFileActivateDirOverride so that the build dir overrides are activated. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 23 4月, 2014 1 次提交
-
-
由 Ján Tomko 提交于
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1088748 The hotplugged vcpus could fail to show up in the guest if they were added during boot, see: https://bugzilla.redhat.com/show_bug.cgi?id=807508 Also change arbitrary to arbitrarily.
-
- 22 4月, 2014 1 次提交
-
-
由 Nehal J Wani 提交于
Fix minor typos in source comments Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 09 4月, 2014 1 次提交
-
-
由 Li Yang 提交于
The original comment of vshCmdInfo: "name" - command name Actually it's 'help' and the short description of command, not the command name. Signed-off-by: NLi Yang <liyang.fnst@cn.fujitsu.com>
-
- 07 4月, 2014 1 次提交
-
-
由 Guido Günther 提交于
At least Debian uses dash to run the init scripts
-
- 03 4月, 2014 1 次提交
-
-
由 Li Yang 提交于
For now 'virsh quit' action like this: -------------------------------- [root@localhost /]# virsh quit [root@localhost /]# -------------------------------- And 'virsh exit' action: -------------------------------- [root@localhost /]# virsh exit [root@localhost /]# -------------------------------- There is a small difference('/n') between them. According to manual said: quit, exit quit this interactive terminal And in the code they all called cmdQuit func, They should get same actions. Signed-off-by: NLi Yang <liyang.fnst@cn.fujitsu.com>
-
- 02 4月, 2014 2 次提交
-
-
由 Shanzhi Yu 提交于
-
由 Eric Blake 提交于
With this patch, all information related to a host resource in a storage file backing chain now lives in util/virstoragefile.h. The next step will be to consolidate various places that have been tracking backing chain details to all use a common struct. The changes to tools/Makefile.am were made necessary by the fact that virstorageencryption includes uses of libxml, and is now pulled in by inclusion from virstoragefile.h. No additional libraries are linked into the final image, and in comparison, the build of the setuid library in src/Makefile.am already was using LIBXML_CFLAGS via AM_CFLAGS. * src/conf/domain_conf.h (virDomainDiskSourceDef): Move... * src/util/virstoragefile.h (virStorageSource): ...and rename. * src/conf/domain_conf.c (virDomainDiskSourceDefClear) (virDomainDiskAuthClear): Adjust clients. * tools/Makefile.am (virt_login_shell_CFLAGS) (virt_host_validate_CFLAGS): Add libxml headers. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 31 3月, 2014 1 次提交
-
-
由 Eric Blake 提交于
'virsh help event' included a summary line "event - (null)" due to a misnamed info field. * tools/virsh-domain.c (info_event): Use correct name. * tools/virsh-network.c (info_network_event): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-