CloudStack installation: Error creating instance - centos6

I am a newbie to CloudStack. I installed it using Quick Install Guide on CentOS 6.4 and kvm. As my network is a LAN at my faculty and there is a DHCP and Gateway for connecting to internet, at the beginning I defined address pool of Pod and guest withing the range of LAN addresses. But I wasn't able to create instances getting this error:
2013-06-17 13:44:03,445 DEBUG [cloud.storage.StorageManagerImpl] (Job-Executor-1:job-9) Insufficient un-allocated capacity on: 200 for volume allocation: [Vol[3|vm=3|ROOT]] since its allocated percentage: 2.2468850974329963E7 has crossed the allocated pool.storage.allocated.capacity.disablethreshold: 0.85, skipping this pool
I guessed this is because of IP conflicts between pool and dhcp range. So I re-installed it (removed and re-installed cloud-agent and cloud-client), and this time defined a different subnet for address pools (255.0.0.0) from dhcp subnet (255.255.0.0). But now I'm getting this error while "Creating system VMs" after doing the configuration using UI:
WARN [cloud.consoleproxy.ConsoleProxyManagerImpl] (consoleproxy-1:) Exception while trying to start console proxy com.cloud.exception.AgentUnavailableException: Resource [Host:1] is unreachable: Host 1: Unable to start instance due to Unable to start VM[ConsoleProxy|v-2-VM] due to error in finalizeStart, not retrying at com.cloud.vm.VirtualMachineManagerImpl.advanceStart(VirtualMachineManagerImpl.java:847) at com.cloud.vm.VirtualMachineManagerImpl.start(VirtualMachineManagerImpl.java:472) at com.cloud.vm.VirtualMachineManagerImpl.start(VirtualMachineManagerImpl.java:465) at com.cloud.consoleproxy.ConsoleProxyManagerImpl.startProxy(ConsoleProxyManagerImpl.java:627) at com.cloud.consoleproxy.ConsoleProxyManagerImpl.allocCapacity(ConsoleProxyManagerImpl.java:1164) at com.cloud.consoleproxy.ConsoleProxyManagerImpl.expandPool(ConsoleProxyManagerImpl.java:1981) at com.cloud.consoleproxy.ConsoleProxyManagerImpl.expandPool(ConsoleProxyManagerImpl.java:173) at com.cloud.vm.SystemVmLoadScanner.loadScan(SystemVmLoadScanner.java:113) at com.cloud.vm.SystemVmLoadScanner.access$100(SystemVmLoadScanner.java:34) at com.cloud.vm.SystemVmLoadScanner$1.reallyRun(SystemVmLoadScanner.java:83) at com.cloud.vm.SystemVmLoadScanner$1.run(SystemVmLoadScanner.java:73) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) Caused by: com.cloud.utils.exception.ExecutionException: Unable to start VM[ConsoleProxy|v-2-VM] due to error in finalizeStart, not retrying at com.cloud.vm.VirtualMachineManagerImpl.advanceStart(VirtualMachineManagerImpl.java:814) ... 19 more
Is the problem related to IP conflict? If yes, how to solve it?
Thanks

You can create a nested hypervisor lab and deploy cloudstack. The easiest way to use cloudstack with opensource Xenserver hypervisor.
Bellow post shows the same process with steps.
Part 2: http://www.cloudometry.in/2015/03/apache-cloudstack-implementation-step_29.html
Part 3: http://www.cloudometry.in/2015/03/apache-cloudstack-implementation-step_96.html

First the last exception:
Some background is required to understand why CloudStack is trying to start a VM on your hypervisor. The VM is a a System VM. System VMs are used by CloudOSs to distributed services across a cloud. Currently, CloudStack has three kinds: secondary storage, virtual router and console proxy VM. The console proxy VM allows you to view the virtual framebuffer of a VM. Usually you need access to the hypervisor itself. Instead, a console proxy is installed on the hypervisor. Note that system VMs and user VMs are started using the same code. Therefore, the exception suggests that there is a general problem with creating VMs.
The specific details of the exception suggest that CloudStack cannot reach the agent on the KVM box. Why not check that you can SSH from the CloudStack management server to the KVM hypervisor? Secondly, look at the outgoing connections from the KVM box. Is there a TCP connection from the agent on the KVM box to the CloudStack management server?

Related

Unable to access Kafka Broker from separate LAN machine

