1. 19 10月, 2010 2 次提交
    • N
      memtune: Add min_guarantee to the virsh memtune command · 0a22f542
      Nikunj A. Dadhania 提交于
      * tools/virsh.c: Add new memory tunable "min_guarantee", currently only
        ESX can use this
      * tools/virsh.pod: Update the manpage
      0a22f542
    • N
      Update docs for memory parameters and memtune command · 61dfbf8c
      Nikunj A. Dadhania 提交于
      * docs/formatdomain.html.in: Add memtune element details, added min_guarantee
      * src/libvirt.c: Update virDomainGetMemoryParameters api description, make
        it more clear that the user first needs to call the api to get the number
        of parameters supported and then call again to get the values.
      * tools/virsh.pod: Add usage of new command memtune in virsh manpage
      61dfbf8c
  2. 16 10月, 2010 2 次提交
    • E
      virsh: new echo command · b2aedb8e
      Eric Blake 提交于
      * tools/virsh.c (cmdEcho): New command.
      (commands): Add it.
      * tools/virsh.pod (echo): Document it.
      b2aedb8e
    • E
      virsh: add support for accepting arbitrary argv · 72e884d5
      Eric Blake 提交于
      * tools/virsh.c (vshCmdOptType): Add VSH_OT_ARGV.  Delete
      unused VSH_OT_NONE.
      (vshCmddefGetData): Special case new opt flag.
      (vshCmddefHelp): Display help for argv.
      (vshCommandOptArgv): New function.
      72e884d5
  3. 13 10月, 2010 14 次提交
    • E
      virsh: update comment about parsing · 59ce32b0
      Eric Blake 提交于
      * tools/virsh.c: Update comments to match patch series.
      59ce32b0
    • E
      virsh: move code into topological order · ce828d10
      Eric Blake 提交于
      * tools/virsh.c (vshCommandParse): Float up, to avoid the need for
      a forward declaration.
      ce828d10
    • E
      virsh: simplify top-level option parsing · 5405cffc
      Eric Blake 提交于
      This makes 'virsh --conn test:///default help help' work right;
      previously, the abbreviation confused our hand-rolled option parsing.
      
      * tools/virsh.c (vshParseArgv): Use getopt_long feature, rather
      than (incorrectly) reparsing options ourselves.
      5405cffc
    • L
      virsh: add -- support · 227f5df8
      Lai Jiangshan 提交于
      "--" means no option at the following arguments.
      Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
      227f5df8
    • L
      virsh: support single quote · 57868d12
      Lai Jiangshan 提交于
      Some users may type command like this at the virsh shell:
      virsh # somecmd 'some arg'
      
      because they often use single quote in linux shell.
      Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
      57868d12
    • L
      virsh: add escaper \ for command string parsing · 52321014
      Lai Jiangshan 提交于
      add escaper \ for command string parsing, example:
      
      virsh # cd /path/which/have/a/double\"quote
      Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
      52321014
    • E
      virsh: document options in man page · 2f72becc
      Eric Blake 提交于
      * tools/virsh.pod: Document top-level options.
      2f72becc
    • L
      virsh: rework command parsing · a2943243
      Lai Jiangshan 提交于
      Old virsh command parsing mashes all the args back into a string and
      miss the quotes, this patches fix it. It is also needed for introducing
      qemu-monitor-command which is very useful.
      
      This patches uses the new vshCommandParser abstraction and adds
      vshCommandArgvParse() for arguments vector, so we don't need
      to mash arguments vector into a command sting.
      
      And the usage was changed:
      old:
      virsh [options] [commands]
      
      new:
      virsh [options]... [<command_string>]
      virsh [options]... <command> [args...]
      
      So we still support commands like:
      "define D.xml; dumpxml D" was parsed as a commands-string.
      
      and support commands like:
      we will not mash them into a string, we use new argv parser for it.
      
      But we don't support the command like:
      "define D.xml; dumpxml" was parsed as a command-name, but we have no such command-name.
      Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
      a2943243
    • L
      virsh: add vshCommandParser abstraction · a93f514f
      Lai Jiangshan 提交于
      add vshCommandParser and make vshCommandParse() accept different
      parsers.
      
      the current code for parse command string is integrated as
      vshCommandStringParse().
      Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
      a93f514f
    • L
      virsh: better handling the boolean option · 4417f08d
      Lai Jiangshan 提交于
      in old code the following commands are equivalent:
           virsh # dumpxml --update-cpu=vm1
           virsh # dumpxml --update-cpu vm1
      because the old code split the option argument into 2 parts:
      --update-cpu=vm1 is split into update-cpu and vm1,
      and update-cpu is a boolean option, so the parser takes vm1 as another
      argument, very strange.
      
      after this patch applied, the first one will become illegal.
      
      To achieve this, we don't parse/check options when parsing command sting,
      but check options when parsing a command argument. And the argument is
      not split when parsing command sting.
      Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
      4417f08d
    • L
      virsh: allow zero length arguments · cdfe543f
      Lai Jiangshan 提交于
      the following command is allowed at shell, we also make it allowed at virsh shell.
      Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
      cdfe543f
    • E
      virsh: poison raw allocation routines · d9adac3e
      Eric Blake 提交于
      * tools/virsh.c (malloc, calloc, realloc, strdup): Enforce that
      within this file, we use the safe vsh wrappers instead.
      (cmdNodeListDevices, cmdSnapshotCreate, main): Fix violations of
      this policy.
      d9adac3e
    • L
      virsh: better support double quote · ad2f1b60
      Lai Jiangshan 提交于
      In origin code, double quote is only allowed at the begin or end
      "complicated argument"
      --some_opt="complicated string"  (we split this argument into 2 parts,
      option and data, the data is "complicated string").
      
      This patch makes it allow double quote at any position of
      an argument:
      complicated" argument"
      complicated" "argument
      --"some opt=complicated string"
      
      This patch is also needed for the following patches,
      the following patches will not split option argument into 2 parts,
      so we have to allow double quote at any position of an argument.
      Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
      ad2f1b60
    • N
      Adding memtune command to virsh tool · e3e2ca77
      Nikunj A. Dadhania 提交于
      The command helps to control the memory/swap parameters for the system, for
      eg. hard_limit (max memory the vm can use), soft_limit (limit during memory
      contention), swap_hard_limit(max swap the vm can use)
      e3e2ca77
  4. 23 9月, 2010 1 次提交
    • J
      libvirt-guests: start late and stop early · c5acd376
      Jiri Denemark 提交于
      libvirt-guests init script should be started as late as possible during
      host startup and stopped as early as possible during host shutdown to
      make sure required services are already/still up and running at the time
      libvirt-guests runs.
      c5acd376
  5. 16 9月, 2010 1 次提交
  6. 14 9月, 2010 1 次提交
  7. 10 9月, 2010 1 次提交
    • J
      virsh: Option for overriding disk type in attach-disk · dfec22cc
      Jiri Denemark 提交于
      Unless --driver tap|file option was given to attach-disk, virsh would
      generate <disk type='block'> XML which might be fine for Xen but not for
      other hypervisors. This patch introduces a new option --sourcetype which
      can be used to explicitly set the type of disk source. The option
      accepts either "file" or "block" types.
      dfec22cc
  8. 07 9月, 2010 1 次提交
  9. 01 9月, 2010 2 次提交
    • R
      virsh: remove driver check from attach-disk command · 12a41822
      Ryan Harper 提交于
      Virsh shouldn't check for driver support but rather let the backend handled this.
      After removing the check, I can successfully attach file-based images to a qemu
      VM with attach-disk.
      
      % virsh attach-disk vm2 /images/test02.img vdc --driver qemu --type disk --subdriver raw
      Disk attached successfully
      
      This command generates the following XML:
      
      <disk type='block' device='disk'>
            <driver name='qemu' type='raw'/>
            <source dev='/images/test02.img'/>
            <target dev='vdc' bus='virtio'/>
            <alias name='virtio-disk2'/>
            <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
      </disk>
      Signed-off-by: NRyan Harper <ryanh@us.ibm.com>
      12a41822
    • E
      maint: track moved file · deaa9e3e
      Eric Blake 提交于
      * daemon/.gitignore: Move libvirt-guests.init...
      * tools/.gitignore: ...to its new location.
      deaa9e3e
  10. 25 8月, 2010 1 次提交
    • J
      Move libvirt-guests init script and config to tools · 2c090a55
      Jiri Denemark 提交于
      Since libvirt-guests init script and its configuration do not require
      libvirtd to be running/installed, it was a bad idea to put them into
      daemon directory. libvirt.spec even includes these files in
      libvirt-client subpackage, which may result in build failure for
      client-only builds when the whole daemon directory is just skipped.
      2c090a55
  11. 03 8月, 2010 4 次提交
  12. 21 7月, 2010 1 次提交
  13. 20 7月, 2010 4 次提交
  14. 17 7月, 2010 1 次提交
    • J
      man pages: update authors and copyright notice for libvirtd and virsh · de7d4c6a
      Justin Clift 提交于
      This patch removes the individual author names from the libvirtd and virsh
      man pages, instead referring to the main AUTHORS file distributed with
      libvirt.  This approach is needed, as we can't guarantee unicode support
      across all versions of pod2man used with libvirt.
      
      Additionally, this patch includes the libvirtd man page in the spec file
      used with "make rpm".  Without this patch "make rpm" is broken.
      de7d4c6a
  15. 16 7月, 2010 4 次提交