VMWare Distribution Build

From UntangleWiki

Jump to: navigation, search

Contents

What Is This (And Who Needs It)?

Note: These instructions are for building a VMware appliance given an Untangle ISO.

Last updated 12/11/2007 using VMware Server 1.0.4 (and VMware Server 2 Beta) and Untangle Version 5.0.3.

If you just want to run Untangle in VMware, go to Untangle Virtual Appliance on VMware.

The VMware Distribution Build is the Untangle build that is distributed as a VMware virtual appliance that is ready to be launched in various VMware products. Here we describe the process we use to create the VMware virtual appliance. Due to changes in the installer, this page may be out of sync with the various versions available. As a rule, we will attempt to keep these instructions in sync with the latest Untangle release. This page has been updated to correspond with Untangle version 5.0.3.

If you just want to run the Untangle Virtual Appliance, please see Untangle Virtual Appliance on VMware instead. This page is dedicated to those that need to build and/or customize the Untangle Virtual Appliance in such a way that they need to start with the Untangle install ISO. In most circumstances, one can simply grab our latest zip file and use it as a basis for customization. You can find the latest Untangle Virtual Appliance here: Untangle Virtual Appliance Download.

The Untangle VMware virtual appliance, as is currently distributed, is a zip file. When zipped it is about 401MB and when unzipped it starts at 1.8GB and expands from there as it is used. When unzipped it creates a directory containing a VMX file that describes the virtual appliance, plus a bunch of other files, most of which are the uncompressed disk image files for the appliance.

Compatibility

The distributed zip file has been tested against VMware Server version 1.0.4 but should be compatible with

  • VMware Player (version?)
  • VMware Workstation 4 or higher
  • VMware Server 1.x or higher
  • ESX ?.x

Default Configuration

The Untangle Virtual Appliance has the following configuration:

  • 600MB RAM (This really should be increased to 1024+ if you have the RAM to do it)
  • 40GB Unallocated Virtual Disk (This disk image will grow to approximately 40GB if you use that much on the running VMware instance, but it will not require more than 2GB to launch initially)
  • Three virtual networks as follows:
    • External network adapter bridged (default bridged device on your VMware host connected on boot)
    • Internal network adapter (default uses custom device vmnet2 connected on boot)
    • DMZ network adapter (default uses custom device vmnet3 disconnected on boot)

Customization

You can modify the build as you see fit but this is our recommended minimum to get a functional appliance for demonstration purposes. We do not document how to customize the image beyond showing you how we built ours so you will need to use your VMware prowess to get you where you need to go. Feel free to visit us in IRC with any questions though.

Prerequisites

Before we can get started with the build process we need to have a VMware host setup accordingly. This section describes our build environment setup.

Build Host: VMware Server Or Workstation

Install VMware server unless you have ESX or Workstation. VMware server is freely available so these instructions are based on the current stable release at time of writing is 1.0.4. Workstation and ESX may also be used, but are not documented specifically here and new images cannot be created with VMware player. Use the following link to download the latest versions: VMware Server Downloads.

All steps covered here assume you are using VMware Server 1.0.4 on Linux and VMware Console 1.0.4 on Linux so if you are using something else, you may need to adjust accordingly as menu items and configuration vary.

Note: If you use VMware products on Windows based hosts, the compatibility of the resulting virtual machine may vary. We use Linux hosts for maximum compatibility.

For more information on installing or using VMware Server, see VMware's Server product page.

VMware Network Configuration

VMware should have vmnet2 configured. We recommend bridging to a real interface on the host for testing purposes (though that is not totally necessary in the build environment). You may also want to setup vmnet3 for testing of the DMZ but for our purposes here, that is not necessary as the default virtual machine will boot with vmnet3 disconnected. Use the vmware-config.pl to adjust your network configuration on your Linux host. For more details on how to set this up, see below in this section.

In Windows, go to "Host" --> "Virtual Network Settings"; "Host Virtual Network Mapping" tab --> select the VMnet2 drop down and select the adapter to bridge to --> "Apply" To use a virtual adapter for VMnet2 in Windows, go to "Host" --> "Virtual Network Settings"; "Host Virtual Adapaters" tab --> "Add" --> VMnet2 --> "Apply"; go to the DHCP tab and remove the DHCP service from VMnet2 by removing VMnet2 from the list; disable NAT as well or at least do not run it on VMnet2. Do the same for VMnet3 if you must. For more details on how to set this up, see below in this section.

