How to run ESXi on Openstack under a KVM VM - openstack

We run Openstack with KVM as hypervisor and now need to run ESXi 6 or 7 inside a VM (nested virtualization). This is mainly for converting disks to proper vmdk disks, not really running any VMs under ESXi (that is why we are not using a barebone and run esxi as hv)
We run this very same setup under Proxmox without bigger issues, the main point was using the vmxnet driver for the NIX. That is exactly where we fail with Openstack. It seems there is no such driver, using e1000 does not working. Booting the installation iso leads to 'no nic found' in the very end.
We are using Openstack Xena with Debian-Buster as compute (running libvirt) on kernel 5.10/5.14.
Any hints how to get this up and running?

Using https://github.com/virt-lightning/esxi-cloud-images i managed to get it working for 6.5/6.7 but not 7.0.
One seems to not be able to install ESXi via ISO on the an OpenStack instance itself (directly), since no matter if you use e1000 (6.x) or e1000e (7.x) for the installation, the installer will not be able to find the NIC during the installation. Also for the 6.x installer under Openstack, it could not find any disks (with or without the SATA flag).
Instead, I used the repo above to build an pre-installed esxi images shipped via qcow - it is build on my local machine and thus my local libvirt. Not sure yet why this makes a huge difference, maybe the nova based abstraction or something else hinders Openstack (no verification yet).
Building the 6.5/6.7 based qcow2 image locally, importing it via glance (ensure you use e1000 for 6.x and e1000e for 7.x) and then creating a new instance.
This will get you up and running on 6.5/6.7 with proper DHCP and network configuration.
For 7.x the interface is detected, but somehow DHCP is not working. I tried with q35 and different other options, but could not get 7.x to work until know.
I created a fork at https://github.com/EugenMayer/esxi-cloud-images to
proper expose credentials one can login
remove ansible zuul usere with a predefined public key by the author
cleanup the readme

Related

Install Openstack on single node

I want to install Openstack on CentOS 8(single node). I am having single machine (physical machine) where I want to install all nodes of Openstack. This setup I required for simulation only not production use.
I have tried to install Openstack using packstac 3 times but couldn't success.
I got different issues during installation:
1.In first attempt After installation, I tried to create instance, but not getting console of instances even after it got created successfully.
2. In second attempt, during deployment of instance, network not getting allocated.
3. In third attempt, it got stuck at packstack, puppet testing only.
I have followed below 2 links:
https://computingforgeeks.com/install-openstack-victoria-on-centos/
https://www.google.com/amp/s/www.linuxtechi.com/install-openstack-centos-8-with-packstack/amp/
I followed each and every steps mention in the likns.
I want to create two Ubuntu VMs on Openstack.
Can someone provide me some links/video, where I can get everything which is required to install Openstack on single node and create two Ubuntu VMs and assign network to them and test the connectivity between these two VMS.
Thanks in advance.
I would use official Packstack documentation. Note that you should start with a totally fresh Centos installation; i.e. don't try to install Packstack on a server where a previous installation failed (or succeeded).
You can also try Devstack. Its default configuration requires a smaller machine than Packstack (in my experience, 8GB RAM should be sufficient). Same remark: Start with a fresh installation of Centos or Ubuntu.
Microstack is another alternative. Its advantage is a very simple and quick installation; its disadvantage is a very strange (in my opinion) configuration and not a lot of documentation. However, it is suitable for your purpose. It claims to work on any Linux, Windows and MacOS; it does require snap.
I suggest directly installation onto Ubuntu Server.
some time ago I wrote a serie of posts in which I explained in detail how to install OpenStack Rocky. The 2 first blog posts ([1] and [2]) contain commands, examples, content of configuration files that cover common scenarios and tips for the successful installation of most OpenStack services (keystone, nova, glance, etc.) in a single node, and the third post [3] describes the installation of a computing node. This 3rd post is installed in a different node for the sake of making it easier to understand how nova works, but the installation can be safely carried out in the same node than the other components.
I find that the posts are short enough and are very easy to follow (I use that blog as my installation tips, and so I have used them for several deployments). The only caveat is that it is based on Ubuntu, but if you know about your installation, it should be easy to translate the installation to CentOS (some colleagues have used these tips for CentOS installations).
I tried to install Openstack several times last week (october 2021): a) with CentOS 8 Stream to metal hardware (real server) with devstack - no one version was installed (neither Master nor Xena & Wallaby, version Viktoria & below are not for Stream OS); b) Virtual machine with CentOS 8 Stream installed with packstack - installation was clearly successful (!), quite easy for install (according to official RDO project and its homepage), however there is the real problem with virtual and actual networking: no external network is accessible, router created was OK with external connection (router IP was detected successfully from outside) but no connection was possible from and to instance. So I conclude the Openstack package is not completely documented to resolve problems, however its installation can be quite easy (when successfully finish ;) )
Addition: Of coarse, there are resources with an information how network can be configured, official Openstack docs describes different network configurations as well (however it is difficult to find it for one click and being newbie), but anyway this system requires a lot of time to study before usage.

