1. 11 7月, 2016 3 次提交
    • F
      bhyve: implement bhyve argument parser · 8151b300
      Fabian Freyer 提交于
      A simpe getopt-based argument parser is added for the /usr/sbin/bhyve command,
      loosely based on its argument parser, which reads the following from the bhyve
      command line string:
      
      * vm name
      * number of vcpus
      * memory size
      * the time offset (UTC or localtime)
      * features:
        * acpi
        * ioapic: While this flag is deprecated in FreeBSD r257423, keep checking for
          it for backwards compatibiility.
      * the domain UUID; if not explicitely given, one will be generated.
      * lpc devices: for now only the com1 and com2 are supported. It is required for
         these to be /dev/nmdm[\d+][AB], and the slave devices are automatically
         inferred from these to be the corresponding end of the virtual null-modem
         cable: /dev/nmdm<N>A <-> /dev/nmdm<N>B
      * PCI devices:
        * Disks: these are numbered in the order they are found, for virtio and ahci
          disks separately. The destination is set to sdX or vdX with X='a'+index;
          therefore only 'z'-'a' disks are supported.
          Disks are considered to be block devices if the path
          starts with /dev, otherwise they are considered to be files.
        * Networks: only tap devices are supported. Since it isn't possible to tell
          the type of the network, VIR_DOMAIN_NET_TYPE_ETHERNET is assumed, since it
          is the most generic. If no mac is specified, one will be generated.
      Signed-off-by: NFabian Freyer <fabian.freyer@physik.tu-berlin.de>
      8151b300
    • F
      bhyve: implement virConnectDomainXMLFromNative · 01163b1b
      Fabian Freyer 提交于
      First, remove escaped newlines and split up the string into an argv-list for
      the bhyve and loader commands, respectively. This is done by iterating over the
      string splitting it by newlines, and then re-iterating over each line,
      splitting it by spaces.
      
      Since this code reuses part of the code of qemu_parse_command.c
      (in bhyveCommandLine2argv), add the appropriate copyright notices.
      Signed-off-by: NFabian Freyer <fabian.freyer@physik.tu-berlin.de>
      01163b1b
    • F
      gnulib: add getopt module · b436a8ae
      Fabian Freyer 提交于
      Unconditionally use gnulib's getopt module. This is needed by the bhyve driver
      to provide a reentrant interface for getopt.
      
      Several gnulib headers rely on features.h being included by ctype.h to provide
      __GNUC_PREREQ, but on systems without glibc, this is not provided. In these
      cases __GNUC_PREREQ gets redefined to 0, which causes build errors from checks
      in src/internal.h.
      Therefore, define __GNUC_PREREQ as early as possible. config-post.h is probably
      the first header that is included, before any other headers.
      b436a8ae
  2. 09 7月, 2016 4 次提交
  3. 08 7月, 2016 2 次提交
  4. 07 7月, 2016 14 次提交
  5. 04 7月, 2016 9 次提交
  6. 02 7月, 2016 8 次提交
    • L
      qemu: support setting host-side IP addresses/routes · fe8567f6
      Laine Stump 提交于
      For type='ethernet' interfaces only.
      
      (This patch had been pushed earlier in
      commit 0b4645a7, but was reverted in
      commit 84d47a3c because it had been
      accidentally pushed during the freeze for release 2.0.0)
      fe8567f6
    • L
      lxc: support setting host-side IP addresses/routes · 18792027
      Laine Stump 提交于
      (This patch had been pushed earlier in
      commit cd5c9f21, but was reverted in
      commit 1549f168 because it had been
      accidentally pushed during the freeze for release 2.0.0)
      18792027
    • L
      util: support setting peer for virNetDevIPInfo addresses · d83cac49
      Laine Stump 提交于
      This will apply to any IP address setting that uses
      virNetDevIPInfoAddToDev() (which so far is only the guest-side of LXC
      type='ethernet' interfaces).
      
      (This patch had been pushed earlier in
      commit cb20f989, but was reverted in
      commit cba06aea because it had been
      accidentally pushed during the freeze for release 2.0.0)
      d83cac49
    • L
      conf: support host-side IP/route information in <interface> · 98fa8f3e
      Laine Stump 提交于
      This is place as a sub-element of <source>, where other aspects of the
      host-side connection to the network device are located (network or
      bridge name, udp listen port, etc). It's a bit odd that the interface
      we're configuring with this info is itself named in <target dev='x'/>,
      but that ship sailed long ago:
      
          <interface type='ethernet'>
            <mac address='00:16:3e:0f:ef:8a'/>
            <source>
              <ip address='192.168.122.12' family='ipv4'
                  prefix='24' peer='192.168.122.1'/>
              <ip address='192.168.122.13' family='ipv4' prefix='24'/>
              <route family='ipv4' address='0.0.0.0'
                     gateway='192.168.122.1'/>
              <route family='ipv4' address='192.168.124.0' prefix='24'
                     gateway='192.168.124.1'/>
            </source>
          </interface>
      
      In practice, this will likely only be useful for type='ethernet', so
      its presence in any other type of interface is currently forbidden in
      the generic device Validate function (but it's been put into the
      general population of virDomainNetDef rather than the
      ethernet-specific union member so that 1) we can more easily add the
      capability to other types if needed, and 2) we can retain the info
      when set to an invalid interface type all the way through to
      validation and report a proper error, rather than just ignoring it
      (which is currently what happens for many other type-specific
      settings).
      
      (NB: The already-existing configuration of IP info for the guest-side
      of interfaces is in subelements directly under <interface>, and the
      name of the guest-side interface (when configurable) is in <guest
      dev='x'/>).
      
      (This patch had been pushed earlier in
      commit fe6a7789, but was reverted in
      commit d6584565 because it had been
      accidentally pushed during the freeze for release 2.0.0)
      98fa8f3e
    • V
      conf: allow setting peer address in <ip> element of <interface> · b81cf13e
      Vasiliy Tolstov 提交于
      The peer attribute is used to set the property of the same name in the
      interface IP info:
      
        <interface type='ethernet'>
          ...
          <ip family='ipv4' address='192.168.122.5'
              prefix='32' peer='192.168.122.6'/>
          ...
        </interface>
      
      Note that this element is used to set the IP information on the
      *guest* side interface, not the host side interface - that will be
      supported in an upcoming patch.
      
      (This patch now has quite a history: it was originally pushed in
      commit 690969af, which was subsequently reverted in commit 1d14b13f,
      then reworked and pushed (along with a lot of other related/supporting
      patches) in commit 93135abf; however *that* commit had been
      accidentally pushed during dev. freeze for release 2.0.0, so it was
      again reverted in commit f6acf039).
      Signed-off-by: NVasiliy Tolstov <v.tolstov@selfip.ru>
      Signed-off-by: NLaine Stump <laine@laine.org>
      b81cf13e
    • L
      util: new function virNetDevIPInfoAddToDev · 95309424
      Laine Stump 提交于
      This patch takes the code out of
      lxcContainerRenameAndEnableInterfaces() that adds all IP addresses and
      IP routes to the interface, and puts it into a utility function
      virNetDevIPInfoAddToDev() in virnetdevip.c so that it can be used by
      anyone.
      
      One small change in functionality -
      lxcContainerRenameAndEnableInterfaces() previously would add all IP
      addresses to the interface while it was still offline, then set the
      interface online, and then add the routes. Because I don't want the
      utility function to set the interface online, I've moved this up so
      the interface is first set online, then IP addresses and routes are
      added. This is the same order that the network service from
      initscripts (in ifup-ether) does it, so it shouldn't pose any problem
      (and hasn't, in the tests that I've run).
      
      (This patch had been pushed earlier in commit
      f1e0d0da, but was reverted in commit
      05eab475 because it had been
      accidentally pushed during the freeze for release 2.0.0)
      95309424
    • J
      qemu: Introduce helper qemuDomainSecretDiskCapable · 60c40ce3
      John Ferlan 提交于
      Introduce a helper to help determine if a disk src could be possibly used
      for a disk secret... Going to need this for hot unplug.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      60c40ce3
    • J
      encryption: Add <cipher> and <ivgen> to encryption · 2552fec2
      John Ferlan 提交于
      For a luks device, allow the configuration of a specific cipher to be
      used for encrypting the volume.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      2552fec2