EDIT: OBE - figured it out. Provided in answer for anyone else who has this issue.
I am working in an offline environment and am unable to connect to a kafka broker, on machine 1, from a separate machine, machine 2, on a LAN connection through a single switch.
Machine 1 (where Kafka and ZK are running):
server.properties
listeners=PLAINTEXT://<ethernet_IPv4_m1>:9092
advertised.listeners=PLAINTEXT://<ethernet_IPv4_m1>:9092
zookeeper.connect=localhost:2181
I am starting kafka/ZK from the config files located in kafka_2.12-2.8.0/config and the running the appropritate .bat from kafka_2.12-2.8.0/bin/windows.
On machine 2 I am able to ping <ethernet_IPv4_m1> and get results; however, I fail to get a TCP connection if I run Test-NetConnection <ethernet_IPv4_m1> -p 9092 while kafka is running. In python 3.8.11, using KafkaConsumer from kafka-python, I receive the NoBrokersAvailable error when using <ethernet_IPv4_m1>:9092 as the bootstrap_server. Additionally if I run a python:3.8.12-buster docker container with a '/bin/bash' entrypoint, and follow along with the kafka-listener walkthrough I am unable to connect to the broker. I'm in the exact situation as Scenario 1 provided in the link, but the walkthrough assumes you can connect to the broker. I have also tried opening the 9092 port in my Windows Defender for in/outbound traffic (on both machines) and still have no luck. Neither Kafka, nor networking, are my strong suits and every tutorial/answer I find refers to changing the listener and advertised.listener in the kafka server.properties file - I think I correctly did this, but am unsure. This is everything I have tried so far, any recommendations would be greatly appreciated. Thank you.
For M1, the private network was the active network.
Go to control panel -> Firewall & network protection -> advanced settings (must be admin) -> setup inbound/outbound rules for port 9092 for the active network.

Installing Wazuh Server in Windows Server

We do have one server [Windows Server 2016] and i want to monitor that server, by installing Wazuh Tool.
I saw the documentation, but still i am getting confused. Should i need to install,
Wazuh Server
Wazuh Agent
Kibana
in server.? I don't see any article related to installing Wazuh Server in Windows Machine.
After following up the wazuh documentation, i can able to go up to a certain limit.
Installed Virtual Box in Windows Server.
Downloaded Wazuh OVA file and imported the same into virtual box.
Now i can able to connect to Wazuh Server, using the default credentials.
Now i stuck up at one place. I need to get the IP. I tried with 'Ip addr' command. But still, it is showing 127.0.0.1/8
As far as i checked, it is creating some dynamic IP's. Is there a way to setup Static IP. So that, i can able to access Wazuh Web console
through that IP.
Some of my findings:
It seems that the eth0 network interface for the VM does not have an IPv4 address assigned to it.
In the video in the documentation when running 'ip addr' it shows a dynamic IPv4 address as well as the IPv6 address so I suspect that this is the reason you cannot access the web console. This could be caused by the type of network interface you created for the VM in virtual box.
-------- Edited----------
As per your guidence, i did the following things.
Wazuh Server:
Virtual Box -> Adapter 1 -> Bridged Adapter
Virtual Box -> Adapter 2 -> Host-only Adapter
Started the Virtual Box and checked the 'Ip addr' command. Got the following IP's, eth0 [192.168..] and eth1 [10.0..]
In browser, i tried https://192.168.. and i can able to login to kibana.
Wazuh Agent:
The server which ever i am going to monitor, i installed Wazuh Agent. In the Wazuh Config file, i need to specify
Here i am bit confused. Should i need to give the actual server IP [where the wazuh server is] or i need to specify the IP's which i am getting in 'Ip Addr' command.?
I have tried all the IP's. When i check the Logs, it is showing like,
start_agent.c:100 at connect_server(): ERROR: (1216): Unable to connect to 'xx.xx.xx.xxx': 'Bad file descriptor'.
I recommend you reading the Architecture guide for a better understanding of how Wazuh works. Its architecture is based on agents, which means you need to install Wazuh agent on those endpoints you want to monitor (for example, your Windows server), and then connect these agents to a Wazuh Manager server (which need to be installed in a Linux machine, so you will need another server).
Kibana/Splunk are optional and useful tools to index the data generated by the manager for better visualization. I recommend using Kibana and the Elasticsearch Stack.
For the Linux Wazuh Manager server I recommend trying the all in one deployment, or, if you will have few agents connected and doesn't want to deploy any instance from scratch, you could try the pre-built Virtual Machine appliance (OVA)
I hope this helps you. The best point to start using Wazuh is the Getting started guide. I recommend you read that first of all.
------------------------ edit --------------------
Hello,
I'm sorry if I weren't clear enough. Wazuh has two main components: Manager (server in the documentation) and Agent.
The manager is also called a server because it serves the Wazuh service itself. That means the part of Wazuh that analyzes security events and generates alerts.
But Wazuh agent (despite its name) is also installed on servers that you want to monitorize and it is used to send security events to the Wazuh Manager (server) so they could be analyzed.
That said, if you want to correctly monitorize a Windows server you need to install the Wazuh Windows agent on it because it is designed to monitorize Windows servers. And you need to connect this agent to a Wazuh server. Here, you have different options:
You could install the Wazuh Manager in another (Linux) server.
You could install docker and docker-compose on your Windows server and use the wazuh-docker GitHub repository to deploy a Wazuh manager stack (with Wazuh, Elasticsearch and Kibana) to connect you, agent, to.
You could install the Wazuh OVA (VM appliance) on Virtualbox or similar software (this Virtual machine has installed by default Wazuh Manager, Elasticsearch and Kibana as well).
I see that you're trying with the 4th, deploying the Wazuh OVA on Virtualbox. Nevertheless, remember that you must have to install the Windows agent as well and connect it to the Wazuh Manager.
Regarding the IP question. My advice here is to enter the VirtualBox configuration for the machine and set up two network interfaces (or adapters). One host-only adapter (which will have a static IP that you could use to connect from your local browser) and other with a bridged adapter (to connect to the internet). Then, I recommend using nmtui (a console user interface for network manager) to set up your static IP as in the attached capture. That should be enough.