OpenStack Installation without virtualbox

Is there any way to install OpenStack without using virtual box in a single machine?
You can install all openstack services(controller, compute, network) in a single node. But it's not recommended.
If you don't want to install virtualbox you can try VMware
You may also try LXC or XEN if you are using linux. Then create 3 virtual machines and install openstack 3 node configuration.
Yes, of course. Just make sure you have enough resources on the system (single machine) to bare OpenStack. You may use packstack do the All-in-One
deployment. Check out RDO.
There is a possibility of installing openstack(both 2 and 3 node architectures) in a single system. But, things are to be considered. Like the performance of the system used, the primary memory associated with it, the secondary memory that is available, e.t.c
If you're talking about development environment, sure! You don't need a VM at all, and can just install it on your laptop directly! Note that this is not a desirable configuration :)
Other ways are to use a different virtualization tool than VirtualBox, like KVM, or VMware stuff.
Virtual machine is nothing but a system with shared resources. Whatever we do on a VM can be replicated to an individual system.
Make sure you have VT enabled on the hardware , else you may have issues in creating instance on the Compute node.
Regards,
Amit Manel
Whatever you can install in single virtual machine , can also be installed on your machine directly.
After all your machine is much more powerful and stable than your virtual machine.
We use virtual machine just to leave our system intact in case something goes wrong. Just compare the time it would take you to delete and create another virtual machine with time and effort for formatting your entire laptop.
Also, we sometimes use virtual machine if we need to make a network of 2-3 computers for some functionality and we have got only one hardware.
I created with kvm virtual machünes on Ubuntu 14.04
If you create the virtual machines and the virtual networks you can use it.
For the easiest way if you use an orchestration/deployment tool e.g. Mirantis Fuel
Surprising no body talked about Dockers. You can run openstack in a docker container.
According to my experience, always try to install openstack on a fresh system( either on a freshly created VM or on a newly installed OS). I have installed openstack many times, and trust me no error will come just follow this link on a newly setup machine. For old system, I was stuck for 3 days, and only GOD knows where from the hell those errors were showing up.
PS: I have always tried ubuntu system.

Openstack and devstack

