- 31 5月, 2011 2 次提交
-
-
由 Daniel P. Berrange 提交于
The virSysinfoIsEqual method was mistakenly inside a #ifndef WIN32 conditional. The existing virSysinfoFormat is also stubbed out on Win32, even though the code works without any trouble. This breaks XML output on Win32, so the stub is removed. virsh migrate mistakenly had some variables inside the conditional * src/util/sysinfo.c: Build virSysinfoIsEqual on Win32 and remove Win32 stub for virSysinfoFormat * tools/virsh.c: Fix variable declaration on Win32
-
由 Daniel P. Berrange 提交于
Switch virsh migrate over to use virDomainMigrate2 and virDomainMigrateToURI2. This is still compatible with older libvirts, because these methods dynamically choose whether to perform v1, v2 or v3 migration based on declared RPC support from the libvirtd instances Add a --xml arg which allows the user to pass in a custom XML document. This XML document must be ABI compatible with the current *live* XML document for the running guest on the source host. ABI compatibility will be enforced by any driver supporting this function * tools/virsh.c: Add '--xml' arg to migrate command
-
- 29 5月, 2011 2 次提交
-
-
由 Eric Blake 提交于
Since we can now set just --live or --config, we also need to be able to query that back. In the case of setting both --live and --config, it shouldn't matter which value we read back; otherwise, since querying treats the two flags as mutually exclusive, so does this patch. * tools/virsh.c (cmdSchedinfo): Use new API where appropriate.
-
由 Eric Blake 提交于
Rather mechanical in nature. * src/driver.h: Use newer virTypedParameter API names. * src/libvirt.c: Likewise. * daemon/remote.c: Likewise. * src/esx/esx_driver.c: Likewise. * src/libxl/libxl_driver.c: Likewise. * src/lxc/lxc_driver.c: Likewise. * src/qemu/qemu_driver.c: Likewise. * src/remote/remote_driver.c: Likewise. * src/test/test_driver.c: Likewise. * src/xen/xen_driver.c: Likewise. * src/xen/xen_hypervisor.c: Likewise. * src/xen/xen_hypervisor.h: Likewise. * src/xen/xend_internal.c: Likewise. * tools/virsh.c: Likewise.
-
- 28 5月, 2011 1 次提交
-
-
由 Michal Privoznik 提交于
This implements the commands iface-begin, iface-commit, and iface-rollback, which simply call the corresponding functions in the libvirt API.
-
- 27 5月, 2011 1 次提交
-
-
由 Hu Tao 提交于
The new flags allow to pick current state, config or the live parameter, with current being the existing API default (0). This also hooks this to --config, --live, --current parameters for the memtune virsh command * include/libvirt/libvirt.h.in: defines the new flags * tools/virsh.c: adds support at virsh level * tools/virsh.pod: updates virsh documentation
-
- 26 5月, 2011 1 次提交
-
-
由 Matthias Bolte 提交于
localtime_r expects time_t.
-
- 20 5月, 2011 1 次提交
-
-
由 Supriya Kannery 提交于
Use variables VIRSH_DEBUG and VIRSH_LOG_FILE for controlling virsh logging. Signed-off-by: NSupriya Kannery <supriyak@in.ibm.com>
-
- 19 5月, 2011 1 次提交
-
-
由 Eric Blake 提交于
Ramon de Carvalho Valle reported a problem with: virsh connect qemu:///system as a non-root user. The real root problem appears to be a regression in libvirtd being auto-started on the default qemu:///session URI; however, the symptom points to an independent flaw in virsh - we shouldn't be wasting efforts on making a connection if we aren't going to be using that connection. Fixing virsh avoids Ramon's issue, while I work in the meantime to fix the real libvirtd regression. This patch looks big, but that's because 'gcc -Wmissing-field-initializers' gets triggered by './autobuild.sh --enable-compile-warnings=error', so I had to add 0 initialization to everyone (rather than my preference of just adding the non-zero flags to virshCmds and to cmdConnect). Meanwhile, if you use 'virsh -c URI', the connection must succeed; this patch _only_ optimizes the default connection to be deferred to a later point where we know if a particular command to be run needs a connection. * tools/virsh.c (VSH_CMD_FLAG_NOCONNECT): New flag. (vshCmdDef): Add new flags field. (vshCommandRun): Honor new flag. (domManagementCmds, domMonitoringCmds, storagePoolCmds) (storageVolCmds, networkCmds, nodedevCmds, ifaceCmds) (nwfilterCmds, secretCmds, virshCmds, snapshotCmds) (hostAndHypervisorCmds): Populate new field. (vshReconnect): Don't warn on initial connection.
-
- 18 5月, 2011 1 次提交
-
-
由 Hu Tao 提交于
This enables user to modify cpu.shares even when domain is inactive.
-
- 17 5月, 2011 2 次提交
-
-
由 Jiri Denemark 提交于
virsh didn't call virInitialize(), which (among other things) initializes virLastErr thread local variable. As a result of that, virsh could just segfault in virEventRegisterDefaultImpl() since that is the first call that touches (resets) virLastErr. I have no idea what lucky coincidence made this bug visible but I was able to reproduce it in 100% cases but only in one specific environment which included building in sandbox.
-
由 Matthias Bolte 提交于
Otherwise virsh shows the interactive greeting and then silently exists instead of entering interactive mode.
-
- 16 5月, 2011 1 次提交
-
-
由 Jiri Denemark 提交于
-
- 14 5月, 2011 1 次提交
-
-
由 Matthias Bolte 提交于
Reported on FreeBSD only.
-
- 11 5月, 2011 1 次提交
-
-
由 Lai Jiangshan 提交于
-
- 10 5月, 2011 1 次提交
-
-
由 Matthias Bolte 提交于
gcc only reports them when compiling with -O3.
-
- 07 5月, 2011 1 次提交
-
-
由 Eric Blake 提交于
HACKING already mentions that comparisons against literal 'true' are unsafe; for consistency, also shorten comparisons against 'false'. * src/conf/domain_conf.c (virDomainNetDefParseXML): Simplify. * src/nwfilter/nwfilter_gentech_driver.c (virNWFilterDomainFWUpdateCB): Likewise. * tools/virsh.c (cmdVolDownload, vshCommandRun, vshPrintExtra): Likewise.
-
- 06 5月, 2011 2 次提交
-
-
由 Eric Blake 提交于
Easier to maintain, and no longer an arbitrary line length limit. * tools/virsh.c (vshOutputLogFile): Replace snprintf with virBuffer.
-
由 Eric Blake 提交于
We already have virAsprintf, so picking a similar name helps for seeing a similar purpose. Furthermore, the prefix V before printf generally implies 'va_list', even though this variant was '...', and the old name got in the way of adding a new va_list version. global rename performed with: $ git grep -l virBufferVSprintf \ | xargs -L1 sed -i 's/virBufferVSprintf/virBufferAsprintf/g' then revert the changes in ChangeLog-old.
-
- 04 5月, 2011 1 次提交
-
-
由 Eric Blake 提交于
Clang detected that vol-download will call unlink(NULL) if there is a parse error during option parsing. Also, mingw doesn't like unlinking an open file. * tools/virsh.c (cmdVolDownload): Only unlink file if created.
-
- 01 5月, 2011 1 次提交
-
-
由 Supriya Kannery 提交于
Commit 36deff04 introduced a regression due to which virsh is not able to log to a file - msg_buf was changed from an array to a pointer without corresponding change to usage of "sizeof()". Fix regression in virsh logging Signed-off-by: NSupriya Kannery <supriyak@in.ibm.com>
-
- 30 4月, 2011 1 次提交
-
-
由 Eric Blake 提交于
* bootstrap.conf (gnulib_modules): Add getcwd-lgpl. * tests/commandtest.c (checkoutput): Drop unused cwd. * tests/commandhelper.c (main): Let getcwd malloc. * tests/testutils.c (virTestMain): Likewise. * tools/virsh.c (cmdPwd): Likewise. (virshCmds): Expose cmdPwd and cmdCd on mingw.
-
- 29 4月, 2011 1 次提交
-
-
由 Eric Blake 提交于
We don't use gnulib's sanitizations for vfprintf, but vshDebug was used with %zu, which means that it would fail on mingw. Thank goodness the compiler indirectly caught this for us :) virsh.c: In function 'vshDebug': virsh.c:12105:5: warning: function might be possible candidate for 'ms_printf' format attribute [-Wmissing-format-attribute] since mingw <stdio.h> hasn't yet added gcc attributes to vfprintf. * tools/virsh.c (vshDebug): Avoid vfprintf. (vshPrintExtra): Use lighter-weight fputs. Reported by Matthias Bolte.
-
- 28 4月, 2011 1 次提交
-
-
由 Wen Congyang 提交于
This patch does the following things: 1. The return value of cmdSchedInfoUpdate() can be -1, 0 and 1. So the type of return value should be int not bool.(This function is not a entry of a virsh command, but the name of this function likes cmdXXX) 2. The type of cmdSchedinfo()'s, cmdFreecell()'s, cmdPoolList()'s and cmdVolList()'s return value is bool not int, so change the type of variable ret_val, func_ret and functionReturn. 3. Add a variable functionReturn for cmdMigrate(), cmdAttachInterface(), cmdDetachInterface(), cmdAttachDisk() and cmdDetachDisk() to save the return value. 4. Change the type of variable ret in the function cmdAttachDevice(), cmdDetachDevice(), cmdUpdateDevice(), cmdAttachInterface(), cmdDetachInterface(), cmdAttachDisk() and cmdDetachDisk() to int, as we use it to save the return value of virXXX() and the type of virXXX()'s return value is int not bool. 5. Do some cleanup when virBuff.error is 1. The bug 1-4 were introduced by commit b56fa5bb.
-
- 19 4月, 2011 1 次提交
-
-
由 Eric Blake 提交于
Gnulib already guarantees <stdbool.h>, so it is easier to just use the standardized spellings. * tools/virsh.c (vshCmdDef): Change callback to return real bool. (__vshControl): Change several fields to bool. (vshCommandOptBool): Change return type. All callers updated. * tools/Makefile.am (virsh-net-edit.c, virsh-pool-edit.c): Likewise.
-
- 16 4月, 2011 2 次提交
-
-
由 Eric Blake 提交于
Regression introduced in 0.8.5, commit c1564268. The command 'virsh freecell 0' quit working when it changed from an optional string to an optional integer. This patch introduces a slight change that specifying an option twice is now detected as an error. It also changes things so that a command that has more than 1 required option will not complain about missing options if one but not all of the options were given in long format, as in 'virsh vol-create --pool p file', as well as making positional parsing work for all optional options (each positional argument is associated with the earliest option that has not yet been seen by name). Optional boolean options can appear before required argument options, because they don't affect positional argument parsing, and obviously a required boolean option makes no sense. Technically, this patch renders VSH_OT_STRING and VSH_OT_DATA redundant; but cleaning that up can be a separate patch. No command should ever need more than 32 options, right? :) * tools/virsh.c (vshCmddefGetData, vshCmddefGetOption) (vshCommandCheckOpts): Alter parameters to use bitmaps. (vshCmddefOptParse): New function. (vshCommandParse): Update for better handling of positional arguments. (vshCmddefHelp): Allow unit tests to validate options.
-
由 Eric Blake 提交于
The current state of virsh parsing is that: $ virsh vol-info /path/to/image $ virsh vol-info --pool default /path/to/image $ virsh vol-info --pool default --vol /path/to/image all lookup the volume by path (technically, the last two also attempt a name lookup within a pool, whereas the first skips that step, but the end result is the same); meanwhile: $ virsh vol-info default /path/to/image complains about unexpected data. Why? Because the --pool option is optional, so default was parsed as the --vol argument, and /path/to/image.img doesn't match up with any remaining options that require an argument. For proof, note that: $ virsh vol-info default --vol /path/to/image complains about looking up 'default' - the parser mis-associated both arguments with --vol. Given the above, the only way to specify pool is with an explicit "--pool" argument (you can't specify it positionally). However, named arguments can appear in any order, so: $ virsh vol-info /path/to/image --pool default $ virsh vol-info --vol /path/to/image --pool default have also always worked. Therefore, this patch has no functional change on vol-info option parsing, but only on 'virsh help vol-info' synopsis layout. However, it also allows the next patch to 1) enforce that required options are always first (without this patch, the next patch would fail the testsuite), and 2) allow the user to omit the "--pool" argument. That is, the next patch makes it possible to do: $ virsh vol-info /path/to/image default which to date was not possible. * tools/virsh.c (opts_vol_create_from, opts_vol_clone) (opts_vol_upload, opts_vol_download, opts_vol_delete) (opts_vol_wipe, opts_vol_info, opts_vol_dumpxml, opts_vol_key) (opts_vol_path): List optional pool parameter after required arguments.
-
- 09 4月, 2011 1 次提交
-
-
由 Taku Izumi 提交于
This patch adds the new options (--live, --config, and --current) to "virsh setmaxmem" command. The behavior of above options is the same as that of "virsh setmem". When the --config option is specified, a modification is effective for the persistent domain, while the --live option is specified, a modification is effective for an active domain. The --current option is specified, it affects a current domain. Signed-off-by: NTaku Izumi <izumi.taku@jp.fujitsu.com>
-
- 08 4月, 2011 2 次提交
-
-
由 Taku Izumi 提交于
This patch adds the new option (--current) to the "virsh setmem" command. When --current option is specified, it affects a "current" domain. The word "current" denotes that if a domain is running, it affects a running domain only; otherwise it affects a persistent domain. Signed-off-by: NTaku Izumi <izumi.taku@jp.fujitsu.com>
-
由 Taku Izumi 提交于
When the new maximum memory size becomes less than the current memory size, I think it is not the libvirt client but the each driver that decides the behavior (reject the operation or shrink the current memory size). Signed-off-by: NTaku Izumi <izumi.taku@jp.fujitsu.com>
-
- 05 4月, 2011 2 次提交
-
-
由 Daniel P. Berrange 提交于
Add a couple of missing ATTRIBUTE_FMT_PRINTF annotations * tools/virsh.c, tests/testutils.c: Add printf format attribute * m4/virt-compile-warnings.m4: Enable -Wmissing-format-attribute
-
由 Matthias Bolte 提交于
-
- 01 4月, 2011 1 次提交
-
-
由 Jiri Denemark 提交于
Commit 78ba748e claims to fix documentation for swap_hard_limit virsh memtune option but it only fixes documentation in formatdomain.html and libvirt.h. This patch completes the task by fixing "virsh help memtune" output and memtune section of virsh man page.
-
- 31 3月, 2011 1 次提交
-
-
由 Eric Blake 提交于
strcase{cmp/str} have the drawback of being sensitive to the global locale; this is unacceptable in a library setting. Prefer a hard-coded C locale alternative for all but virsh, which is user facing and where the global locale isn't changing externally. * .gnulib: Update to latest, for c-strcasestr change. * bootstrap.conf (gnulib_modules): Drop strcasestr, add c-strcase and c-strcasestr. * cfg.mk (sc_avoid_strcase): New rule. (exclude_file_name_regexp--sc_avoid_strcase): New exception. * src/internal.h (STRCASEEQ, STRCASENEQ, STRCASEEQLEN) (STRCASENEQLEN): Adjust offenders. * src/qemu/qemu_monitor_text.c (qemuMonitorTextEjectMedia): Likewise. * tools/virsh.c (namesorter): Document exception.
-
- 29 3月, 2011 1 次提交
-
-
由 Daniel P. Berrange 提交于
The new commands vol-upload and vol-download, allow a local file to be transferred to/from a storage volume. * tools/virsh.c: Add vol-upload and vol-download commands * tools/virsh.pod: Document new commands
-
- 16 3月, 2011 1 次提交
-
-
由 Eric Blake 提交于
"virsh connect ''" should try to connect to the default connection, but the previous patch made it issue a warning about an invalid URI. * tools/virsh.c (VSH_OFLAG_EMPTY_OK): New option flag. (vshCommandOptString): Per the declaration, value is required to be non-NULL. Honor new flag. (opts_connect): Allow empty string connection.
-
- 14 3月, 2011 2 次提交
-
-
由 Michal Privoznik 提交于
in case of incorrect option parsing.
-
由 Jiri Denemark 提交于
-
- 11 3月, 2011 2 次提交
-
-
由 Gui Jianfeng 提交于
Adding blkiotune command to virsh tool Signed-off-by: NGui Jianfeng <guijianfeng@cn.fujitsu.com>
-
由 Taku Izumi 提交于
This patch adds the new options (--live and --config) to "virsh setmem" command. The behavior of above options is the same as that of "virsh setvcpus" and so on. That is, when the --config option is specified, a modification is effective for the persistent domain. Moreover we can modify the memory size of inactive domains as well as that of active domains. Signed-off-by: NTaku Izumi <izumi.taku@jp.fujitsu.com>
-