1. 12 4月, 2016 1 次提交
  2. 27 1月, 2016 1 次提交
    • P
      device: cleanup input device code · 36785c7e
      Pavel Hrdina 提交于
      The current code was a little bit odd.  At first we've removed all
      possible implicit input devices from domain definition to add them later
      back if there was any graphics device defined while parsing XML
      description.  That's not all, while formating domain definition to XML
      description we at first ignore any input devices with bus different to
      USB and VIRTIO and few lines later we add implicit input devices to XML.
      
      This seems to me as a lot of code for nothing.  This patch may look
      to be more complicated than original approach, but this is a preferred
      way to modify/add driver specific stuff only in those drivers and not
      deal with them in common parsing/formating functions.
      
      The update is to add those implicit input devices into config XML to
      follow the real HW configuration visible by guest OS.
      
      There was also inconsistence between our behavior and QEMU's in the way,
      that in QEMU there is no way how to disable those implicit input devices
      for x86 architecture and they are available always, even without graphics
      device.  This applies also to XEN hypervisor.  VZ driver already does its
      part by putting correct implicit devices into live XML.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      36785c7e
  3. 25 1月, 2016 1 次提交
  4. 17 9月, 2015 1 次提交
    • M
      vmx: Expose datacenter path in domain XML · 636a9905
      Matthias Bolte 提交于
      Tool such as libguestfs need the datacenter path to get access to disk
      images. The ESX driver knows the correct datacenter path, but this
      information cannot be accessed using libvirt API yet. Also, it cannot
      be deduced from the connection URI in a robust way.
      
      Expose the datacenter path in the domain XML as <vmware:datacenterpath>
      node similar to the way the <qemu:commandline> node works. The new node
      is ignored while parsing the domain XML. In contrast to <qemu:commandline>
      it is output only.
      636a9905
  5. 08 9月, 2015 1 次提交
  6. 08 1月, 2015 1 次提交
    • G
      vmx: Fix a VMX parsing problem · bb072e8a
      Geoff Hickey 提交于
      VMware ESX does not always set the "serialX.fileType" tag in VMX files. The
      default value for this tag is "device", and when adding a new serial port
      of this type VMware will omit the fileType tag. This caused libvirt to
      fail to parse the VMX file. Fixed by making this tag optional and using
      "device" as a default value. Also updated vmx2xmltest to test for this
      case.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      bb072e8a
  7. 19 2月, 2014 1 次提交
  8. 21 1月, 2014 1 次提交
  9. 15 10月, 2013 1 次提交
    • G
      esx: Fix floppy.fileName handling in the vmx file parser · 842f6fd3
      Geoff Hickey 提交于
      The vmx file parsing code was reporting errors when parsing floppy.fileName
      entries if the filename didn't end in .flp. There is no such restriction in
      ESX; even using the GUI to configure floppy filenames you can specify any
      arbitrary file with any extension.
      
      Fix by changing the vmx parsing code so that it uses the floppy.fileType
      value to determine whether floppy.fileName refers to a block device or a
      regular file.
      
      Also remove code that would have generated an error if no floppy.fileName
      was specified. This is not an error either.
      
      Updated the floppy tests in vmx2xmltest.c and xml2vmxtest.c.
      842f6fd3
  10. 18 9月, 2013 2 次提交
    • D
      VMX: Add a VMWare Fusion 5 configuration for tests · 7ab7c9a2
      Doug Goldstein 提交于
      A user was having an issue with this specific VMWare Fusion config and
      he gave me permission to add it as part of our test suite to further
      expand our VMX test coverage. Unfortunately our VMX parser and
      generator does not support many features contained within and just
      silently ignores fields it does not understand so they had to
      be removed out in the xml2vmx test. The original unmodified version
      exists in the vmx2xml test.
      7ab7c9a2
    • D
      VMX: Add support for 'auto detect' fileNames · 834aebcc
      Doug Goldstein 提交于
      VMWare Fusion 5 can set the CD-ROM's device name to be 'auto detect' when
      using the physical drive via 'cdrom-raw' device type. VMWare will then
      connect to first available host CD-ROM to the virtual machine upon start
      up according to VMWare documentation. If no device is available, it
      appears that the device will remain disconnected.
      
      To better model this a CD-ROM that is marked as "auto detect" when in
      the off state would be modeled as the following with this patch:
        <disk type='block' device='lun'>
          <source startupPolicy='optional'/>
          <target dev='hda' bus='ide'/>
          <address type='drive' controller='0' bus='0' target='0' unit='0'/>
        </disk>
      
      Once the domain transitions to the powered on state, libvirt can
      populate the remaining source data with what is connected, if anything.
      However future power cycles, the domain may not always start with that
      device attached.
      834aebcc
  11. 03 9月, 2013 1 次提交
    • D
      VMX: Add cdrom-raw dev type from VMWare Fusion · f8456e5a
      Doug Goldstein 提交于
      According to VMWare's documentation 'cdrom-raw' is an acceptable value
      for deviceType for a CD-ROM drive. The documentation states that the VMX
      configuration for a CD-ROM deviceType is as follows:
      
      ide|scsi(n):(n).deviceType = "cdrom-raw|atapi-cdrom|cdrom-image"
      
      From the documentation it appears the following is true:
      - cdrom-image = Provides the ISO to the VM
      - atapi-cdrom = Provides a NEC emulated ATAPI CD-ROM on top of the host
        CD-ROM
      - cdrom-raw = Passthru for a host CD-ROM drive. Allows CD-R burning from
        within the guest.
      
      A CD-ROM prior to this patch would always provide an 'atapi-cdrom' is
      modeled as:
        <disk type='block' device='cdrom'>
          <source dev='/dev/scd0'/>
          <target dev='hda' bus='ide'/>
          <address type='drive' controller='0' bus='0' target='0' unit='0'/>
        </disk>
      
      This patch allows the 'device' attribute to be set to 'lun' for a raw
      acccess CD-ROM such as:
        <disk type='block' device='lun'>
          <source dev='/dev/scd0'/>
          <target dev='hda' bus='ide'/>
          <address type='drive' controller='0' bus='0' target='0' unit='0'/>
        </disk>
      f8456e5a
  12. 22 7月, 2012 1 次提交
  13. 09 5月, 2012 1 次提交
    • O
      numad: Always output 'placement' of <vcpu> · d70f2e11
      Osier Yang 提交于
      <vcpu> is not an optional node. The value for its 'placement'
      actually always defaults to 'static' in the underlying codes.
      (Even no 'cpuset' and 'placement' is specified, the domain
      process will be pinned to all the available pCPUs).
      d70f2e11
  14. 08 3月, 2012 1 次提交
    • E
      xml: output memory unit for clarity · 26545784
      Eric Blake 提交于
      Make it obvious to 'dumpxml' readers what unit we are using,
      since our default of KiB for memory (1024) differs from qemu's
      default of MiB; and differs from our use of bytes for storage.
      
      Tests were updated via:
      
      $ find tests/*data tests/*out -name '*.xml' | \
        xargs sed -i 's/<\(memory\|currentMemory\|hard_limit\|soft_limit\|min_guarantee\|swap_hard_limit\)>/<\1 unit='"'KiB'>/"
      $ find tests/*data tests/*out -name '*.xml' | \
        xargs sed -i 's/<\(capacity\|allocation\|available\)>/<\1 unit='"'bytes'>/"
      
      followed by a few fixes for the stragglers.
      
      Note that with this patch, the RNG for <memory> still forbids
      validation of anything except unit='KiB', since the code silently
      ignores the attribute; a later patch will expand <memory> to allow
      scaled input in the code and update the RNG to match.
      
      * docs/schemas/basictypes.rng (unit): Add 'bytes'.
      (scaledInteger): New define.
      * docs/schemas/storagevol.rng (sizing): Use it.
      * docs/schemas/storagepool.rng (sizing): Likewise.
      * docs/schemas/domaincommon.rng (memoryKBElement): New define; use
      for memory elements.
      * src/conf/storage_conf.c (virStoragePoolDefFormat)
      (virStorageVolDefFormat): Likewise.
      * src/conf/domain_conf.h (_virDomainDef): Document unit used
      internally.
      * src/conf/storage_conf.h (_virStoragePoolDef, _virStorageVolDef):
      Likewise.
      * tests/*data/*.xml: Update all tests.
      * tests/*out/*.xml: Likewise.
      * tests/define-dev-segfault: Likewise.
      * tests/openvzutilstest.c (testReadNetworkConf): Likewise.
      * tests/qemuargv2xmltest.c (blankProblemElements): Likewise.
      26545784
  15. 28 2月, 2012 1 次提交
    • O
      conf: Introduce new attribute for device address format · 4288b22f
      Osier Yang 提交于
      * src/conf/domain_conf.h: Add new member "target" to struct
        _virDomainDeviceDriveAddress.
      
      * src/conf/domain_conf.c: Parse and format "target"
      
      * Lots of tests (.xml) in tests/domainsnapshotxml2xmlout,
        tests/qemuxml2argvdata, tests/qemuxml2xmloutdata, and
        tests/vmx2xmldata/ are modified for newly introduced
        attribute "target" for address of "drive" type.
      4288b22f
  16. 24 2月, 2012 1 次提交
    • J
      vmx: Better Workstation vmx handling · f246cdb5
      Jean-Baptiste Rouault 提交于
      This patch adds support for vmx files with empty networkName
      values (which is the case for vmx generated by Workstation).
      It also adds support for vmx containing NATed network interfaces.
      
      Update test suite accordingly
      f246cdb5
  17. 27 5月, 2011 1 次提交
    • M
      esx: Fix regression in absolute file name handling · 8357d91b
      Matthias Bolte 提交于
      Before commit 145d6cb0 (in August 2010) absolute file names
      in VMX and domain XML configs were handled correctly. But this got
      lost during the refactoring. The test cases didn't highlight this
      problem because they have their own set of file name handling
      functions. The actual ones require a real connection to an ESX
      server. Also the test case functions always worked correctly.
      
      Fix the regression and add a new in-the-wild VMX file that contains
      such a problematic absolute path. Even though this test case won't
      protect against new regressions.
      
      Reported by lofic (IRC nick)
      8357d91b
  18. 05 4月, 2011 1 次提交
  19. 07 1月, 2011 1 次提交
  20. 12 11月, 2010 1 次提交
  21. 10 11月, 2010 1 次提交
  22. 02 10月, 2010 1 次提交
    • M
      esx: Add support for virtual serial device network backing · 02e11b83
      Matthias Bolte 提交于
      Since version 4.1 ESX(i) can expose virtual serial devices over TCP.
      
      Add support in the VMX handling code for this, add test cases to cover
      it and add links to some documentation.
      
      ESX supports two additional protocols: TELNETS and TLS. Add them to
      the list of serial-over-TCP protocols.
      02e11b83
  23. 23 9月, 2010 1 次提交
  24. 31 8月, 2010 1 次提交
  25. 29 7月, 2010 1 次提交
    • C
      domain conf: Track <console> target type · 6b247552
      Cole Robinson 提交于
      All <console> devices now export a <target> type attribute. QEMU defaults
      to 'serial', UML defaults to 'uml, xen can be either 'serial' or 'xen'
      depending on fullvirt. Understandably there is lots of test fallout.
      
      This will be used to differentiate between a serial vs. virtio console for
      QEMU.
      Signed-off-by: NCole Robinson <crobinso@redhat.com>
      6b247552
  26. 24 7月, 2010 1 次提交
  27. 24 6月, 2010 1 次提交
    • M
      esx: Add support for the controller element · d72d9256
      Matthias Bolte 提交于
      Also don't abuse the disk driver name to specify the SCSI controller
      model anymore:
      
        <driver name='buslogic'/>
      
      Use the newly added model attribute of the controller element for this:
      
        <controller type='scsi' index='0' model='buslogic'/>
      
      The disk driver name approach is deprecated now, but still works for
      backward compatibility reasons.
      
      Update the documentation and tests accordingly.
      
      Fix usage of the words controller and id in the VMX handling code. Use
      controller, bus and unit properly.
      d72d9256
  28. 17 6月, 2010 1 次提交
  29. 21 4月, 2010 1 次提交
  30. 08 4月, 2010 1 次提交
    • M
      esx: Allow 'lsisas1068' as SCSI controller type · 4acab37f
      Matthias Bolte 提交于
      Extend tests to cover all SCSI controller types and document the
      new type.
      
      The lsisas1068 SCSI controller type was added in ESX 4.0. The VMX
      parser reports an error when this controller type is present. This
      makes virsh dumpxml fail for every domain that uses this controller
      type.
      
      This patch fixes this and adds lsisas1068 to the list of accepted
      SCSI controller types.
      
      Reported by Jonathan Kelley.
      4acab37f
  31. 25 3月, 2010 1 次提交
  32. 18 1月, 2010 1 次提交
    • M
      esx: Add VNC support · c2c4d51b
      Matthias Bolte 提交于
      * src/conf/domain_conf.c: add defaults for the video device
      * src/esx/esx_vmx.[ch]: add VNC support to the VMX handling
      * tests/vmx2xmltest.c, tests/xml2vmxtest.c: add tests for the VNC support
      c2c4d51b
  33. 07 1月, 2010 1 次提交
    • M
      esx: Fix 'vpx' MAC address range and allow arbitrary MAC addresses · 96ceb124
      Matthias Bolte 提交于
      The MAC addresses with 00:50:56 prefix are split into several ranges:
      
        00:50:56:00:00:00 - 00:50:56:3f:ff:ff  'static' range (manually assigned)
        00:50:56:80:00:00 - 00:50:56:bf:ff:ff  'vpx' range (assigned by a VI Client)
      
      Erroneously the 'vpx' range was assumed to be larger and to occupy the
      remaining addresses of the 00:50:56 prefix that are not part of the 'static'
      range.
      
      00:50:56 was used as prefix for generated MAC addresses, this is not possible
      anymore, because there are gaps in the allowed ranges. Therefore, change the
      prefix to 00:0c:29 which is the prefix for auto generated MAC addresses anyway.
      
      Allow arbitrary MAC addresses to be used and set the checkMACAddress VMX option
      to false in case the MAC address doesn't fall into any predefined range.
      
      * docs/drvesx.html.in: update website accordingly
      * src/esx/esx_driver.c: set the auto generation prefix to 00:0c:29
      * src/esx/esx_vmx.c: fix MAC address range handling and allow arbitrary MAC
        addresses
      * tests/vmx2xml*, tests/xml2vmx*: add some basic MAC address range tests
      96ceb124
  34. 23 9月, 2009 2 次提交
    • M
      ESX add esxDomainDefineXML() · 49faa15e
      Matthias Bolte 提交于
      A given domain XML gets converted to a VMX config, uploaded to the host
      and registered as new virtual machine.
      
      * src/esx/esx_driver.c: refactor datastore related path parsing into
        esxUtil_ParseDatastoreRelatedPath()
      * src/esx/esx_util.[ch]: add esxUtil_ParseDatastoreRelatedPath()
      * src/esx/esx_vi.[ch]: add esxVI_Context_UploadFile(), add datastores to
        the traversal in esxVI_BuildFullTraversalSpecList(), add
        esxVI_LookupDatastoreByName()
      * src/esx/esx_vi_methods.[ch]: add esxVI_RegisterVM_Task()
      * src/esx/esx_vi_types.c: make some error message more verbose
      * src/esx/esx_vmx.[ch]: add esxVMX_AbsolutePathToDatastoreRelatedPath()
        to convert a path into a datastore related path, add esxVMX_ParseFileName()
        to convert from VMX path format to domain XML path format, extend the other
        parsing function to be datastore aware, add esxVMX_FormatFileName() to
        convert from domain XML path format to VMX path format, fix VMX ethernet
        entry formating
      * tests/esxutilstest.c: add test for esxUtil_ParseDatastoreRelatedPath()
      * tests/vmx2xmldata/*: update domain XML files to use datastore related paths
      * tests/xml2vmxdata/*: update domain XML files to use datastore related paths,
        update VMX files to use absolute paths
      49faa15e
    • M
      ESX add tests for the VMX to/from domain XML mapping · af4c893e
      Matthias Bolte 提交于
      * tests/.gitignore: ignore new test binaries
      * tests/Makefile.am: add new tests
      * tests/esxutilstest.c: test esxVMX_IndexToDiskName()
      * tests/vmx2xmldata/*: config files for the VMX to domain XML test
      * tests/vmx2xmltest.c: test the VMX to domain XML mapping
      * tests/xml2vmxdata/*: config files for the domain XML to VMX test
      * tests/xml2vmxtest.c: test the domain XML to VMX mapping
      af4c893e