Detailed VMware Network Configuration

This section explains the various ways to configure network interfaces on Windows-based and Linux-based VMware hosts using VMware's Virtual Network Editor (on Windows) and the vmware-config.pl script (on Linux).

The way that you will configure network interfaces for your Untangle virtual appliance will differ depending on whether you are setting up a demo virtual appliance or a production virtual appliance.

  • We suggest you use the demo virtual appliance if you are running VMware on a host with only a single physical network interface card.
  • We suggest you use the production virtual appliance if you are running VMware on a host with at least two (three if using with a DMZ) physical network interface cards that you can connect to external, internal and DMZ networks.

In either case, you will use the same VMware tools (the Virtual Network Editor or vmware-config.pl script) to create the virtual network devices in VMware. The only difference between demo virtual appliance and production virtual appliance is that the demo virtual appliance uses virtual network cards for the internal and DMZ networks and the production virtual appliance uses physical networks for the internal and DMZ networks by bridging to the VMware host's physical network cards. Both modes bridge to a physical network card for the external network.

Understanding the Untangle Network Topology

The following diagram illustrates the network topology including the default configuration of the Untangle VMware virtual appliance. For proper installation and configuration, this basic diagram should be well understood prior to setting up Untangle.

Figure, Untangle Network Overview Diagram
Figure, Untangle Network Overview Diagram

Configure the VMware Network on Windows Hosts

Windows hosts use a tool that is common to all Windows-based installations of VMware: Virtual Network Editor.

How to run VMware's Virtual Network Editor

To run this tool properly, you must be logged in as an administrator on the host PC or Server, or you must run the tool with administrative privileges. In the case of Windows Vista, for example, you must select the Run as Administrator option when right-clicking on the tool's executable file, vmnetcfg.exe, which is located in the same directory as your VMware. If you installed in the default locations, the Virtual Network Editor's path is:

  • ..\Program Files\VMware\VMware Server\vmnetcfg.exe for VMware Server (VMware Server and Workstation may also install the tool in the appropriate program group on your start menu (Manage Virtual Networks), depending on the installation options selected.)

When logged in as an administrator, use the Run command from your START menu to run the tool, unless your host is Windows Vista. In Vista, you should navigate to the tool using Explorer, right-click the executable, then Run as Administrator.

Figure, Run the Virtual Network Editor
Figure, Run the Virtual Network Editor

Note: From the VMware Server Console, you can also run the Virtual Network Editor by choosing Host > Virtual Network Settings.

Once you run the Virtual Network Editor, you should see something like the following:

Figure, VMware's Virtual Network Editor
Figure, VMware's Virtual Network Editor
  1. Navigate to the Host Virtual Adapters tab. From there, add a virtual adapter by clicking the Add button.
  2. Figure, Host Virtual Adapters
    Figure, Host Virtual Adapters
  3. Select VMnet2 if it is not already shown, then click OK.
  4. Figure, Adding a Virtual Adapter, VMnet2
    Figure, Adding a Virtual Adapter, VMnet2

    Once done, you should see a New Device enabled on VMnet2:

    Figure, VMnet2 Added
    Figure, VMnet2 Added

    Note: If setting up the Untangle virtual appliance to use a DMZ, follow the same procedure to add VMnet3.

  5. Optional: For actual use, you will want to disable DHCP for the virtual adapter you just added by navigating to the DHCP tab, selecting the New Device on VMnet2, and clicking the Remove button. This is not necessary for building the image as these settings affect only the VMware host.
  6. Figure, Remove DHCP for VMnet2
    Figure, Remove DHCP for VMnet2

    Note: If setting up the Untangle virtual appliance to use a DMZ, follow the same procedure to disable DHCP on VMnet3.

  7. Navigate to the Host Virtual Network Mapping tab. You will notice that the Virtual Network Editor allows you to map up to ten virtual network adapters, which are named VMnet0 through VMnet9. Notice also that VMnet1 and VMnet8 are already mapped-- you should not change these unless you understand what you are doing as they are reserved for use by VMware. You should see your New Device on VMnet2.
  8. Figure, Host Virtual Network Mapping
    Figure, Host Virtual Network Mapping
  9. The following screen shot shows what the Host Virtual Network Mapping looks like after applying the above changes for both VMnet2 and VMnet3.
  10. Figure, Demo Mode Host Virtual Network Mapping
    Figure, Demo Mode Host Virtual Network Mapping
  11. If you have more than one physical network interface on your Windows host (e.g. wired and wireless NICs), you can setup your network for the Untangle virtual appliance to be a Production Virtual Appliance by selecting the physical network interface you want to use for your Internal and DMZ networks. In the following example, we have mapped the Internal network to the wireless network interface on our Windows host while the forcing the External network to be mapped to our Broadcom network interface on our Windows host (DMZ is not mapped or configured here):
  12. Figure, Mapping Your Server Network Interfaces
    Figure, Mapping Your Server Network Interfaces
    • Configure VMnet0 to be mapped to the physical network adapter connected to the external network, e.g. the Internet, by selecting the appropriate adapter from the adjacent drop-down list.
    • Configure VMnet2 to be mapped to the physical network adapter linking to your internal network.
    • Optionally, you may also map VMnet3 to a DMZ.
  13. Click the Apply button, then click the OK button.

