[pve-devel] [PATCH qemu-server v6 0/5] Add qm importovf command

Emmanuel Kasper e.kasper at proxmox.com
Tue May 23 16:26:16 CEST 2017


This patch serie depends on "[PATCH qemu-server v5 0/3] Add qm importdisk command"

Changes since V5:
    * use Storage.pm package instead of Plugin/Storage.pm when calling file_size_info()
    * allow to optionally set the target disk format when importing an ovf image
    * add some sanity tests on user submitted parameters before parsing and converting
    * rename ovfimport to importovf, like most of our commands
    * import disk images referenced in the OVF file

Changes since V4:
    Improve ovfimport command:
    * make the ovf manifest a mandatory parameter
    * complete the vmid on non existing instead of existing

    Tests (suggestions from Wolfgang):
    * prepend .. to @INC so we use the local version of PVE packages
    * Add ovf_test to test target

    OVF module(suggestions from Wolgang)
    * Add a regexp to match correct characters expected in a HostResource element
    HostResources/ovf:href elements are uri paths components/url, so we test them
    with the according regexp.
    * Test if the disk image the OVF is refering to is contained in the current directory
    to prevent symlinks attacks.


Emmanuel Kasper (5):
  Force overwriting existing compressed man pages and symbolic links
  Add a build dependency to libxml-libxml-perl, needed for OVF parsing
  Initial support for importing OVF virtual machines
  Add tests for parse_ovf function
  Add a new command line option 'importovf', to create VMs from an OVF
    manifest

 Makefile                                     |   8 +-
 PVE/CLI/qm.pm                                |  69 ++++++++
 PVE/QemuServer/Makefile                      |   1 +
 PVE/QemuServer/OVF.pm                        | 236 +++++++++++++++++++++++++++
 control.in                                   |   2 +-
 test/Makefile                                |   5 +-
 test/ovf_manifests/Win10-Liz-disk1.vmdk      | Bin 0 -> 65536 bytes
 test/ovf_manifests/Win10-Liz.ovf             | 142 ++++++++++++++++
 test/ovf_manifests/Win_2008_R2_two-disks.ovf | 145 ++++++++++++++++
 test/ovf_manifests/disk1.vmdk                | Bin 0 -> 65536 bytes
 test/ovf_manifests/disk2.vmdk                | Bin 0 -> 65536 bytes
 test/run_ovf_tests.pl                        |  42 +++++
 12 files changed, 644 insertions(+), 6 deletions(-)
 create mode 100644 PVE/QemuServer/OVF.pm
 create mode 100644 test/ovf_manifests/Win10-Liz-disk1.vmdk
 create mode 100755 test/ovf_manifests/Win10-Liz.ovf
 create mode 100755 test/ovf_manifests/Win_2008_R2_two-disks.ovf
 create mode 100644 test/ovf_manifests/disk1.vmdk
 create mode 100644 test/ovf_manifests/disk2.vmdk
 create mode 100755 test/run_ovf_tests.pl

-- 
2.11.0





More information about the pve-devel mailing list