Monthly Archives: July 2013

Remains of the Day: Add ‘Open command window here’ context menu to any file

Command prompt here PowerToy for Windows adds ‘Open command prompt here’ context menu for every folder.
Use this registry file to add ‘Open command prompt here’ to any file context menu:


Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\Open command prompt here]

[HKEY_CLASSES_ROOT\*\shell\Open command prompt here\command]
@="cmd"

Converting a VirtualBox VM to a VMWare Workstation 7.0.1 VM

To successfully convert a VirtualBox (latest version) vm to VMWare Workstation 7.0.1 vm one should do the following:
1. In VirtualBox export vm as ovf virtual appliance without manifest file (don’t forget to check ‘ovf version 0.9’).
2. Ensure that VMWare will understand newly generated ovf file. To do it:
2.1 Edit ovf file so ‘rasd’ elements are sorted in the following order:


<Item>
<rasd:Caption>Some caption</rasd:Caption>
<rasd:Description>Some description</rasd:Description>
<rasd:InstanceId>0</rasd:InstanceId>
<rasd:ResourceType>1</rasd:ResourceType>
<rasd:ResourceSubType>2</rasd:ResourceSubType>
</Item>

2.2 Ensure that rasd:Parent elements precede rasd:AdressOnParent elements.
2.3 Change the extension of original vmdk disk files to something like ‘~vmdk’.
2.4 Check that conversion is possible using VMWare OVF Tool with the following command:


"C:Program FilesVMwareVMware OVF Toolovftool.exe" --noDisks "ODD - Source.ovf" "ODD - Source.vmx"

You should see the following output:


Opening OVF source: ODD - Source.ovf
Opening VMX target: ODD - Source.vmx
Writing VMX file: ODD - Source.vmx
Transfer Completed
Warning:
- No manifest file found.
- No manifest entry found for: 'ODD - Source-disk1.vmdk'.
- No manifest entry found for: 'ODD - Source-disk2.vmdk'.
Completed successfully

If not, the tool will report error lines. So correct errors and rerun.
2.5 Delete vmdk files generated by ovftool and change back the extension of original files.

Pitiful but OVF Tool alone cannot properly convert ovf to vmx. Disk partitions will remain read only as made by VirtualBox export process.
3. So the last thing to do is to use VMWare Converter 4.0.1 (can be downloaded following links in this post) to convert ovf to vmx changing disks types to 2 GB Split pre-allocated.

On database link naming

Name dblinks as a site it refers.
For example name it ‘subdomain.somesite.com’ and then create synonyms to objects on the site:


create synonym some_table for some_table@subdomain.somesite.com

Doing so you help other developers to decipher the site particular database link refers to without consulting all_db_links system view.