Thursday, April 14, 2011

Change Network Settings In VMWare Fusion

If you want to change the Subnets used by VMWare Fusion, there seems to be no way in the GUI. So you have to do it form the command-line. Here's how I changed the subnet used by my VMWare Fusion on my MacBook.

  1. Open Terminal, or X11 to access the Mac OS command-line and enter the following commands:
    cd /Library/Application\ Support/VMware\ Fusion/
    sudo ./vmnet-cli --stop

    Stopped DHCP service on vmnet1
    Disabled hostonly virtual adapter on vmnet1
    Stopped DHCP service on vmnet8
    Stopped NAT service on vmnet8
    Disabled hostonly virtual adapter on vmnet8
    Stopped all configured services on all networks
    sudo cp -p locations locations.old
  2. Edit the locations file with your favorite editor:
    sudo vi locations
  3. Change the subnet highlighted in yellow to whatever subnet you need to use.
    remove_answer VNET_8_HOSTONLY_HOSTADDR
    remove_answer VNET_8_HOSTONLY_NETMASK
    remove_answer VNET_8_NAT
    answer VNET_8_NAT yes
    remove_answer VNET_8_DHCP
    answer VNET_8_DHCP yes
  4. Save the locations file with your updates.
  5. Use vmnet-cli to re-configure and re-start the network.
    sudo ./vmnet-cli --configure
    Stopped all configured services on all networks
    Restored network settings
    sudo ./vmnet-cli --start
    Started DHCP service on vmnet1
    Enabled hostonly virtual adapter on vmnet1
    Started DHCP service on vmnet8
    Started NAT service on vmnet8
    Enabled hostonly virtual adapter on vmnet8
    Started all configured services on all networks
  6. And your subnet should be updated!

Friday, April 8, 2011

Use vmrun Command-Line for VMWare Fusion on Mac OS X

I discovered the vmrun command today and thought I would share what I learned.

  1. Open a Terminal, X-Window or your favorite command shell program on your Mac. Paste the following into your Terminal, including the quotes:
    "/Library/Application Support/VMware Fusion/vmrun"
  2. The vmrun command will display usage instructions. Here are the commands I use most:
    ----------------         ----------           -----------
    list                                          List all running VMs
    --------------           ----------           -----------
    start                    Path to vmx file     Start a VM or Team
    stop                     Path to vmx file     Stop a VM or Team
    reset                    Path to vmx file     Reset a VM or Team
    suspend                  Path to vmx file     Suspend a VM or Team
    pause                    Path to vmx file     Pause a VM
    unpause                  Path to vmx file     Unpause a VM
  3. Here is how I start my NetApp Data ONTAP 8.0.1 7-Mode Simulator
    vmrun start "/Users/lab/Documents/Virtual Machines.localized/7M/DataONTAP.vmx"

Tuesday, April 5, 2011

Data ONTAP 8.0.1 7-Mode Simulator

