1. Home
  2. Linux
  3. OpenStack Fake Driver for Cloud Simulations [Tutorial]
  1. Home
  2. OpenStack
  3. OpenStack Fake Driver for Cloud Simulations [Tutorial]

OpenStack Fake Driver for Cloud Simulations [Tutorial]

OpenStack is a popular cloud operating system that allows you to control large amount of compute, storage and networking resources. It supports all popular Hypervisors such as KVM, Xen, VMware, HyperV etc…and this integration is made using compute drivers – libvirt.LibvirtDriver for KVM, xenapi.XenAPIDriver for Xen, vmwareapi.VMwareVCDriver for VMware and hyperv.HyperVDrive for HyperV. But have you ever wanted to start thousands of virtual machines requiring huge amount of memory and storage? (I mean, Cloud Simulation!) Well, few might want to use CloudSim framework, but you can also do the same using OpenStack. Along with the compute drivers for popular hypervisors, OpenStack Fake Driver simply enables thousands of VCPUs and huge amount of storage & RAM in the compute node.

The core part of the nova-compute service is the virtualization driver (called as compute driver) that interface with Hypervisor. For instance, the compute host that supports KVM hypervisor will use libvirt.LibvirtDriver as the compute driver and lets you start real VMs. Whereas, the Fake driver will bypass the hypervisor and just starts fake VM actions such as creating a VM, launching, stopping or getting diagnostic information. To do that, you need to enable Fake driver in the compute nodes as shown below:

Enable OpenStack Fake Driver in Mitaka

Step 1: Set compute_driver attribute in /etc/nova/nova-compute.conf to use fake.FakeDriver.

[compute-host]# vim /etc/nova/nova-compute.conf

Step 2: Restart nova-compute service.

[compute-host]# /etc/init.d/nova-compute restart

Step 3: Verify if the fake driver is enabled.

Go to horizon dashboard and click on “Hypervisor”. Lookout for value “fake” in column “Type” as shown in the below image.

openstack fake driver

The Fake driver will enable 1000 VCPUs, 781GB RAM and 585TB storage per nova-compute node. Now the fake driver will handle all VM requests.

Step 4: Adjust quotas

Though Fake driver allows you to launch large number of VMs, it might be constrained by the quotas set for the user. So, adjust quotas via horizon dashboard.

openstack fake driver


Step 5: Fake driver Python Script.

The fake driver’s source is present at /usr/lib/python2.7/dist-packages/nova/virt/fake.py. If you ever want more than 1000 VCPUs in a compute node , then you need to adjust the values in fake.py.

That’s it! Start your simulations!

Related Content
Updated on September 2, 2017

Was this article helpful?

Related Articles

Add A Comment