Nagios XI Conversion for VirtualBox



Similar documents
ECT362 Installing Linux Virtual Machine in KL322

Installing Sun's VirtualBox on Windows XP and setting up an Ubuntu VM

Virtualization Technology (or how my Windows computer gave birth to a bunch of Linux computers)

1. Install a Virtual Machine Download Ubuntu Ubuntu LTS Create a New Virtual Machine... 2

Partek Flow Installation Guide

In order to upload a VM you need to have a VM image in one of the following formats:

1. Install a Virtual Machine Download Ubuntu Ubuntu LTS Create a New Virtual Machine... 2

IBM WebSphere Application Server Version 7.0

Creating a Linux Virtual Machine using Virtual Box

Quick Start Guide for Parallels Virtuozzo

PARALLELS SERVER 4 BARE METAL README

Download Virtualization Software Download a Linux-based OS Creating a Virtual Machine using VirtualBox: VM name

The BackTrack Successor

Accessing RCS IBM Console in Windows Using Linux Virtual Machine

LSN 10 Linux Overview

Installing Proview on an Windows XP machine

Quick Start Guide for VMware and Windows 7

Acronis Backup & Recovery 10 Server for Linux. Update 5. Installation Guide

Bringing the Eko VM Home (302)

How to Backup XenServer VM with VirtualIQ

Using VirtualBox ACHOTL1 Virtual Machines

OpenGeo Suite for Linux Release 3.0

Student installation of TinyOS

1. Product Information

Signiant Agent installation

MarkLogic Server. Installation Guide for All Platforms. MarkLogic 8 February, Copyright 2015 MarkLogic Corporation. All rights reserved.

Personal Virtual Server (PVS) Quick Start Guide

SOS SO S O n O lin n e lin e Bac Ba kup cku ck p u USER MANUAL

Consolidated Monitoring, Analysis and Automated Remediation For Hybrid IT Infrastructures. Goliath Performance Monitor Installation Guide v11.

Parallels Server Bare Metal 5.0

PowerPanel Business Edition Installation Guide

The Tor VM Project. Installing the Build Environment & Building Tor VM. Copyright The Tor Project, Inc. Authors: Martin Peck and Kyle Williams

Operating System Installation Guidelines

AzMERIT Secure Browser Installation Manual For Technology Coordinators

Linux Development Environment Description Based on VirtualBox Structure

Online Backup Client User Manual Linux

simplify monitoring Consolidated Monitoring, Analysis and Automated Remediation For Hybrid IT Infrastructures

Backing Up TestTrack Native Project Databases

Red Hat Linux 7.2 Installation Guide

SAS University Edition: Installation Guide for Windows

VMware Horizon FLEX User Guide

Core Protection for Virtual Machines 1

How To Install Acronis Backup & Recovery 11.5 On A Linux Computer

VMware Horizon FLEX User Guide

IT-ADVENTURES PLAYGROUND (ISERINK) Remote Setup Guide IOWA STATE UNIVERSITY INFORMATION ASSURANCE CENTER

PARALLELS SERVER BARE METAL 5.0 README

Verax Service Desk Installation Guide for UNIX and Windows

Using VMware Workstation

Installing Ubuntu inside Windows using VirtualBox

CS 103 Lab Linux and Virtual Machines

User Manual - Help Utility Download MMPCT. (Mission Mode Project Commercial Taxes) User Manual Help-Utility

LOCKSS on LINUX. Installation Manual and the OpenBSD Transition 02/17/2011

Online Backup Client User Manual

Required Virtual Interface Maps to... mgmt0. bridge network interface = mgmt0 wan0. bridge network interface = wan0 mgmt1

FOG Guide. IPBRICK International. July 17, 2013

VMware Horizon FLEX User Guide

VMTurbo Operations Manager 4.5 Installing and Updating Operations Manager

INSTALL ZENTYAL SERVER

NAS 249 Virtual Machine Configuration with VirtualBox

Net/FSE Installation Guide v1.0.1, 1/21/2008

Acronis Backup & Recovery 10 Server for Linux. Installation Guide

Setting up VMware Server v1 for 2X VirtualDesktopServer Manual

Massey University Follow Me Printer Setup for Linux systems

AlienVault Unified Security Management (USM) 4.x-5.x. Deploying HIDS Agents to Linux Hosts

RecoveryVault Express Client User Manual

Spector 360 Deployment Guide. Version 7

Table of Contents. FleetSoft Installation Guide

ODP REGIONAL NODE DEPLOYMENT QUICK GUIDE FOR TRAININGS

Consolidated Monitoring, Analysis and Automated Remediation For Hybrid IT Infrastructures. Goliath Performance Monitor Installation Guide v11.

Deploying a Virtual Machine (Instance) using a Template via CloudStack UI in v4.5.x (procedure valid until Oct 2015)

CLOUD INFRASTRUCTURE VIRTUAL SERVER (SHARED) USER GUIDE

Online Backup Linux Client User Manual

Introduction to Operating Systems

