Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Configure The VM Host To Be Able To SSH To Itself

Add the VM host's public key to its own authorized_keys file to allow it to SSH to itself without a password prompt:

If you have not already generated an SSH identity key on the management node to be used to login to the computers the management node controls, run the following command to generate a new key:

Tip

ssh-keygen -t rsa -f "

Tip

cat /etc/vcl/vcl.key" -N '' -b 1024 -C "VCL root account on $HOSTNAME" 

Add the VM host's public key to its own authorized_keys file to allow it to SSH to itself without a password prompt:

Tip

cat /etc/vcl/vcl.key..pub >> /root/.ssh/authorized_keys

The following command should execute without having to enter a password:

Tip

ssh localvmhost '-i /etc/vcl/vcl.key localvmhost 'ls /'

Configure vcld to use vcl.key

...

  • Edit the managementnode table in the database: set the keys column to /etc/vcl/vcl.key

Configure the vcld.conf file to use vcl.key:

Tip

vi /etc/vcl/vcld.conf

Modify all of the IDENTITY lines to specify the vcl.key file:

...

  • column to /etc/vcl/vcl.key

Configure The DHCP Service

...

The dhcpd.conf file should contain the following:

unmigrated-wiki-markup
Tip
No Format

ddns-update-style none; shared-network vmnet1 {
   subnet 192.168.0.0 netmask 255.255.0.0 {
      ignore unknown-clients;
      option routers 192.168.0.1;
      host vmguest-1 {
         option host-name "vmguest-1";
         hardware ethernet 00:50:56:1a:01:01
;
;
         fixed-address 192.168.1.1;
         filename "/tftpboot/pxelinux.0";
         option dhcp-server-identifier 192.168.0.1;
         next-server 192.168.0.1;
      }
   }
}

The DHCP daemon should only listen on the virtual private network (vmnet1) to avoid conflicts with other production VCL networks. Configure the dhcpd service startup script to only listen on the vmnet1 interface:

...

Add vmnet1 the to the daemon $dhcpd line as shown:

start() {
\
    [ 
\
-x $dhcpd 
\
] 
\
|
\
| return 5
\
    [ 
\
-f $conf 
\
] 
\
|
\
| return 6

    pidofproc $prog >/dev/null 2>&1
    RETVAL=$?
\
    [ $RETVAL 
\
-eq 0 
\
] && return $RETVAL

    echo 
\
-n $"Starting $prog: "
    daemon $dhcpd vmnet1 $DHCPDARGS 2>/dev/null
    RETVAL=$?
    echo
\
    [ $RETVAL = 0 
\
] && touch $lockfile
    return $RETVAL
}
No Format

Tip
Wiki Markup

Configure the dhcpd service to automatically start at runlevels 3-5:

...

  • Configure the management node to check in with the database
    • Management Nodes -> Edit Management Node Information -> Add
      • Hostname: localhost
      • IP Address: 127.0.0.1
      • Owner: admin
      • State: available
      • Predictive Loading Module: Predictive Loading Level 0 Module
      • Check-in Interval: 5
      • Install Path: /install
      • End Node SSH Identitiy Key Files: /etc/vcl/vcl.key
      • SSH Port for this node: 22
      • Enable Image Library: no
  • Add VM host computer:
    • Manage Computers -> Edit Computer Information -> Submit -> Add
      • Hosthame: localvmhost
      • IP Address: 192.168.0.1 (NOTE: there is currently a bug restricting the size of the field, so hopefully one octet has less than 3 digits.)
      • State: available
        Note: do not attempt to add the computer in the maintenance state because of the following issue:
        https://issues.apache.org/jira/browse/VCL-189
      • Owner: admin
      • Platform: i386
      • Schedule: VCL 24x7
      • RAM: 1024
      • No Processors: 1
      • Processor Speed: 2000
      • Network Speed: 100
      • Type: blade
      • Provisioning engine: xCAT 1.x
        Note: the Type and Provisioning engine values don't matter for the localvmhost computer in this test environment because vcld isn't provisioning it
      • Computer Groups: all vm host computers
  • Add VM guest computer:
    • Manage Computers -> Edit Computer Information -> Submit -> Add
      • Hosthame: vmguest-1
      • IP Address: current public ip address used by Windows XP VM
      • State: available
      • Owner: admin
      • Platform: i386
      • Schedule: VCL 24x7
      • RAM: 1024
      • No Processors: 1
      • Processor Speed: 2000
      • Network Speed: 100
      • Type: virtualmachine
      • Provisioning engine: VMWare Server Provisioning
      • Computer Groups: all vm guest computers
  • Note the fix for the IP address bug is recorded here: https://issues.apache.org/jira/browse/VCL-193
  • Configure the VM guest's MAC address in the computer table in the database (as there currently does not seem to be a way to do this through the UI):
    • eth0: 00:50:56:1a:01:01
    • eth1: 00:50:56:1a:01:02
  • Configure the VM host profile:
    • Virtual Hosts -> VM Host Profiles tab -> VMware GSX standard Server 2.x - local storage -> configure Profile
      • Virtual Switch 0: VMnet1HostOnly
      • Virtual Switch 1: VMnet0Bridged
  • Change state of localvmhost to vmhostinuse (edit the database directly, do not use the Virtual Hosts utility on the website)
  • Assign vm guests to localvmhost
  • Create node in priviledge tree
    • Name: VM image access
    • Add resource groups:
      • all vm guest computers
      • all vm guest images