ONTAP Select - Installing ONTAP Deploy 2.6.1 on CentOS 7.2 with KVM, Nested in VMware Workstation

Alas, I don’t have a spare server to test out deploying ONTAP deploy on a physical KVM host, but I can try with a nested host in VMware Workstation. I’m a KVM noob, and no Linux guru either, so if I can get it working, anyone can.

1) Hardware Setup

CentOS 7.2 was downloaded from the internet.
The ISO used here is CentOS-7-x86_64-Everything-1511.iso
(we use the Everything ISO, but we just do a minimal setup)

CentOS KVM Host Hardware:


Memory = 8 GB
Processors = 4
Hard Disk (SCSI) = 80 GB
CD/DVD (IDE) = CentOS-7-x86_64-Everything-1511.iso
1 x Network Adapter


Note: The hardware above is sufficient to support host and ONTAP Deploy requirements of:
- Virtual CPUs: 2
- Virtual memory: 4 GB
- Storage: 40 GB (The ONTAPdeploy VM has a 40GB disk)

Image: Virtual Machine Settings

2) Host Setup: Installing the OS

2.1) Boot the VM with the ISO attached
2.2) From the initial CentOS 7 splash screen, choose “Install CentOS 7” and press ENTER

Image: CentOS 7 install splash screen (booting from iso)

2.3) Press ENTER to begin the installation process
2.4) In the CentOS 7 Installation GUI choose language and keyboard, and click Continue
2.5) Make amendments as required in the CentOS 7 Installation Summary.
Below are my selections/acceptances of defaults:

SECURITY POLICY: No profile selected

SOFTWARE:
- INSTALLATION SOURCE: Local media
- SOFTWARE SELECTION: Minimal Install

SYSTEM
- INSTALLATION DESTINATION: Automatic partitioning selected
- KDUMP: Kdump is enabled
- NETWORK & HOST NAME:
Host name: chost-00.lab.priv
Address: 192.168.255.10
Netmask: 255.255.255.0
Gateway: 192.168.255.2
DNS Servers: 8.8.8.8,8.8.4.4
Search domains: lab.priv

The click Begin Installation

2.6) CONFIGURATION: USER SETTINGS
Set the root password
User creation: admin

2.7) Reboot

2.8) Login to the CLI>


# halt


- Add a second network interface that we’ll use for the VM bridge
- Disconnect the ISO
- Take a snapshot of the VM
- Power on

3) Host Setup: Install the right packages

3.1) Install KVM and its associated packages (note that some of the below will say “Nothing to do” but I’ve included them for completeness):


# yum install qemu-kvm
# yum install qemu-img
# yum install virt-manager
# yum install libvirt
# yum install libvirt-python
# yum install libvirt-client
# yum install virt-install
# yum install virt-viewer
# yum install bridge-utils


3.2) Start and enable the libvirtd service


# systemctl start libvirtd
# systemctl enable libvirtd


3.3) Load KVM, check it is running (the lsmod should give at least one line of output), and make it run at startup:


# modprobe kvm
# lsmod | grep kvm
# echo "modprobe kvm" >> /etc/rc.modules
# chmod +x /etc/rc.modules


Note: I don’t install the graphical virt-manager, since I want to keep this as minimal a CentOS install as possible, and not have to install GNOME Desktop.

3.4) Configure Bridge Interface

Note: Insert to enter in VI. Then to exit - ESCAPE : wq


# cd /etc/sysconfig/network-scripts
# ls
# ip addr show


Create an ifcfg file for your second network interface as below (change ens34 with the name of your interface):


# vi ifcfg-ens34
TYPE="Ethernet"
BOOTPROTO="static"
DEVICE="ens34"
ONBOOT="yes"
BRIDGE="br0"


Create an ifcfg file for the bridge as below:


# vi ifcfg-br0
TYPE="Bridge"
BOOTPROTO="static"
DEVICE="br0"
ONBOOT="yes"


Confirm the files are correct:


# cat ifcfg-ens34
# cat ifcfg-br0


Restart the network service to enable the bridge interface, and check the bridge interface is UP:


# systemctl restart network
# ip addr show br0


3.5) Install the LS HW package, and LS SCSI package:


# yum --setopt=obsoletes=0 install lshw
# yum --setopt=obsoletes=0 install lsscsi


4) Install ONTAP Deploy VM

The automatic partitioning is not ideal, but we do have enough space.


# df -h


DF -h should show around 49G usable. First, we need to copy the ONTAPdeploy2.6.1.raw.tgz from my Windows laptop to the CentOS server. I use PSCP.exe as below:


pscp "C:\ONTAPdeploy2.6.1.raw.tgz" root@192.168.255.10:/


Then untar it:


# cd /
# tar -xvzf ONTAPdeploy2.6.1.raw.tgz


If you want/it is necessary, you can remove gunzip file:


# df -h
# rm ONTAPdeploy2.6.1.raw.tgz


Install ONTAP Deploy:


# ls -altr /
# virt-install --name=deploy-kvm --vcpus=2 --ram=4096 --os-type=linux --controller=scsi,model=virtio-scsi --disk path=/ONTAPdeploy.raw,device=disk,bus=scsi,format=raw --network bridge=br0 --console=pty --import --wait 0


Example:


[root@chost-00 /]# virt-install --name=deploy-kvm --vcpus=2 --ram=4096 --os-type=linux --controller=scsi,model=virtio-scsi --disk path=/ONTAPdeploy.raw,device=disk,bus=scsi,format=raw --network bridge=br0 --console=pty --import --wait 0
WARNING  KVM acceleration not available, using 'qemu'
WARNING  No operating system detected, VM performance may suffer. Specify an OS with --os-variant for optimal results.

Starting install...
Domain creation completed.


See deploy-kvm is running:


# virsh list


Example:

[root@chost-00 /]# virsh list
 Id    Name            State
------------------------------
 1     deploy-kvm      running

Next steps would be to connect to the console and complete the configuration of the Deploy VM. But since this was running on CentOS on VMware Workstation on Windows on a laptop (not a super beefy one either), the performance is not great, so we’ll end this post here.


# virsh console deploy-kvm



Note: This is my first experience running a VM in KVM. Hopefully this post is not too shabby and shows that it’s not that difficult.

Comments