Keystone 600N5 SERVER and STAND-ALONE INSTALLATION INSTRUCTIONS

TimeIPS Server. IPS256T Virtual Machine. Installation Guide

Online Backup Client User Manual

Installation Guidelines (MySQL database & Archivists Toolkit client)

CycleServer Grid Engine Support Install Guide. version 1.25

e-config Data Migration Guidelines Version 1.1 Author: e-config Team Owner: e-config Team

DraganFly Guardian: API Instillation Instructions

The 2013 Experimental Warning Program (EWP) Virtual Weather Event Simulator (WES) Windows & Linux Installation Documentation

Acronis Backup & Recovery 10 Server for Linux. Quick Start Guide

Working with Office Applications and ProjectWise

Prerequisites and Configuration Guide

Acronis Backup & Recovery 11.5

IUCLID 5 Guidance and support. Installation Guide Distributed Version. Linux - Apache Tomcat - PostgreSQL

WatchGuard Dimension v1.1 Update 1 Release Notes

Land Information New Zealand (LINZ) SALT Database. Migration from original hardware to virtualised hardware: Process Documentation

Overview Customer Login Main Page VM Management Creation... 4 Editing a Virtual Machine... 6

This Deployment Guide is intended for administrators in charge of planning, implementing and

Online Backup Client User Manual Mac OS

Online Backup Client User Manual Mac OS

Nasuni Filer Virtualization Getting Started Guide. Version 7.5 June 2016 Last modified: June 9, Nasuni Corporation All Rights Reserved

Online Backup Client User Manual

How to use the VMware Workstation / Player to create an ISaGRAF (Ver. 3.55) development environment?

LOCKSS on LINUX. CentOS6 Installation Manual 08/22/2013

Quick Deployment Step-by-step instructions to deploy Oracle Big Data Lite Virtual Machine

Deskpool Quick Start. Version: V2.1.x. Based on Hyper-V Server 2012 R2. Shenzhen Jieyun Technology Co., Ltd (

Local Caching Servers (LCS): User Manual

Transcription:

The Industry Standard in IT Infrastructure Monitoring Purpose This document is intended to explain how to convert the stock VMware virtual machine image of Nagios XI to a VirtualBox one and load that image within VirtualBox. Target Audience This document is intended for use by Nagios XI customers who wish to run Nagios XI within VirtualBox rather than VMware and for whatever reason need to do the conversion themselves, or Nagios Enterprises, Nagios Authorized Resellers, or other Nagios Partners who wish to prepare a VirtualBox image for customers. Prerequisites / Assumptions These instructions assume that you have the following already: VirtualBox installed, either the commercial or OSE version A Linux / UNIX host environment (including BSD or Mac OS X) Approximately 80GB of available disk space The VMware image of Nagios XI, unzipped (available from the Nagios Library) The VirtualBox binaries are in your shell PATH and libraries in LD_LIBRARY_PATH. In distributions using a package manager such as Ubuntu, Debian, Fedora, or CentOS this should be done automatically, but in manual / custom installations you may need to do this yourself. Some type conventions Plain text Indicates usual instructions and descriptions Italics Indicates file and directory names, as well as references to utilities within descriptions Bold Indicates labels, such as on buttons Constant Width Indicates commands, options, switches, and command output Constant Width Bold Indicates text which should be literally typed by the user, usually when specifically prompted for Constant Width Italic Indicates text that should be replaced with user-supplied values Shell prompts ending in $ - Indicates that commands are being executed with normal user permissions Shell prompts ending in # - Indicates that commands are being executed as root, in whatever fashion is appropriate for your distribution and environment (eg. Some log in as root directly, some log in as user and use su -, and others use sudo command or sudo -s.) Converting the.vmdk to a raw file So far you have the Nagios XI image in a VMware format,.vmdk. In order to get it to VirtualBox's format, you must go through an intermediary step of a raw file. To do this, first, you will need to install qemu on the host system, which is actually a virtualization tool itself, but you'll only be using it for its conversion capabilities. On Debian and Ubuntu systems, this is done with: # apt-get install qemu All of the work can be done within the directory Nagios XI unzipped to, provided you have access rights to it and there is sufficient disk space on that partition (including user quotas). Go there now: $ cd nagiosxi/ You should see a number of files, ending in.vmdk,.vmsd,.vmx,.vmxf, and.nvram. You are only concerned with nagiosxi.vmdk. If you don't mind using an extra 3.0 GB of disk space, it's a good idea to make a backup of this before you proceed: $ cp nagiosxi.vmdk nagiosxi.bkup.vmdk Page 1

Now you're ready to convert the vmdk to a raw binary image. This will take a long time (dependent primarily on your hard drive speed), and will result in a 60GB file. This is because the vmdk is compressed to only need the amount of space that is actual used, but the raw image will be the total size of the virtual partition, including blank space, which is currently set at 60GB. $ qemu-img convert nagiosxi.vmdk nagiosxi.bin [ Note: The above command won't work properly if your Nagios VM directory is mounted from a remote location via GVFS, returning a rather unhelpful error about not being able to convert for format raw. It is fine for local files as well as NFS mounts. ] Converting the raw file to.vdi You are now ready to convert the raw file to VirtualBox's format,.vdi. $ VBoxManage convertfromraw nagiosxi.bin nagiosxi.vdi This will again take some time, and as of this writing produces a 14GB resultant file. Note that if you accidentally swap the order of the input and output file VBoxManage will complain File= nagiosxi.vdi open error: File not found. If you have worked with VBoxManage in the past, you may have seen the command option convertdd; convertfromraw is simply the newer replacement for that command, and convertdd is now mapped to it. Importing the image into VirtualBox To now use this.vdi disk image, you need to inform VirtualBox that you wish to assign it to a new virtual machine. So, load up VirtualBox and if it's your first time using it you'll see a Welcome screen like this: Click New to enter the new virtual machine image wizard, which will look like this: Page 2

