Skip to content

Manager Base

Johnny Foulds edited this page Aug 18, 2019 · 7 revisions

The page describes how the base Hadoop Manager Virtual Machine is created from which the nodes will be cloned.

Create the Manager Base

# connect to the vCenter server
$server = Connect-VIServer -Verbose:$true -Server $vCenterHostName -User $vCenterUser -Password $vCenterPassword

$vm = Get-VM -Server $server -Name "Base Linux Machine"
$snapshot = Get-Snapshot -VM $vm -Name "Clean Install"

# create the manager machine based on the snapshot
$cloneParams = @{
    'Name' = 'Hadoop Manager Node'
    'Datastore' = $datastore 
    'VM' = $vm
    'DiskStorageFormat' = 'Thin'
    'VMHost' = $vmHost
    'LinkedClone' = $null
    'ReferenceSnapshot' = $snapshot
}

# clone the vm
$managerVM = New-VM @cloneParams

# add cpu cores and memory
Set-VM -VM $managerVM -NumCpu 4 -MemoryGB 8 -Confirm:$false

# start the virtual machine
Start-VM -VM $managerVM

Configure Node Network

  1. Using the VM console log in as root and type ip addr | grep ens to get the name of the network adapter.
  2. Bring the interface up using this name, for example: ifup ens192
  3. Use the first command (ip addr | grep ens) again to get the ip address that can be used to SSH into the host.
  4. SSH into the host (ssh [email protected]) and then type exit.
  5. Using the IP Address execute the following command with the appropriate parameters to configure the manager node with the help of the config scripts.
./config-manager.sh  -u root -p '[YOUR_PASSWORD]' -s 192.168.3.161 -i 192.168.3.200 -h "hadoop-manager.lan" -d 192.168.3.1 -g 192.168.3.1 -n 255.255.255.0

Create a snapshot

Shut down the manager node and create a snapshot:

# connect to the vCenter server
$server = Connect-VIServer -Verbose:$true -Server $vCenterHostName -User $vCenterUser -Password $vCenterPassword

# create a snapshot of the base machine
$vm = Get-VM -Server $server -Name "Hadoop Manager Node"
New-Snapshot -Server $server -VM $vm -Name "Manager Base Config" -Description "Hadoop Manager Node Base Config" -Quiesce

Web References

Clone this wiki locally