mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-5883 Convert ovf file to proper format for ESXi
This commit is contained in:
parent
98e529af41
commit
794d47c5f2
|
|
@ -92,7 +92,11 @@ echo "$appliance exported for KVM: dist/$appliance-$build_date-$branch-kvm.qcow2
|
|||
vboxmanage clonehd $hdd_uuid $appliance-$build_date-$branch-vmware.vmdk --format VMDK
|
||||
bzip2 $appliance-$build_date-$branch-vmware.vmdk
|
||||
echo "$appliance exported for VMWare: dist/$appliance-$build_date-$branch-vmware.vmdk.bz2"
|
||||
vboxmanage export $machine_uuid --output $appliance-$build_date-$branch-vmware.ova
|
||||
vboxmanage export $machine_uuid --output $appliance-$build_date-$branch-vmware.ovf
|
||||
mv $appliance-$build_date-$branch-vmware.ovf $appliance-$build_date-$branch-vmware.ovf-orig
|
||||
xsltproc convert_ovf_vbox_to_esx.xslt $appliance-$build_date-$branch-vmware.ovf-orig > $appliance-$build_date-$branch-vmware.ovf
|
||||
tar -cf $appliance-$build_date-$branch-vmware.ova $appliance-$build_date-$branch-vmware.ovf $appliance-$build_date-$branch-vmware-disk1.vmdk
|
||||
rm -f $appliance-$build_date-$branch-vmware.ovf $appliance-$build_date-$branch-vmware.ovf-orig $appliance-$build_date-$branch-vmware-disk1.vmdk
|
||||
echo "$appliance exported for VMWare: dist/$appliance-$build_date-$branch-vmware.ova"
|
||||
|
||||
# Export for HyperV
|
||||
|
|
|
|||
|
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ovf="http://www.vmware.com/schema/ovf/1/envelope" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:vbox="http://www.virtualbox.org/ovf/machine">
|
||||
|
||||
<xsl:template match="node()|@*">
|
||||
<xsl:copy>
|
||||
<xsl:apply-templates select="node()|@*"/>
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="vssd:VirtualSystemType/text()">vmx-06</xsl:template>
|
||||
|
||||
<xsl:template match="ovf:Item[./rasd:ResourceType/text()=20]">
|
||||
<ovf:Item>
|
||||
<xsl:copy-of select="rasd:Address"/>
|
||||
<xsl:copy-of select="rasd:BusNumber"/>
|
||||
<rasd:Caption>scsiController0</rasd:Caption>
|
||||
<rasd:Description>SCSI Controller</rasd:Description>
|
||||
<xsl:copy-of select="rasd:InstanceId"/>
|
||||
<rasd:ResourceSubType>lsilogic</rasd:ResourceSubType>
|
||||
<rasd:ResourceType>6</rasd:ResourceType>
|
||||
</ovf:Item>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
Loading…
Reference in New Issue