Anytime one is doing integration with OpenShift or OpenStack it always seems there are storage partner use cases. Netapp is often one of those use cases but in a lot of circumstances the actual Netapp hardware is not available for testing features and functionality. That is the beauty of the Netapp simulator image that Netapp provides. It allows anyone wanting to test Netapp feature functionality and in my case integration without having the real hardware. However the drawback is I do not want to run Vmware or VirtuaBox to use the simulator.
Fortunately I have come up with a method that allows me to get the simulator up and running on a generic RHEL8 KVM hypervisor. The following blog will walk through the process of the setup.
The first step is to get the Netapp simulator from Netapps site: https://mysupport.netapp.com
The Netapp simulator comes in a ova format which is nothing more then a glorified tar file. So the first step is to untar the file to get access to the contents:
# ls -1 vsim-netapp-DOT9.6-cm_nodar.ova # tar -xvf vsim-netapp-DOT9.6-cm_nodar.ova vsim-netapp-DOT9.6-cm.ovf vsim-netapp-DOT9.6-cm.mf vsim-netapp-DOT9.6-cm-disk1.vmdk vsim-netapp-DOT9.6-cm-disk2.vmdk vsim-netapp-DOT9.6-cm-disk3.vmdk vsim-netapp-DOT9.6-cm-disk4.vmdk
The extraction shows there are 4 vmdk disks which we now need to convert to qcow2 using qemu-img:
# qemu-img convert -f vmdk -O qcow2 vsim-netapp-DOT9.6-cm-disk1.vmdk vsim-netapp-DOT9.6-cm-disk1.qcow2 # qemu-img convert -f vmdk -O qcow2 vsim-netapp-DOT9.6-cm-disk2.vmdk vsim-netapp-DOT9.6-cm-disk2.qcow2 # qemu-img convert -f vmdk -O qcow2 vsim-netapp-DOT9.6-cm-disk3.vmdk vsim-netapp-DOT9.6-cm-disk3.qcow2 # qemu-img convert -f vmdk -O qcow2 vsim-netapp-DOT9.6-cm-disk4.vmdk vsim-netapp-DOT9.6-cm-disk4.qcow2
Next copy those converted qcow2 images to a KVM hypervisor where they are accessible. In my case I am just going to copy them over to a system into the default storage pool location /var/lib/libvirt/images:
# cp *qcow2 /var/lib/libvirt/images # ls -1 /var/lib/libvirt/images/vsim-netapp-DOT9.6-cm-disk[1-4].qcow2 /var/lib/libvirt/images/vsim-netapp-DOT9.6-cm-disk1.qcow2 /var/lib/libvirt/images/vsim-netapp-DOT9.6-cm-disk2.qcow2 /var/lib/libvirt/images/vsim-netapp-DOT9.6-cm-disk3.qcow2 /var/lib/libvirt/images/vsim-netapp-DOT9.6-cm-disk4.qcow2
Now that we have the images in place we can use virt-manager to create are virtual machine. I am using virt-manager because I want to ensure we can visually see the requirements needed for this environment. The configuration must be exact or the underlying freebsd kernel will panic on boot.
First lets look at the CPU configuration. For the simulator to work it requires 2 cpu cores with host-passthrough and I found manually setting the CPU topology worked. The configuration should look like the one below:
Next are the memory requirements. Here one can configure anything more then 5GB of memory. I used 10GB of memory in this example:
One of the most important aspects of the simulator is the networking components. Here we need to configure 4 network interfaces. Each network interface should use the e1000 driver. The first two network interfaces should be configured with a hostonly network source like the example below:
The third and the fourth network interface should have their network source configured for some external network. The third nework interface actually ends up becoming e0c inside the simulator and is the management interface. The fourth network interface will be e0d and could be used as an access point for a vserver. Below is an example of what the third and fourth network interfaces look like in my example:
Earlier we converted four vmdk images to qcow2 and placed them in a libvirt accessible location. Now we need to add those disks in their numbered ordered to the virtual machine. Each disk should be added as an IDE disk bus. Below is an example of what the configuration should look like for each disk:
Finally switch the console from Spice to VNC as defined below:
At this point the Netapp simulator virtual machine should be ready to boot. So lets start the virtual machine up and be ready to press Control-C when prompted to get into boot menu:
Once in the boot menu select option 4 to wipe drives and configuration:
The Netapp simulator will confirm that it should really wipe and configuration and drives:
Once confirmed the Netapp simulator will reboot the virtual machine. Then it will go about wiping configuration and drives. Once complete it will present the create a cluster wizard:
At this point the wizard will be used to configure the new Netapp filer just like one would if it were a real filer.