Question

When building an OVF, you can specify a tag for VirtualSystemCollection that allows you to have multiple VMs to share the same base disk image, but any changes that the individual machines make are Copy-On-Write into a private disk area for each specific VM.

When you try to deploy images setup this way to EXSi, it complains Unsupported element 'VirtualSystemCollection'. It would appear that you need the commercial vCenter or vApp servers from VMWare to utilize this feature. (From what I've been able to grok so far)

Is there a way to do this through free software (Free like ESXi, or opensource)

The ultimate goal is that I want to have a single disk image that's used as a base - and to bring up a cluster of VMs that are then individually configured so that for a VM with a 500 meg disk, I only need '500M + (num_vms * delta_per_vm)' rather than '500M * num_vms'

Was it helpful?

Solution

An ESXi connected to a vCenter should support this via vApps but since you wanted a non-commercial solution, the closest things is to use VirtualBox.

The open source VirtualBox has multi-attach support to achieve this with different disk formats and it works very well. It also has special qcow, qemu copy on write disk support. Basically, you create a master disk and attach to multiple VMs. (Huge disk space saving.)

It can also happily import multiple VMs from a single OVA file with VirtualSystemCollection but unfortunately, it still requires manual intervention to tell VirtualBox that disks are shared after importing all the VMs. (Well, it defeats the appliance deployement in the first place...)

After creating master disk (or after deployment), attaching to multiple VMs can be done with GUI or with the following command:

 VBoxManage storageattach "vm-name" --storagectl "sata1" --port 0 --device 0 --type hdd --medium base.vdi --mtype multiattach

For more information, see http://www.electricmonk.nl/log/2011/09/24/multiple-virtualbox-vms-using-one-base-image-copy-on-write/ and http://virtbjorn.blogspot.com.tr/2012/12/virtualbox-multi-attach-disk.html

If you really want to use VMWare ESXi, you can use data deduplication to achieve the same task on block level. (which is generally used with cloud hosting companies). You can see the deduplication success rates with open source tools here: http://opendedup.org/deduprates

OTHER TIPS

In VMware products, a multi-tier appliance (VirtualSystemCollection) is called a vApp. In vSphere, vApps live in vCenter and not ESX. So yes, you need vCenter to import a VirtualSystemCollection.

If you are using Workstation, you can also try the free vApprun tool: https://labs.vmware.com/flings/vapprun

Here is what I did successfully to have such OVF images imported into my free ESXi server. In the OVF file a XML element VirtualSystemCollection defines the vApp. You can manually edit the OVF file and remove or comment this part as shown bellow. This will allow to import the VM into ESXi without vCenter once the OVF image is converted using VMware OVF Tool.

   <!-- ovf:VirtualSystemCollection ovf:id="dummy-id">
        <ovf:Info>A collection of virtual machines</ovf:Info>
        <ovf:Name>dummy-name</ovf:Name>
        <ovf:StartupSection>
            <ovf:Info>VApp startup section</ovf:Info>
            <ovf:Item ovf:id="dummy-id" ovf:order="0" ovf:startAction="powerOn" ovf:startDelay="0" ovf:stopAction="powerOff" ovf:stopDelay="0"/>
        </ovf:StartupSection-->

Keep the remaining part intact and remove the following line at the end.

</ovf:VirtualSystemCollection>

Also make sure you have the last ESXi Embedded Host Client installed to avoid other bug related problems during import. https://labs.vmware.com/flings/esxi-embedded-host-client

Converting OVF to VMX can be done using VMWare OVF Tool. In command line it looks simply as following:

ovftool <path_to_source>/<myvm>.ovf <path_to_target>/<myvm>.vmx
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top