February 2010 Archives

Editing and VMX file on a virtual machine

| No Comments

Tips for editing a .vmx file

Details

I need to edit the configuration file (.vmx) for a virtual machine. Is there anything I need to know before I begin?

Solution

Some workaround procedures include steps that require you edit .vmx files.

Note the following important characteristics of this file:

  • The .vmx file is typically located in the directory where you created the virtual machine.
    • In Windows, the default location for the file is usually C:\Documents and Settings\\My Documents\My Virtual Machines\\.vmx
    • In Linux, vmware-cmd -l lists the full path to all registered .vmx files.
  • The virtual machine actively writes to its .vmx file. Never edit this file while its virtual machine is running.
  • Changes to the file are usually version specific. If you upgrade, the workaround you implemented may no longer work.

Before you edit the .vmx file:

  • Always power off the virtual machine.
  • Make sure you are logged on as a user with the correct permission level to edit the file.
  • Make a backup copy of the .vmx file. If your edits break the virtual machine, you can roll back to the original version of the file.
Also, make a backup copy of the edited file. If future administrative changes to the virtual machine overwrite your edited version, you can cut and paste the specific section you want from the backup copy into the current file. Do not replace an entire .vmx file with an older backup.
 
Important for ESX with VirtualCenter: Any manual additions to the .vmx file from ESX 3.x are overwritten by the entries stored in the VirtualCenter database.

If you need to edit a virtual machine's .vmx  file, first remove it from VirtualCenter's inventory (right-click it and choose Remove from Inventory). After you edit it, register the virtual machine again from the ESX command line using:
 
vmware-cmd -s register /vmfs/volumes/<datastore>/<virtual machine directory>/<virtual machine name>.vmx
 

The <datastore> represents the datastore name, the <virtual machine directory> represents the directory containing the virtual machine files, and <virtual machine name> represents the name of the virtual machine files.  The following is an example:

vmware-cmd -s register /vmfs/volumes/Storage1/vm1/vm1.vmx

A return code =1 signals success.

Ipod, or Iphone?

| No Comments


Turn your Ipod Touch into an Iphone (almost) with Skype, a headphone set with a microphone, and a wifi connection. Free (!) calls to anyone on your Skype contact list. Suh-weet!

Skype Ipod

Earbud Mic

Creating sockets with Python

| No Comments
Python programming language has a socket object, which you can use to build a network socket. To build a client that connects to a remote host and sends some arbitrary text, utilize the following code.

import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(('localhost', 4242))
s.send('Some Arbitrary Text')
data = s.recv(1024)
s.close()
print 'Received', 'data'

Now you can connect to this with a netcat listener:

nc -l -p 4242

You should receive "Some Arbitrary Text" as the output. Can you start to see the practical applications? :-)

Simple Tips For Better Password Security

| No Comments

About this Archive

This page is an archive of entries from February 2010 listed from newest to oldest.

January 2010 is the previous archive.

Find recent content on the main index or look in the archives to find all content.