Configure the VMware Network on Linux Hosts

Sorry. There are no pretty GUI's here. Setting up VMware networks on Linux hosts requires root access to the command line. You will have met the other requirements upon successful installation of VMware Server. The following assumes a default installation VMware Server products on Linux.

In our examples, the initial configuration of VMware networking is the default (however, your actual IP addresses will probably be different). For reference, here is our post installation VMware network setup:

The following virtual networks have been defined:

. vmnet0 is bridged to eth0
. vmnet1 is a host-only network on private subnet 172.16.59.0.
. vmnet8 is a NAT network on private subnet 172.16.146.0.
Linux hosts use a tool that is common to all Linux-based installations of VMware:
vmware-config.pl

How to run VMware's vmware-config.pl script

To run this tool properly, you must be logged in as an root on the host PC or Server. The vmware-config.pl script should be in the root user's path. If it isn't, you probably did something wrong during the installation and you should review your steps. If all else fails, you can use
find / -name "vmware-config.pl"
to find it.

Note: VMware Server on Linux hosts and Windows hosts do not support the VMware Server Console menu item for the Virtual Network Editor under Host > Virtual Network Settings when VMware Server Console is run from a Linux client.

Building the Untangle virtual appliance requires only one physical network interface on your host PC. If you have only one network interface on your Linux host, you will only need to configure VMware networking for the Internal and DMZ hosts as is done in the following example by setting vmnet2 and vmnet3 to hostonly. The IP addresses are irrelevant because they are determined by the Untangle virtual appliance configuration but we will need to disable the VMware DHCP servers as stated below if we plan to test the image on the build server.

  • Configure VMnet0 to be bridged to the physical network adapter connected to the external network, e.g. eth0.
  • Configure VMnet2 to be a hostonly network for your internal network.
  • Configure VMnet3 to be a hostonly network for your DMZ network.
  1. To run the script, open a bash prompt/terminal/console and run (as root) the command:
    vmware-config.pl
    

    Once you run the vmware-config.pl script, you should see something like the following:

    Making sure services for VMware Player are stopped.
    
    Stopping VMware services:
       Virtual machine monitor                                             done
       Blocking file system:                                               done
       Bridged networking on /dev/vmnet0                                   done
       Host network detection                                              done
       DHCP server on /dev/vmnet1                                          done
       Host-only networking on /dev/vmnet1                                 done
       DHCP server on /dev/vmnet8                                          done
       NAT service on /dev/vmnet8                                          done
       Host-only networking on /dev/vmnet8                                 done
       Virtual ethernet                                                    done
    
    Configuring fallback GTK+ 2.4 libraries.
    
    In which directory do you want to install the theme icons? 
    [/usr/share/icons]
    ...
    
    You can continue with the defaults until you get tot he network section as shown below.
  2. In this example, we chose to setup networking using the editor to create vmnet2 and vmnet3:
    You have already setup networking.
    
    Would you like to skip networking setup and keep your old settings as they are?
    (yes/no) [yes] no
    
    Do you want networking for your virtual machines? (yes/no/help) [yes] 
    
    Would you prefer to modify your existing networking configuration using the 
    wizard or the editor? (wizard/editor/help) [wizard] editor
    
    The following virtual networks have been defined:
    
    . vmnet0 is bridged to eth0
    . vmnet1 is a host-only network on private subnet 172.16.59.0.
    . vmnet8 is a NAT network on private subnet 172.16.146.0.
    
    Do you wish to make any changes to the current virtual networks settings? 
    (yes/no) [no] yes
    
    Which virtual network do you wish to configure? (0-99) 2
    
    What type of virtual network do you wish to set vmnet2? 
    (bridged,hostonly,nat,none) [none] hostonly
    
    Configuring a host-only network for vmnet2.
    
    Do you want this program to probe for an unused private subnet? (yes/no/help) 
    [yes] no
    
    What will be the IP address of your host on the private 
    network? 192.168.1.1
    
    What will be the netmask of your private network? 255.255.255.0
    
    The following virtual networks have been defined:
    
    . vmnet0 is bridged to eth0
    . vmnet1 is a host-only network on private subnet 172.16.59.0.
    . vmnet2 is a host-only network on private subnet 192.168.1.0.
    . vmnet8 is a NAT network on private subnet 172.16.146.0.
    
    Do you wish to make additional changes to the current virtual networks 
    settings? (yes/no) [yes] 
    
    Which virtual network do you wish to configure? (0-99) 3
    
    What type of virtual network do you wish to set vmnet3? 
    (bridged,hostonly,nat,none) [none] hostonly
    
    Configuring a host-only network for vmnet3.
    
    Do you want this program to probe for an unused private subnet? (yes/no/help) 
    [yes] no
    
    What will be the IP address of your host on the private 
    network? 192.168.2.1
    
    What will be the netmask of your private network? 255.255.255.0
    
    The following virtual networks have been defined:
    
    . vmnet0 is bridged to eth0
    . vmnet1 is a host-only network on private subnet 172.16.59.0.
    . vmnet2 is a host-only network on private subnet 192.168.1.0.
    . vmnet3 is a host-only network on private subnet 192.168.2.0.
    . vmnet8 is a NAT network on private subnet 172.16.146.0.
    
    Do you wish to make additional changes to the current virtual networks 
    settings? (yes/no) [yes] no
    
    Extracting the sources of the vmnet module.
    
    ...
    
    This script continues on using the default settings you set during installation.
  3. After it completes, you should see that all your VMware services started up without errors.
  4. Optional; Disable VMware's DHCP Server on Hostonly Networks This needs to be done only if you will test the Untangle VM on the VMware host you are building on.

    When using hostonly networking, VMware starts a DHCP server for each hostonly network. This will conflict with your Untangle virtual appliance so they must be disabled.

    To do so, go to your /etc/vmware directory. There you should see directories for your hostonly networks (vmnet2 and vmnet3). Within each should be a dhcpd directory where you can edit the dhcpd.conf file to disable dhcpd for that network. For example, in /etc/vmware/vmnet2/dhcpd/dhcpd.conf we comment out everything here:

    #
    # Configuration file for ISC 2.0b6pl1 vmnet-dhcpd operating on vmnet2.
    #
    # This file was automatically generated by the VMware configuration program.
    # If you modify it, it will be backed up the next time you run the
    # configuration program.
    #
    # We set domain-name-servers to make some DHCP clients happy
    # (dhclient as configued in SuSE, TurboLinux, etc.).
    # We also supply a domain name to make pump (Red Hat 6.x) happy.
    #
    allow unknown-clients;
    default-lease-time 1800;                # 30 minutes
    max-lease-time 7200;                    # 2 hours
    
    subnet 192.168.1.0 netmask 255.255.255.0 {
        range 192.168.1.128 192.168.1.254;
        option broadcast-address 192.168.1.255;
        option domain-name-servers 192.168.1.1;
        option domain-name "localdomain";
    }
    
    

    So that it looks like this:

    #
    # Configuration file for ISC 2.0b6pl1 vmnet-dhcpd operating on vmnet2.
    #
    # This file was automatically generated by the VMware configuration program.
    # If you modify it, it will be backed up the next time you run the
    # configuration program.
    #
    # We set domain-name-servers to make some DHCP clients happy
    # (dhclient as configued in SuSE, TurboLinux, etc.).
    # We also supply a domain name to make pump (Red Hat 6.x) happy.
    #
    # allow unknown-clients;
    # default-lease-time 1800;                # 30 minutes
    # max-lease-time 7200;                    # 2 hours
    # 
    # subnet 192.168.1.0 netmask 255.255.255.0 {
    #     range 192.168.1.128 192.168.1.254;
    #     option broadcast-address 192.168.1.255;
    #     option domain-name-servers 192.168.1.1;
    #     option domain-name "localdomain";
    # }
    
  5. We do the same for /etc/vmware/vmnet2/dhcpd/dhcpd.conf and /etc/vmware/vmnet3/dhcpd/dhcpd.conf and then restart VMware with:
    /etc/init.d/vmware restart
    

    To verify, you can run the following command and make sure there are no dhcpd process on vmnet2 and vmnet3.

    ps ax|grep vmnet-dhcpd
    

    If you see something like the following for vmnet2 and/or vmnet3, your Untangle virtual appliance will not function properly:

     7959 ?        Ss     0:00 /usr/bin/vmnet-dhcpd -cf /etc/vmware/vmnet2/dhcpd/dhcpd.conf -lf /etc/vmware/vmnet2/dhcpd/dhcpd.leases -pf /var/run/vmnet-dhcpd-vmnet2.pid vmnet2
     7974 ?        Ss     0:00 /usr/bin/vmnet-dhcpd -cf /etc/vmware/vmnet3/dhcpd/dhcpd.conf -lf /etc/vmware/vmnet3/dhcpd/dhcpd.leases -pf /var/run/vmnet-dhcpd-vmnet3.pid vmnet3
    
  6. The Untangle virtual appliance requires only one physical network interface on your host PC; however, if you have more than one network interface on your Linux host, you will probably want to configure VMware networking for the production virtual appliance as is done in the following example by setting vmnet2 and vmnet3 to bridged. It is worth noticing that the only real difference between the Demo Virtual Appliance and the Production Virtual Appliance is that the Demo Virtual Appliance requires only one physical network adapter on the VMware host whereas the Production Virtual Appliance requires at least two physical network adapters on the VMware host. If you have multiple network interfaces on your VMware host, we recommend you use the Production Virtual Appliance. Ultimately, this step only matters if you are testing the Untangle VM on your VMware host.
    • Configure VMnet0 to be bridged to the physical network adapter connected to the external network, e.g. eth0.
    • Configure VMnet2 to be bridged to the physical network adapter connected to your internal network, e.g. eth1.
    • Configure VMnet3 to be bridged to the physical network adapter connected to your DMZ network, e.g. eth2.
  7. To run the script, open a bash prompt/terminal/console and run the command:
    vmware-config.pl
    

    Once you run the vmware-config.pl script, you should see something like the following:

    Making sure services for VMware Player are stopped.
    
    Stopping VMware services:
       Virtual machine monitor                                             done
       Blocking file system:                                               done
       Bridged networking on /dev/vmnet0                                   done
       Host network detection                                              done
       DHCP server on /dev/vmnet1                                          done
       Host-only networking on /dev/vmnet1                                 done
       DHCP server on /dev/vmnet8                                          done
       NAT service on /dev/vmnet8                                          done
       Host-only networking on /dev/vmnet8                                 done
       Virtual ethernet                                                    done
    
    Configuring fallback GTK+ 2.4 libraries.
    
    In which directory do you want to install the theme icons? 
    [/usr/share/icons]
    ...
    
    You can continue with the defaults until you get tot he network section as shown below.
  8. In this example, we chose to setup networking using the editor to bridge vmnet2 to eth1 and vmnet3 to eth2:
    You have already setup networking.
    
    Would you like to skip networking setup and keep your old settings as they are?
    (yes/no) [no] 
    
    Do you want networking for your virtual machines? (yes/no/help) [yes] 
    
    Would you prefer to modify your existing networking configuration using the 
    wizard or the editor? (wizard/editor/help) [editor] 
    
    The following virtual networks have been defined:
    
    . vmnet0 is bridged to eth0
    . vmnet1 is a host-only network on private subnet 172.16.59.0.
    . vmnet8 is a NAT network on private subnet 172.16.146.0.
    
    Do you wish to make any changes to the current virtual networks settings? 
    (yes/no) [no] yes
    
    Which virtual network do you wish to configure? (0-99) 2
    
    What type of virtual network do you wish to set vmnet2? 
    (bridged,hostonly,nat,none) [none] bridged
    
    Configuring a bridged network for vmnet2.
    
    Your computer has multiple ethernet network interfaces available: eth1, eth2, 
    vmnet1, vmnet2, vmnet3, vmnet8. Which one do you want to bridge to vmnet2? 
    [eth0] eth1
    
    The following virtual networks have been defined:
    
    . vmnet0 is bridged to eth0
    . vmnet1 is a host-only network on private subnet 172.16.59.0.
    . vmnet2 is bridged to eth1
    . vmnet8 is a NAT network on private subnet 172.16.146.0.
    
    Do you wish to make additional changes to the current virtual networks 
    settings? (yes/no) [yes] 
    
    Which virtual network do you wish to configure? (0-99) 3
    
    What type of virtual network do you wish to set vmnet3? 
    (bridged,hostonly,nat,none) [none] bridged
    
    Configuring a bridged network for vmnet3.
    
    Your computer has multiple ethernet network interfaces available: eth2, vmnet1,
    vmnet2, vmnet3, vmnet8. Which one do you want to bridge to vmnet3? [eth0] eth2
    
    The following virtual networks have been defined:
    
    . vmnet0 is bridged to eth0
    . vmnet1 is a host-only network on private subnet 172.16.59.0.
    . vmnet2 is bridged to eth1
    . vmnet3 is bridged to eth2
    . vmnet8 is a NAT network on private subnet 172.16.146.0.
    
    Do you wish to make additional changes to the current virtual networks 
    settings? (yes/no) [yes] no
    
    Extracting the sources of the vmnet module.
    
    ...
    
    This script continues on using the default settings you set during installation.
  9. After it completes, you should see that all your VMware services started up without errors.
  10. Disabling DHCP on bridged connections is not required since VMware disables DHCP services on all bridged connections.