Does devstack completely install openstack? I read somewhere that devStack is not and has never been intended to be a general OpenStack installer. So what does devstack actually install? Is there any other scripted method available to completely install openstack(grizzly release) or I need to follow the manual installation steps given on openstack website?
devstack does completely install from git openstack.
for lesser values of completely anyways. devstack is the version of openstack used in jenkins gate testing by developers committing code to the openstack project.
devstack as the name suggests is specifically for developing for openstack. as such it's existence is ephemeral. in short, after running stack.sh the resulting ( probably ) functioning openstack is setup... but upon reboot it will not come back up. there are no upstart or systemd or init.d scripts for restarting services. there is no high availability, no backups, no configuration management. And following the latest git releases in the development branch of openstack can be a great way to discover just how unstable openstack is before a feature freeze.
there are several vagrant recipes in the world for deploying openstack, and openstack-puppet is a puppet recipe for deploying openstack. chef also maintains an openstack recipe as well.
Grizzly is a bit old now. Havana is the current stable release.
https://github.com/stackforge/puppet-openstack
http://docs.opscode.com/openstack.html
http://cloudarchitectmusings.com/2013/12/01/deploy-openstack-havana-on-your-laptop-using-vagrant-and-chef/
and ubuntu even maintains a system called maas and juju for deploying openstack super quickly on their OS.
https://help.ubuntu.com/community/UbuntuCloudInfrastructure
http://www.youtube.com/watch?v=mspwQfoYQks
so lots of ways to install openstack.
however most folks pushing a production cloud use some form of configuration management system. that way they can deploy compute nodes automatically. and recover systems quickly.
also check out openstack on openstack.
https://wiki.openstack.org/wiki/TripleO
I think the code should be same, but at least the configuration is not same, for example, devstack will by default use nova network. In a manual installation, you can choose neutron. so:
if you are starting to learn openstack, devstack is a good starting point. with it, you can quickly have a development env.
if you are deploying openstack env, devstack is not a choice, and
instead you need install it following the installation guide.
If you would like another scripted option for deployment, you can try Packstack. This will work only on Fedora and RHEL.
https://wiki.openstack.org/wiki/Packstack
https://www.rdoproject.org/install/quickstart/
In this, you can choose which services you would like to install. For example you may choose to install Neutron for networking purposes, instead of using nova.
Also, it lets you deploy multiple instances of compute nodes by just providing it's IP !!
Yes. Devstack is a tool which help you build all in one for Openstack environment in quickly (Just take a coffee cup and wait until complete). Normally they were using for developer to develop new features and/ or test code quickest. For operator, we need to setup by manual step by step for each services.
To build via devstack repo then you need pull newest source-code from http://git.openstack.org/openstack-dev/devstack. then create new local.conf in devstack folder. And run ./stack.sh.
For example local.conf: https://github.com/pshchelo/stackdev/blob/master/conf/local.conf.sample
Yes, Devstack install all the components of Openstack. But when you use basic configuration then it will install core components of openstack which are the base of openstack cloud platform to run some basic things.
And in Advance configuration of openstack you should configure your local.conf file for what type of services and components you want to install or use in your cloud.
https://github.com/openstack/tacker/blob/master/devstack/local.conf.example

How to use Docker (or Linux Containers) for Network Emulation?

Edit: As of March 2019, although I have not tested it, I believe Docker now has the ability to do real network emulation.
Edit: As of May 2015, SocketPlane (see website and repo) has joined the Docker team and they're in the process of integrating their OVS solution into Docker core. It appears as if theirs will be the winner of the various Docker networking solutions.
So I've been using Mininet to run tests on my networking software. It seems to have hit its limits though as Mininet containers are essentially linux containers with only a networking stack. I'd like each container to have its own networking stack, file system AND set of processes - basically I'd like a container as close to a VM as possible. Which brings me to Docker, as I understand, Docker is opposite of Mininet, its containers have a file system and their own processes but not their own networking stack. I'm leaning towards Docker as it has a nice API for forking containers, using the disk space of only the diff. My question is, is it possible to create a set of linux containers (with Docker or similar) with the following container layout + network interface setup?
You can use Pipework for that purpose. It is specifically one of the scenarios it implements (private networks between containers, in addition to the standard Docker network).
I am aware of two open-source network emulators that use linux containers:
The CORE Network Emulator uses containers and each container has its own filesystem (or partial filesystem, because it only creates mount namespaces for the directories required by the services running on each node).
The VNX network emulator is another option. It uses either KVM or LXC to create virtual nodes (but I have not tried the LXC option, yet).
CORE Network Emulator does have a Docker Service that I contributed and wrote an article about. The initial version that is in 4.8 is mostly broken but I have fixed and improved it. A pull request is on GitHub.
The service allows you to tag Docker Images with 'core' and then they appear as an option in the services settings. You must select the Docker image which starts the docker service in the container. You then select the container or containers that you want to run in that node. It scales quite well and I have had over 2000 nodes on my 16Gb machine.
You mentioned OVS as well. This is not yet built in to CORE but can be used manually. I just answered a question on the CORE mailing list on this. It gives a brief overview of switching out a standard CORE switch(bridge) with OVS. Text reproduced below if it is useful:
Not really used openvswitch before but had a quick look.
I installed openvswitch via my package manager (Ubuntu 15.04):
sudo apt-get install openvswitch-switch
I then built a very simple network in CORE 4.8. 2 PCs connected to a switch. I started the emulation in CORE. Then on the host I looked at the bridges that had been set up:
sudo brctl show
bridge name bridge id STP enabled interfaces
b.3.76 8000.42c789ce95e9 no veth1.0.76
veth2.0.76
docker0 8000.56847afe9799 no
lxcbr0 8000.000000000000 no
I can see the bridge that represents the switch is called b.3.76 and has interfaces veth1.0.76 and veth2.0.76 attached to it. I delete the bridge:
sudo ip link set b.3.76 down
sudo brctl delbr b.3.76
I then set up the openvswitch bridge:
sudo ovs-vsctl add-br b.3.76
sudo ovs-vsctl add-port b.3.76 veth1.0.76
sudo ovs-vsctl add-port b.3.76 veth2.0.76
I can now ping between the nodes so the switch seems to be working. I have not tried to do any further configuration of openvswitch.
When you stop the CORE emulation it does not obviously delete the openvswitch bridge or ports so you have to do that by hand:
sudo ovs-vsctl del-port veth2.0.76
sudo ovs-vsctl del-port veth1.0.76
sudo ovs-vsctl del-br b.3.76
This would be relatively simple to automate with a script or with a little bit of work could be integrated in to docker.
Hope this helps
#jpillora IMUNES network emulator uses Docker for their L3 (PC, Router, Host) and Open vSwitch for the L2 (Hub, Switch) nodes. For example, the Router node is actually a Docker container with a Debian Jessie system that runs Quagga automatically configured so you just have to draw the nodes inside the GUI. You can then access those containers by double-clicking on them and do whatever you would do on a Linux system. It uses a "special" Docker image available on Hub called imunes/vroot that uses a dummy init process so it doesn't terminate. Technically, with a bit of tweaking you can replace it with whatever you want. Its source code is available on Github.
I think it would be appropriate for you use case.
I tried CORE and a few others but found them hard to set up and run (especially in AWS or on Mac). They are probably powerful but overkill if you just want to simulate simple networks.
Hence I wrote YANS (Yet Another Network Simulator). YANS is based on Docker. Even I myself am surprised to see how fast it runs. Give it a shot!