Click Next. You will now be prompted to make up a name for your new VM, and to provide some information about what type of guest operating system it is. For the latter, select Linux and Red Hat, as shown below: Then, select Next again. The following screen will ask how much RAM you want to provision for the VM. This will depend on your organization's resource needs ultimately, but for now at least you can accept the default (384MB) and click Next again. The screen after that will ask what disk to use for the VM. Select Use existing disk, and click the folder icon to specify which one. This will bring to a screen showing VirtualBox's existing media definitions, which if you don't have any other machines defined, will look like this: You want to use the Add button to tell it about your existing.vdi image. That will bring up a standard file browser, in which you can navigate to your nagiosxi/ directory and select the nagiosxi.vdi file, resulting in a media listing like this: Page 3

Choosing Select now will bring back to the previous screen, with the disk name filled in: Select Next again and you will arrive at a confirmation summary. If everything looks good, click Finish to exit the wizard and return to the main VirtualBox screen, now with your Nagios XI virtual machine added: You'll now need to click the Settings button and change one option for your VM before starting it. Under the System tab on the left, and the Motherboard tab in the main area, under Extended Features, you want to check the box for Enable IO APIC. Not doing so appears to cause the VM to hang during boot, although the reason for this is unknown to the author at the time of writing. Page 4

Now click OK to return to the main screen. You are now ready to boot the VM, by clicking the Start button in the VirtualBox manager. This will give you a VirtualBox splash screen, followed by the CentOS Grub countdown, then the system loading messages, and finally a login prompt: Page 5

Shrinking the.vdi to used space only As you saw earlier, the.vdi is currently 14GB in size, although only a fraction of that is actually used. This is because of the way the internal filesystem works, leaving space still technically populated even when unused, which confuses the compression efforts of virtualization solutions. So, the next step is to clear out that unused space to actually be blank, using a utility called zerofree. This part is done within the actual virtual machine, not on the host system. The [root@localhost ~] and sh-3.2 prompt prefixes will remind you of this. First you'll need to log in, using the default credentials of user: root, password: nagiosxi. At the ensuing prompt, execute the following to download the zerofree package for CentOS 5, taking care not to include any space or line break in the URL even though it is wrapped here: [root@localhost ~]# wget http://download.fedora.redhat.com/pub/epel/5/i386/zerofree-1.0.1-5.el5.i386.rpm [ Note that this command could change in the future if the Nagios XI VM is upgraded to a new version of CentOS. ] Next, install the package: [root@localhost ~]# rpm -i -nosignature zerofree-1.01-5.e15.i386.rpm Actually using this tool will require the root partition to be mounted in read-only mode. To accomplish that, you need to first stop all running services. (Otherwise, the step after this will return an error, mount: / is busy.) To do this, it is easiest to first switch to runlevel 1, as this will stop all of the normal built-in system services: [root@localhost ~]# telinit 1 This will bring you to a different prompt, at which you still need to stop the Nagios-specific services. sh-3.2# service nagios stop sh-3.2# service npcd stop sh-3.2# service ndo2db stop You are now ready to remount the root partition in read-only mode. sh-3.2# mount -n -o remount,ro -t ext3 /dev/mapper/volgroup00-logvol00 / Now, you will run the zerofree utility directly on the device which is used for that partition, zeroing out all bits in space marked as being unused on the filesystem. (The reason for the unusual device name is that the VM is using logical volumes internally.) Again, this will take a little while. sh-3.2# zerofree /dev/mapper/volgroup00-logvol00 Once this is done, you can shut down the virtual machine, as the next step will be back on the host system. sh-3.2# shutdown -h now Now you will need to tell VirtualBox to shrink the image to adapt to the new zeroed out space. When invoking this command, you will need the full path to the.vdi file, which can be obtained by appending the file name to the output of pwd (print working (current) directory). The path in the example matches the author's system, but will be different for yours. $ VBoxManage modifyhd --compact /mnt/anthony/documents/work/nagios/nagiosxi/nagiosxi.vdi Further deployment In order to run the converted and shrunk image on additional hosts, simply repeat the steps within the Importing the image into VirtualBox section. Page 6