Error: No sql_connection parameter is established when creating instances on openstack pike devstack

I've successfully installed Openstack Devstack pike on my Ubuntu 16.04 by following this link:
https://www.mirantis.com/blog/how-to-install-openstack-on-your-local-machine-using-devstack/.
when i tried to create an instance i got No sql_connection parameter is established as an error.
I've checked /etc/nova/nova.conf and database configuration was as following:
[database]
connection = mysql+pymysql://root:mypassword#127.0.0.1/nova_cell0?charset=utf8
[api_database]
connection = mysql+pymysql://root:mypassword#127.0.0.1/nova_api?charset=utf8
Besides i didn't find where the logs related to openstack are located. I only accessed to /opt/stack/logs/stack.sh.log and it doesn't any process.
How can i resolve this issue?
I'll be grateful if someone could help me resolving it.
I had this problem on Devstack Pike when I wanted to create a VM (from a HOT template) connecting it to an already existing network (public, which exists by default.)
(You can set up networking for a VM in (at least) 2 ways: either connect a port to it, or connect the VM to an existing network. In the latter case a port is implicitly created.)
The problem was that public belonged to another project.
When I specified a network that belonged to the same project, it was successful.
I hope this helps.
Edit: Btw, the Devstack logs go into the syslog.

Can OpenStack be configured to start certain instances when the hypervisor reboots?

Say we have a power outage, and a hypervisor gets reset. Openstack will start up the nova services, etc.
But, it will not start back up any VMs which were running when the hypervisor went down. Can it be configured to do this?
Perhaps one workaround would be a to make a startup script on the hypervisor, or a crontask somewhere, which starts specified VMs assigned to that hypervisor if they are not running, but that's less than ideal..
Currently running Havana with KVM, but will be upgrading to Icehouse soon.
There's this section in /etc/nova/nova.conf:
# Whether to start guests that were running before the host
# rebooted (boolean value)
#resume_guests_state_on_host_boot=false
If you uncomment that last line, and change it to =true, then restart nova services everywhere, that should do what you want.

MSDTC communication fails over VPN

I have an application that runs transactions spanning over multiple databases on the same server. Naturally this involves the Microsoft Distributed Transaction Coordinator and everything works like it is supposed to.
Howver, when I remotely connect to the network where the server is hosted via VPN and run the application on my local machine I receive the following error:
System.Transactions.TransactionManagerCommunicationException:
"Communication with the underlying transaction manager has failed."
Caused by:
System.Runtime.InteropServices.COMException:
Error HRESULT E_FAIL has been returned from a call to a COM component.
Here is the stack trace for the originating exception:
at System.Transactions.Oletx.IDtcProxyShimFactory.ReceiveTransaction(UInt32 propgationTokenSize, Byte[] propgationToken, IntPtr managedIdentifier, Guid& transactionIdentifier, OletxTransactionIsolationLevel& isolationLevel, ITransactionShim& transactionShim)
at System.Transactions.TransactionInterop.GetOletxTransactionFromTransmitterPropigationToken(Byte[] propagationToken)
The problem arises only when I connect to the server through a VPN tunnel.
Note also that I have temporarly disabled Windows Firewall on my local machine, just to be sure it doesn't block the MSDTC.
Does anyone know of any issues when running MSDTC through VPN?
I suggest you run DTCPing (available from the Microsoft site somewhere) This is run at the same time on both machines and detects all manner of DTC problems.
Be careful I had great difficulties with this tool until I actually read the instructions and started both sides of the test up before I clicked the start test button.
Do you administer the VPN connection? There might be restricted ports on the VPN. Likewise, do you administer your servers? Your servers might only allow connections from IP addresses on the inside and not on the segment used for VPN service. If you are the administrator, perhaps saying which VPN software you are using will help.
I'm having the same problem using a Windows 7 x64 client and a Server 2003R2 server. I have been able to make it work (on the same vpn, same server) using XP, Vista x86, and Windows 7 x86. I have a support call with Microsoft open and they are looking into it. I'm curious - what operating system are you guys using on your client machines?

Resources