CLOUDSTACK-6676: cleanup ip address details on ip disassoc

(cherry picked from commit 66df43572e1a12ad2bd32f8c0aa9acaeb271828e)
CLOUDSTACK-6853: Search for non-removed nics only when check if the running vm belongs to a certain network

(cherry picked from commit 03623fe57e6597782b628815140283151d066a36)
Fixed unittest

(cherry picked from commit 96bfa8a73f0054db42beaff6a8ba3af058d3d915)
CLOUDSTACK-6793: Fixed an invalid Domain Id Issue

Signed-off-by: sedukull <santhosh.edukulla@gmail.com>
(cherry picked from commit 91d054cb00f6a5818f2be1c7e4d3f44a2c58bfcc)
try-with-resource to prevent resource leaks

(cherry picked from commit 39f775c38126bb25a0418f82196caaba463f8c1c)
CLOUDSTACK-6585: added missing db upgrade statements

(cherry picked from commit 9e2db2f2210904752eea2f3abf87b16bb3080384)
CLOUDSTACK-6859:Management Server PermGen run out of memory after some
time due to class leak.

(cherry picked from commit 961cd7657e7dbb69d497123071db3156bd15d8e9)
CLOUDSTACK-6669: Fix support resize in usage server

Signed-off-by: Sebastien Goasguen <runseb@gmail.com>
(cherry picked from commit f0ea44daf12b702ab1deb03d4e6bc3adfab46efc)
CLOUDSTACK-6603 [Upgrade]DB Exception while Autoscale monitoring after upgrading from 4.3 to 4.4

(cherry picked from commit c282bb3a1293fbbfdb306263ea52464862670fb3)
CLOUDSTACK-6710: Add missing OS mappings

(cherry picked from commit ac92b3690304ff224e7e2530ea7d8e39f28a05c3)
CLOUDSTACK-6358: Remove hardcoded VMware mappings, handle snapshots

(cherry picked from commit a4b401f29f83f2f0b467a9d05b509f951b5a3bca)
CLOUDSTACK-6850: Return cpu cores, cpu speed and memory in listUsageRecords

Signed-off-by: Sebastien Goasguen <runseb@gmail.com>
(cherry picked from commit a1f278e9d47e8029d58df6d3aae13495965ca434)
By preloading some modules we fix two things. 1. Some sysctl settings like ip_conntrack_max are not set during boot because the module is not loaded at that time. 2. Passive ftp does not work through iptables without these modules.

Signed-off-by: Daan Hoogland <daan@onecht.net>
(cherry picked from commit bfccf439cfe120f5d1380a642e8b798335e1cf2e)
(cherry picked from commit af4e868547c215d511fbdd77f70e5e7b0303d3e5)
blacklist pcspkr as cosmetic improvement. aesni_intel blacklisting was not working because the include only works if the file ends with .conf.

Signed-off-by: Daan Hoogland <daan@onecht.net>
(cherry picked from commit 11f532bbecca08b41dd15d1abdf04957c84eebda)
(cherry picked from commit f94ff4ad041c517b048ce8fc58ef3996b98aa685)
rats
(cherry picked from commit b85dd956f8187ea2810f4fd74728c0a430ce6ef4)

(cherry picked from commit 5eb026534929774d468976870979440b88f7a5b8)
If for some reason dnsmasq.log does not exist anymore logrotate will create it with nobody as owner. This will prevent dnsmasq deamon from logging to that file.

Signed-off-by: Daan Hoogland <daan@onecht.net>
(cherry picked from commit c54ce3cafbc51febe71fb2a997dbfc8ac9167fb0)
(cherry picked from commit 94bb5c29b293b5eebc21c67124d429a59736f11a)
xenstore-utils on debian wheezy does not have /usr/sbin/xenstore so these commands file. It does have xenstore-write and xenstore-rm so by adding a - this is fixed easily.

Signed-off-by: Daan Hoogland <daan@onecht.net>
(cherry picked from commit 2e83baaca2c998cfdda281301dffb09a1a20aa5c)
(cherry picked from commit ed330d4dcdfbab70230e87654b5f7fb43db6c3ac)