Title: Ova to vmx
Date: 2013-09-12 17:00

I was having some issues with WiFi gear in [virtualbox](https://www.virtualbox.org/), so I decided to give
a chance to [VMWare Player](https://www.vmware.com/go/downloadplayer).

I exported my VM in the <abbr title="Open Virtualization Archive">ova</abbr> format, and tried to import it from VMWare.

```
glibmm:
unhandled exception (type std::exception) in signal handler:
what: basic_string::_S_create
[1]    12441 abort (core dumped)  vmplayer
```

Okay, no luck.
I exported it in ovf (Open Virtualisation Format).

```bash
$ ovftool client-linux.ovf output.vmx
Opening OVF source: client-linux.ovf
Opening VMX target: output.vmx
Error:
- Line 41: Unsupported element 'Description'
- Line 42: Unsupported element 'InstanceId'
- Line 43: Unsupported element 'ResourceType'
- Line 44: Unsupported element 'VirtualQuantity'
- Line 38: Missing child element 'InstanceID'.
- Line 38: Missing child element 'ResourceType'.
[…]
- Line 113: Unsupported element 'Parent'
- Line 114: Unsupported element 'ResourceType'
- Line 107: Missing child element 'InstanceID'.
- Line 107: Missing child element 'ResourceType'.
Warning:
- No manifest file found.
- Wrong file size specified in OVF descriptor for 'client-linux-disk1.vmdk' (specified: -1, actual 3506567680).
Completed with errors
```

Oooooookay.

It seems that for VMWare, in XML, the order matters. Who the fuck thought that this was a good idea?!
You can either edit your ovf file by hand, and put fields in this order:

1. Caption
2. Description
3. InstanceId
4. ResourceType
5. ResourceSubType

Or, you can use the __--lax__ option, as in

```bash
$ ovftool --lax client-linux.ovf output.vmx
```