Installation Media

We will be installing from the Untangle 5.0.3. ISO so grab that and put it where you can use it as the CD-ROM with your VMware host. For simplicity, we put this in our VMware machines directory.

Build Procedure

Once you have VMware (and console) installed, configured and running you are ready to setup the Untangle virtual machine and install Untangle on it. This section covers the steps we use to do that.

Create the Virtual Machine

Here we create the VMware machine that we will install the untangle_503.iso onto.

  1. Bring up the VMware server console.
  2. Create a new virtual machine --> Next
  3. Select "Custom" --> Next
  4. Select "2. Linux" --> Set "Version:" to "Other Linux 2.6.x kernel" --> Next (Set your path if necessary first), Set "Name" to "untangle503" (Or whatever you choose) --> Next Note: The Untangle naming convention is untangle<version> e.g. untangle503
  5. Set "Number of processors:" to "One" (default)--> Next Note: Our recommendation is that you *do not* set this to 2 processors; As of VMware Server 1.0.4; VMWare support for Linux guest SMP not ideal.
  6. Check "Make this virtual machine private" (default) --> Next
  7. Set "Memory" to 600MB (unless you have more available: 1024 MB recommended if you have it) --> Next
  8. Set "Network Connection" to "Use bridged networking" (default) --> Next
  9. Set "I/O Adapter Type" to "SCSI adapter LSI Logic" --> Next (BusLogic Note: In some cases it has been noticed that the installation will not complete using the LSI Logic controller. The work around is to use the BusLogic controller and then edit the .vmx file as noted below with "BusLogic Note:)
  10. Set "Disk" to "Create a new virtual disk" --> Next
  11. Set "Virtual Disk Type" to "SCSI (Recommended)" --> Next
  12. Set "Disk Size (GB)" to "40", uncheck "Allocate all disk space now", check "Split disk into 2GB files" --> Next
  13. Accept default Disk File name (but up to you) --> Next

Edit the Base Virtual Machine

You should now have an untangle503 virtual machine but we need to edit the machine to get everything in the right place for the installation of the untangle appliance software. Specifically, we need to add the internal and DMZ network adapters and set the CD-ROM to use the installation media.


Now "Edit virtual machine settings" as follows:

  1. "Add" an Ethernet Adapter --> Next --> Set to "Custom: Specific virtual network" and select "/dev/vmnet2", check "Connect at power on" (default) --> Finish
  2. Again, "Add" an Ethernet Adapter --> Next --> Set to "Custom: Specific virtual network" and select "/dev/vmnet3", uncheck "Connect at power on" --> Finish
  3. Set the CD-ROM to use ISO image and browse to your untangle(version).iso --> OK --> OK again to exit the Virtual Machine Settings.

We are done editing the base machine. You can modify the above to fit your needs if you know how and understand what you are doing. The above is the default for the downloadable VMware Untangle Virtual Appliances.

Boot the Virtual Machine and Install Untangle

  1. Power on this virtual machine to boot the Untangle install ISO.
  2. Accept all untangle defaults and select the drive you created earlier.
  3. Once the install completes without errors, click OK to shutdown the virtual machine.
  4. BusLogic Note: In some cases the installation fails during installation to the LSI Logic controller. If the installation went okay but was unable to complete, recreate the machine using the BusLogic SCSI controller and modify the .vmx at this stage as follows. Edit the .vmx file (ours is UntangleVM_503.vmx) and add the following in bold: scsi0.virtualDev = "lsilogic" as shown here between scsi0.present and memsize:
    scsi0.present = "TRUE"
    scsi0.virtualDev = "lsilogic"
    memsize = "600"
    
  5. Boot the Untangle Virtual Appliance: Power on this virtual machine to boot the Untangle Virtual Appliance
  6. BusLogic Note: If you installed using the BusLogic SCSI controller, When prompted: "....Do you want VMware Server to change the adapter type for scsi0:0 disk?" click "Yes"

Install VMware Tools on the Untangle Virtual Appliance

  1. Edit the Untangle virtual machine and set the CD-ROM to use a physical drive and uncheck the "Connect at power on"
  2. Power on the Untangle virtual machine
  3. Close the "Untangle Server Setup Wizard"
  4. Launch a Terminal, set the password and login with that password tip: I like to make sure the network is up and start ssh and ssh in for the next bits so I can cut and paste. This gets a little tricky when you install VMware Tools though so do that from a local console.
  5. Add the following to /etc/apt/sources.list:
    deb http://ftp.debian.org/debian sarge main contrib non-free
    deb http://security.debian.org sarge/updates main contrib non-free
    deb http://user:metavize@updates.untangle.com/untangle stable main premium upstream
    
    (Change 'stable' to 'testing' if a testing distribution is wanted)
  6. Install stuff needed to configure VMware Tools:
    apt-get update
    apt-get install make gcc gcc-3.3 linux-headers-2.6.22-15-untangle
    
  7. In the VMware console, go to VM --> Install VMware Tools --> Click Install on the resulting dialog box
  8. In the virtual machine terminal, mount /cdrom, untar the tarball, and install the VMware Tools
    cd
    mount /cdrom
    tar xvzf /cdrom/<VMwareTools_tarball
    
  9. Run the vmware-install.pl and accept all defaults, Try
    ./vmware-install.pl -d
    reboot
    

Customize Your Untangle Virtual Appliance

Here is the place to do any OEM type customizations you need.

Reset the Untangle Virtual Appliance -- Prepare it for Packaging

  1. Unmount the CD-ROM and cleanup some files.
    umount /cdrom
    rm -rf vmware-tools-distrib
    rm /etc/apt/sources.list
    touch /etc/apt/sources.list
    apt-get clean
    

    Tip: You can simply comment out the entries in the sources.list instead of removing them so that you have them for future reference if needed.

    Tip: Optionally, you can purge the applications required to build VMware Tools but we don't do this in our distributed image as of untangle503

    apt-get remove --purge autoconf automake1.4 m4 autotools-dev make gcc gcc-3.3 untangle-linux-headers-2.6.16"*"
    
  2. Run /usr/bin/vmware-toolbox and in the resulting GUI:
    1. Check the Time synchronization box to sync time with host.
    2. Shrink the / partition on the virtual disk.
  3. Reboot. This is necessary because the installing of vmware tools hosed the current network. will be ok once rebooted.
  4. Edit /etc/shadow, set root pw back to '*', clean out .zsh_history. You can delete the .zsh_history file completely.
  5. Ctrl-D to exit the shell.
  6. Shutdown the Untangle server via the GUI

Package the Untangle Virtual Appliance for Distribution

  1. Edit the Virtual Machine settings:
    Change the cdrom mount back to the hardware cdrom
  2. Change to the directory where your virtual machine directory is located and zip up the deliverable virtual machine
    zip -r untangle_503_vmware.zip untangle503

Additional Resources

Personal tools