Is it possible to run OpenStack on a laptop/desktop?

I have some questions:
Is it possible to install openstack on a Notebook with a 4GB DD3 Ram? Because the website says it needs atleast 8GB of RAM.
They say it requirs a double-QuadCore , I assue that means Octacore. Can we install that on a Quadcore?
They say that there is no possibility to install it on a NAS . Did you find any where if there is a possibility to do?. I dint find any even after asking our friend(google).
All in all, is it at-all possible to install on it a notebook/Desktop?
That advice is for production environments,
so 1)If you just want to play around your notebook will do fine. I had a succesful test-run on a 1.2 Ghz 1GB Netbook. It became incredibly slow when it launched it's first instance...
With a Double Quadcore they actually mean two seperate Quad-cores, as in two quad-core xeon processors on a single motherboard
So 2) yes you can install it on a quad-core.
3) a NAS device running openstack an openstack storage service seems to be unlikely indeed. You will most likely need more computing power.However If your NAS supports NFS or SSH or sth you can probably mount this drive and use it for storage.
4) You can perfectly build a all-in-one openstack test setup on your notebook. Performance will be low, but acceptable for testing.
It depends on what you mean by "install OpenStack". OpenStack itself is an extremely modular framework consisting on many services (Compute, Networking, Image service, Block Storage, Object Storage, Orchestration, Telemetry, ...). On top of that, a typical production deployment of OpenStack also requires several components, like load balancers, caching systems, firewalls, web servers and others. It is definitely possible to install a minimal openstack system, even on an average laptop.
The simplest way to run OpenStack on a laptop/desktop is to use Devstack, a shell script that installs all services from source and run them (by default) on a single machine. It is customizable enough to provide very good testing ground; it's used by OpenStack developers as well as the OpenStack QA team to test latest developments against "real" systems.
To avoid messing up your system, it's generally recommended to install OpenStack in a VM. From devstack doc:
DevStack should run in any virtual machine running a supported Linux release. It will perform best with 2Gb or more of RAM.
As of the time of this writing (Jan 2015), supported distros are:
Ubuntu (latest LTS)
Fedora
CentOS
Regarding NAS: you can of course use it, but "outside" Openstack apis, by providing mount points to your vms. It's even mandatory if you want to support live migration.

Resources