- 25 9月, 2014 1 次提交
-
-
由 Michal Privoznik 提交于
The new virsh command is named 'allocpages'. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 24 9月, 2014 2 次提交
-
-
由 Jim Fehlig 提交于
When libvirt-guests is configured to start guests on host boot, it is possible for guests start and read the host clock before it is synchronized. Services such as libvirt-guests that require correct time should use the Special Passive System Unit time-sync.target http://www.freedesktop.org/software/systemd/man/systemd.special.html#time-sync.target
-
由 Pavel Hrdina 提交于
This new event will use typedParameters to expose what has been actually updated and the reason is that we can in the future extend any tunable values or add new tunable values. With typedParameters we don't have to worry about creating some other events, we will just use this universal event to inform user about updates. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
- 23 9月, 2014 3 次提交
-
-
由 Jincheng Miao 提交于
The unit of '--pagesize' of freepages is kibibytes. https://bugzilla.redhat.com/show_bug.cgi?id=1145048Signed-off-by: NJincheng Miao <jmiao@redhat.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michael R. Hines 提交于
RDMA Live migration requires registering memory with the hardware, and thus QEMU offers a new 'capability' to pre-register / mlock() the guest memory in advance for higher RDMA performance before the migration begins. This capability is disabled by default, which means QEMU will register the memory with the hardware in an on-demand basis. This patch exposes this capability with the following example usage: virsh migrate --live --rdma-pin-all --migrateuri rdma://hostname domain qemu+ssh://hostname/systemSigned-off-by: NMichael R. Hines <mrhines@us.ibm.com> Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Michael R. Hines 提交于
RDMA migration uses the 'setup' state in QEMU to optionally lock all memory before the migration starts. The total time spent in this state is exposed as VIR_DOMAIN_JOB_SETUP_TIME. Additionally, QEMU also exports migration throughput (mbps) for both memory and disk, so let's add them too: VIR_DOMAIN_JOB_MEMORY_BPS, VIR_DOMAIN_JOB_DISK_BPS. Signed-off-by: NMichael R. Hines <mrhines@us.ibm.com> Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 18 9月, 2014 5 次提交
-
-
由 Wang Yufei 提交于
Clean up all _virDomainMemoryStat. Signed-off-by: NJames <james.wangyufei@huawei.com> Signed-off-by: NWang Rui <moon.wangrui@huawei.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Wang Yufei 提交于
Clean up all _virDomainBlockStats. Signed-off-by: NJames <james.wangyufei@huawei.com> Signed-off-by: NWang Rui <moon.wangrui@huawei.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Wang Yufei 提交于
Clean up all _virDomainInterfaceStats. Signed-off-by: NWang Yufei <james.wangyufei@huawei.com> Signed-off-by: NWang Rui <moon.wangrui@huawei.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
Document the fields returned.
-
由 Francesco Romani 提交于
Add new bulk stats groups to the domstats command. Signed-off-by: NFrancesco Romani <fromani@redhat.com>
-
- 16 9月, 2014 1 次提交
-
-
由 John Ferlan 提交于
Add an iothread parameter to allow attaching to an IOThread, such as: virsh attach-disk $dom $source $target --live --config --iothread 2 \ --targetbus virtio --driver qemu --subdriver raw --type disk
-
- 15 9月, 2014 2 次提交
-
-
由 John Ferlan 提交于
Coverity complained that checking the return of virDomainCreate() was not consistent amongst the callers - so added the return check to the objecteventtest.c and adjust the virt-login-shell to compare < 0 rather than just non zero for the failure condition.
-
由 John Ferlan 提交于
Coverity complains that on the first pass through the for loop that 'params' cannot be true, thus the ternary setting to "&" cannot be done. Since we can only ever get to this point once, drop the ternary
-
- 12 9月, 2014 3 次提交
-
-
由 Michal Privoznik 提交于
When a domain is undefined, there are options to remove it's managed save state or snapshots. However, there's another file that libvirt creates per domain: the NVRAM variable store file. Make sure that the file is not left behind if the domain is undefined. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 John Ferlan 提交于
Coverity notes that after we VIR_ALLOC_N(params, nparams) a failed call to virDomainGetCPUStats could result in nparams being set to -1. In that case, the subsequent virTypedParamsFree in cleanup will pass -1 which isn't good. Use the returned value as the number of stats to display in the loop as it will be the value reported from the hypervisor and may be less than nparams which is OK Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Jiri Denemark 提交于
Because of similar contexts, git rebase I did just before pushing the series which added --completed option patched the wrong command.
-
- 11 9月, 2014 3 次提交
-
-
由 John Ferlan 提交于
Coverity points out that if 'dom' isn't returned from virDomainQemuAttach, then the code already jumps to cleanup, so there was no need for the subsequent if (dom != NULL) check. I moved the error message about failure into the goto cleanup on failure and then removed the if (dom != NULL) Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Coverity points out that by using EMPTYSTR(type) we are guarding against the possibility that it could be NULL; however, based on how 'type' was initialized to NULL, then using nested ternary if-then-else's (?:?:) setting either "ipv4", "ipv6", or "" - there is no way it could be NULL. Since "-" is supposed to mean something empty in a field - modify the nested ternary to an easier to read/process if-then-else leaving the initialization to NULL to mean "-" in the formatted output. Also changed the name from 'type' to 'typestr'. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Since 0766783a Coverity complains that the EDIT_FREE definition results in DEADCODE. As it turns out with the change to use the EDIT_FREE macro the call to vir*Free() wouldn't be necessary nor would it happen... Prior code to above commitid would : vir*Ptr foo = NULL; ... foo = vir*GetXMLDesc() ... vir*Free(foo); foo = vir*DefineXML() ... And thus the free was needed. With the change to use EDIT_FREE the same code changed to: vir*Ptr foo = NULL; vir*Ptr foo_edited = NULL; ... foo = vir*GetXMLDesc() ... if (foo_edited) vir*Free(foo_edited); foo_edited = vir*DefineXML() ... However, foo_edited could never be set in the code path - even with all the goto's since the only way for it to be set is if vir*DefineXML() succeeds in which case the code to allow a retry (and thus all the goto's) never leaves foo_edited set All error paths lead to "cleanup:" which causes both foo and foo_edited to call the respective vir*Free() routines if set. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 10 9月, 2014 4 次提交
-
-
由 Peter Krempa 提交于
Tweak the messages so that they mention "title" rather than "description" when operating in title mode. Also fixes one missing "%s" before non-formatted gettext message. Before: $ virsh desc --title dom No description for domain: dom After: $ virsh desc --title dom No title for domain: dom Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1140034
-
由 Peter Krempa 提交于
-
由 Jiri Denemark 提交于
Total time of a migration and total downtime transfered from a source to a destination host do not count with the transfer time to the destination host and with the time elapsed before guest CPUs are resumed. Thus, source libvirtd remembers when migration started and when guest CPUs were paused. Both timestamps are transferred to destination libvirtd which uses them to compute total migration time and total downtime. Obviously, this requires the time to be synchronized between the two hosts. The reported times are useless otherwise but they would be equally useless if we didn't do this recomputation so don't lose anything by doing it. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
New --completed flag for virsh domjobinfo command. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 09 9月, 2014 1 次提交
-
-
由 Eric Blake 提交于
The parser accepts P and E, so the formatter should too. * tools/virsh.c (vshPrettyCapacity): Handle larger units. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 08 9月, 2014 1 次提交
-
-
由 Eric Blake 提交于
Commit c1d75dee caused this warning on 32-bit platforms (fatal when -Werror is enabled): virsh-domain.c: In function 'cmdBlockCopy': virsh-domain.c:2003:17: error: comparison is always false due to limited range of data type [-Werror=type-limits] Forcing the left side of the < to be ull instead of ul shuts up the 32-bit compiler while still protecting 64-bit code from overflow. * tools/virsh-domain.c (cmdBlockCopy): Add type coercion. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 07 9月, 2014 1 次提交
-
-
由 Eric Blake 提交于
Expose the new power of virDomainBlockCopy through virsh (well, all but the finer-grained bandwidth, as that is its own can of worms for a later patch). Continue to use the older API where possible, for maximum compatibility. The command now requires either --dest (with optional --format and --blockdev), to directly describe the file destination, or --xml, to name a file that contains an XML description such as: <disk type='network'> <driver type='raw'/> <source protocol='gluster' name='vol1/img'> <host name='red'/> </source> </disk> [well, it may be a while before the qemu driver is actually patched to act on that particular xml beyond just parsing it, but the virsh interface won't need changing at that time] Non-zero option parameters are converted into virTypedParameters, and if anything requires the new API, the command can synthesize appropriate XML even if the --dest option was used instead of --xml. The existing --raw flag remains for back-compat, but the preferred spelling is now --format=raw, since the new API now allows us to specify all formats rather than just a boolean raw to suppress probing. I hope I did justice in describing the effects of granularity and buf-size on how they get passed through to qemu. * tools/virsh-domain.c (cmdBlockCopy): Add new options --xml, --granularity, --buf-size, --format. Make --raw an alias for --format=raw. Call new API if new parameters are in use. * tools/virsh.pod (blockcopy): Document new options. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 06 9月, 2014 5 次提交
-
-
由 Eric Blake 提交于
I'm about to extend the capabilities of blockcopy. Hiding a few common lines of implementation gets in the way of the new required logic, and putting the new logic in the common implementation won't benefit any of the other blockjob operations. Therefore, it is simpler to just do the work inline. There should be no semantic change in this patch. * tools/virsh-domain.c (blockJobImpl): Move block copy guts... (cmdBlockCopy): ...into their lone caller. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
To date, anyone performing a block copy and pivot ends up with the destination being treated as <disk type='file'>. While this works for data access for a block device, it has at least one noticeable shortcoming: virDomainGetBlockInfo() reports allocation differently for block devices visited as files (the size of the device) than for block devices visited as <disk type='block'> (the maximum sector used, as reported by qemu); and this difference is significant when trying to manage qcow2 format on block devices that can be grown as needed. Of course, the more powerful virDomainBlockCopy() API can already express the ability to set the <disk> type. But a new API can't be backported, while a new flag to an existing API can; and it is also rather inconvenient to have to resort to the full power of generating XML when just adding a flag to the older call will do the trick. So this patch enhances blockcopy to let the user flag when the resulting XML after the copy must list the device as type='block'. * include/libvirt/libvirt.h.in (VIR_DOMAIN_BLOCK_REBASE_COPY_DEV): New flag. * src/libvirt.c (virDomainBlockRebase): Document it. * tools/virsh-domain.c (opts_block_copy, blockJobImpl): Add --blockdev option. * tools/virsh.pod (blockcopy): Document it. * src/qemu/qemu_driver.c (qemuDomainBlockRebase): Allow new flag. (qemuDomainBlockCopy): Remember the flag, and make sure it is only used on actual block devices. * tests/qemuxml2argvdata/qemuxml2argv-disk-mirror.xml: Test it. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
Expose the new flag just added to virDomainGetBlockJobInfo. With --raw, the presence or absence of --bytes determines which flag to use in the single API call. Without --raw, the use of --bytes forces an error if the server doesn't support it, otherwise, the code tries to silently fall back to scaling the MiB/s value. My goal is to eventually also support --bytes in bandwidth mode; but that's a bit further down the road (and needs a new API flag added in libvirt.h first). This changes the human output, but the previous patch added raw output precisely so that we can have flexibility with the human output. For this commit, I used qemu-monitor-command to force an unusual bandwidth, but the same will be possible once qemu implements virDomainBlockCopy: Before: Block Copy: [100 %] Bandwidth limit: 2 MiB/s After: Block Copy: [100 %] Bandwidth limit: 1048577 bytes/s (1.000 MiB/s) The cache avoids having to repeatedly checking whether the flag works when talking to an older server, when multiple blockjob commands are issued during a batch session and the user is manually polling for job completion. * tools/virsh.h (_vshControl): Add a cache. * tools/virsh.c (cmdConnect, vshReconnect): Initialize the cache. * tools/virsh-domain.c (opts_block_job): Add --bytes. * tools/virsh.pod (blockjob): Document this. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
The current output of 'blockjob [--info]' is a single line designed for human consumption; it's not very nice for machine parsing. Furthermore, I have plans to modify the line in response to the new flag for controlling bandwidth units. Solve that by adding a --raw parameter, which outputs information closer to the C struct. $ virsh blockjob testvm1 vda --raw type=Block Copy bandwidth=1 cur=197120 end=197120 The information is indented, because I'd like for a later patch to add a mode that iterates over all the vm's disks with status for each; in that mode, each block name would be listed unindented before information (if any) about that block. Now that we have a raw mode, we can guarantee that it won't change format over time. Any app that cares about parsing the output can try --raw, and if it fails, know that it was talking to an older virsh and fall back to parsing the human-readable format which had not changed until now; meanwhile, when not using --raw, we have freed future virsh to change the output to whatever makes sense. My first change to human mode: this command now guarantees a line is printed on successful use of the API, even when the API did not find a current block job (consistent with the rest of virsh). Bonus: https://bugzilla.redhat.com/show_bug.cgi?id=1135441 complained that this message was confusing: $ virsh blockjob test1 hda --async --bandwidth 10 error: conflict between --abort, --info, and --bandwidth modes even though the man page already documents that --async implies abort mode, all because '--abort' wasn't present in the command line. Since I'm adding another case where options are tied to or imply a mode, I changed that error to: error: conflict between abort, info, and bandwidth modes * tools/virsh-domain.c (cmdBlockJob): Add --raw parameter; tweak error wording. * tools/virsh.pod (blockjob): Document it. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
I have plans to make future enhancements to the job list mode, which will be easier to do if the common blockJobImpl function is not mixing a query command with multiple modify commands. Besides, it just feels weird that all callers to blockJobImpl had to supply both a bandwidth input argument (unused for info mode) and an info output argument (unused for all other modes); not to mention I just made similar cleanups on the libvirtd side. The only reason blockJobImpl returned int was because of info mode returning -1/0/1 (all other job API are -1/0), so that can also be cleaned up. No user-visible changes in this commit. * tools/virsh-domain.c (blockJobImpl): Change signature and return value. Drop info handling. (cmdBlockJob): Handle info here. (cmdBlockCommit, cmdBlockCopy, cmdBlockPull): Adjust callers. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 05 9月, 2014 1 次提交
-
-
由 Eric Blake 提交于
I'm about to add a syntax check that enforces our documented HACKING style of always using matching {} on if-else statements. This patch focuses on all remaining problems, where there weren't enough issues to warrant splitting it further. * src/remote/remote_driver.c (doRemoteOpen): Correct use of {}. * src/security/virt-aa-helper.c (vah_add_path, valid_path, main): Likewise. * src/rpc/virnetsocket.c (virNetSocketNewConnectLibSSH2): Likewise. * src/esx/esx_vi_types.c (esxVI_Type_FromString): Likewise. * src/uml/uml_driver.c (umlDomainDetachDevice): Likewise. * src/util/viralloc.c (virShrinkN): Likewise. * src/util/virbuffer.c (virBufferURIEncodeString): Likewise. * src/util/virdbus.c (virDBusCall): Likewise. * src/util/virnetdev.c (virNetDevValidateConfig): Likewise. * src/util/virnetdevvportprofile.c (virNetDevVPortProfileGetNthParent): Likewise. * src/util/virpci.c (virPCIDeviceIterDevices) (virPCIDeviceWaitForCleanup) (virPCIDeviceIsBehindSwitchLackingACS): Likewise. * src/util/virsocketaddr.c (virSocketAddrGetNumNetmaskBits): Likewise. * src/util/viruri.c (virURIParseParams): Likewise. * daemon/stream.c (daemonStreamHandleAbort): Likewise. * tests/testutils.c (virtTestResult): Likewise. * tests/cputest.c (cpuTestBaseline): Likewise. * tools/virsh-domain.c (cmdDomPMSuspend): Likewise. * tools/virsh-host.c (cmdNodeSuspend): Likewise. * src/esx/esx_vi_generator.py (Type.generate_typefromstring): Tweak generated code. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 28 8月, 2014 3 次提交
-
-
由 John Ferlan 提交于
Need to free 'xmlFromFile' on/for the error path when current was returning false only
-
由 Peter Krempa 提交于
Add "domstats" command that excercises both of the new APIs depending if you specify a domain list or not. The output is printed as a key=value list of the returned parameters.
-
由 Erik Skultety 提交于
resolves https://bugzilla.redhat.com/show_bug.cgi?id=1132305: The error message for an out-of-range argument was confusing: virsh -k 9999999999 error: option --k requires a positive numeric argument After this patch, it is: error: Invalid value for option -k Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 27 8月, 2014 2 次提交
-
-
由 Eric Blake 提交于
While prepping for virDomainBlockJob patches, I found some dead code. * tools/virsh-domain.c (blockJobImpl): Kill unused 'name'. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
Split out guts of the function to reuse it to get domain objects from string.
-
- 26 8月, 2014 1 次提交
-
- 22 8月, 2014 1 次提交
-
-
由 Li Yang 提交于
Signed-off-by: NLi Yang <liyang.fnst@cn.fujitsu.com>
-