NetApp provides a simulator for their Data ONTAP operating system that provides most of the same functionality as Data ONTAP on a NetApp storage system. This article includes some basic tips to get you started with the ONTAP 8 7-Mode Simulator.

  1. First, if you haven't already, you will need to register for a NetApp support account.
  2. Download Data ONTAP 8 7-Mode Simulator from
  3. Unzip the file and edit the file in the 7M folder called "DataONTAP.vmx". You can change the name of the Virtual Machine by changing this line:
    displayName = "YOUR PREFERRED NAME HERE"
  4. From VMWare Fusion or Workstation, use File->Open to open the file in the 7M folder called "DataONTAP.vmx".
  5. The Data ONTAP Simulator VM should start as soon as you click open.
    Press a key besides enter when you see the following prompt:
    Hit [Enter] to boot immediately, or any other key for command prompt.
    This should bring you to the loader prompt where you can set a unique serial number and system id.
    SIMLOADER> set bootarg.nvram.sysid=1111111101
    SIMLOADER> set SYS_SERIAL_NUM=1111111101
    SIMLOADER> set MOBO_SERIAL_NUM=1111111101
    SIMLOADER> boot
  6. Press Control-C when you see the following prompt:
    * Press Ctrl-C for Boot Menu. *
  7. You should see "Boot Menu will be available".
  8. Choose option 4 from the boot menu:
    Please choose one of the following:
    (1) Normal Boot.
    (2) Boot without /etc/rc.
    (3) Change password.
    (4) Clean configuration and initialize all disks.
    (5) Maintenance mode boot.
    (6) Update flash from backup config.
    (7) Install new software first.
    (8) Reboot node.
    Selection (1-8)? 4
  9. Answer "y" to both of the following questions:
    Zero disks, reset config and install a new file system?: y
    This will erase all the data on the disks, are you sure?: y
  10. The simulator will reboot, and initialize all disks.
  11. After disk initialization completes, you will be prompted for simulator configuration information. Here is an example of how I setup my Simulator:
    Please enter the new hostname []: simulator
  12. I suggest answering yes when you are prompted about interface groups and configure a virtual interface called "vif0" as follows:
    Do you want to configure interface groups? [n]: y
    Number of interface groups to configure? [1] 1
    Name of interface group #1 []: vif0
    Is vif0 a single [s], multi [m] or a lacp [l] interface group? [s] s
    Number of links for vif0? [] 2
    Name of link #1 for vif0 []: e0a
    Name of link #2 for vif0 []: e0c
    Please enter the IP address for Network Interface vif0 []:
    Please enter the netmask for Network Interface vif0 []:
    Please enter media type for vif0 {100tx-fd, tp-fd, 100tx, tp, auto (10/100/1000)} [auto]:
    Please enter the IP address for Network Interface e0b []:
    Please enter the IP address for Network Interface e0d []:
    Would you like to continue setup through the web interface? [n]:
    Please enter the name or IP address of the default gateway []:
    The administration host is given root access to the filer's
    /etc files for system administration. To allow /etc root access
    to all NFS clients, enter 'all' below.
    Please enter the name or IP address of the administration host []:
    Please enter timezone [GMT]: US/Central
    Where is the filer located? []:
    Do you want to run DNS resolver? [n]:
    Do you want to run NIS client? [n]:
    Do you want to configure the Shelf Alternate Control Path Management interface for SAS shelves [n]:
    Now type 'reboot' for changes to take effect.
  13. As the prompt suggests, type reboot for the changes to take effect.
  14. Now you have an ONTAP simulator running in a virtual machine.
  15. Log back into your simulator and assign all of the virtual disks to your simulator.
    simulator> disk assign all

How To Unlock And Use The Diagnostics Shell in ONTAP 8

Data ONTAP 8 provides a user mode system shell for rare diagnostic tasks. While most of the CPU cycles are spent in various Data ONTAP kernel modules, a user space exists and is used to run some processes and for diagnostics. Below is a quick example of how to unlock the diagnostic user account and gain access to the system shell.

  1. First, we need to unlock the diag user and assign it a password:
    priv set advanced
    useradmin diaguser unlock
    useradmin diaguser password

    Please enter a new password:
    Please enter it again:
  2. Now log in to the system shell using the diag user account:
    login: diag
This diagnostics shell gives you access to the BSD OS that hosts ONTAP. The Data ONTAP simulator has a collection of virtual disks, virtual tapes and other virtual devices. These device files are stored in the BSD filesystem. You can use typical UNIX commands like "cd", "ls", and "sudo".

Add Disks to a 7-Mode Simulator

The ONTAP 8 simulator takes advantage of the user space to implement simulated disks. These disks are kept as files in a special directory. The default simulator comes with 28 simulated disks of 1GB each. It is possible to increase the simulated disk count to 56 simulated disks. Any disk files above the first 56 are ignored. The following procedures will provide step-by-step instructions for doubling the disk count to 56 disks and making the disks available for use.

The procedure to add more disks can be found at and a summary of this procedure is included below.

  1. First you need to add the directory with the simulator disk tools to the path.
    setenv PATH "${PATH}:/sim/bin"
    echo $PATH
  2. Then, you need to fix a glitch in how one of the utility programs was compiled. The following set of commands create a symbolic link to a shared library that's needed by the utility.:
    cd /lib
    sudo mount -u -o rw /
    sudo ln -s
    sudo mount -u -o ro /
  3. Go to the simulated devices directory and add two more sets of 14 disks to the currently unused adapters 2 and 3:
    cd /sim/dev
    makedisks.main -h
    sudo makedisks.main -n 14 -t 23 -a 2
    sudo makedisks.main -n 14 -t 23 -a 3
    ls ,disks
  4. Now we're done with the system shell, so we can exit and reboot to add the new disks.
  5. After the reboot complete, log back in and take ownership of all the new disks:
    disk assign all
    sysconfig -r

You should now see 56 disks of 1GB each listed in the simulator. The new disks should be listed as already zeroed and ready to use inside an aggregate.