This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To enable TRACE level logging for CloudStack, we need to perform the following in all the management servers or the management server of interest. | |
1) Open the file /etc/cloudstack/management/log4j-cloud.xml | |
Find the logging level for 'com.cloud' for example. | |
<!-- ================ --> | |
<!-- Limit categories --> | |
<!-- ================ --> | |
<category name="com.cloud"> | |
<priority value="DEBUG"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#For ACS 4.18 and above | |
java -classpath /usr/share/cloudstack-common/lib/cloudstack-utils.jar com.cloud.utils.crypt.EncryptionCLI -d -i "$(grep -oP 'db.cloud.encrypt.secret=ENC\(\K[^\)]+(?=\))' /etc/cloudstack/management/db.properties)" -p "$(cat /etc/cloudstack/management/key)" | |
older versions: | |
=================== | |
Grab the encrypted password from /etc/cloudstack/management/db.properties |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
On global configuration set enable.additional.vm.configuration =true | |
set paramaters name: allow.additional.vm.configuration.list.kvm | |
value: devices,hostdev,driver,source,address,alias | |
update instance with the extraconfig: | |
sample XML: | |
<devices> | |
<hostdev mode='subsystem' type='pci' managed='yes'> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
network: | |
version: 2 | |
ethernets: | |
eth0: {} | |
eth1: {} | |
eth2: {} | |
eth3: {} | |
bonds: | |
bond0: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "net.ipv4.ip_forward=1" | tee -a /etc/sysctl.conf | |
sysctl -p | |
apk add iptables | |
rc-update add iptables | |
iptables -A FORWARD -i eth2 -j ACCEPT | |
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE | |
/etc/init.d/iptables save | |
apk add dhcp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Find Networks without DHCP service: | |
=================================== | |
select n.id,n.name,n.network_offering_id from networks n inner join (select no.id,ns1.offering_id from network_offerings no left join (select ns.network_offering_id as offering_id from ntwk_offering_service_map ns where ns.service='dhcp' and ns.provider in ('VpcVirtualRoutergroup','VirtualRouter','VpcVirtualRouter')) as ns1 on no.id=ns1.offering_id where no.removed is null and no.traffic_type='guest' and ns1.offering_id is null) as nd on n.network_offering_id=nd.id and n.removed is null; | |
Networks not having vms | |
======================== | |
select n.id,n.name,n.removed from networks n left join vm_network_map v on v.network_id=n.id where v.network_id is null and n.removed is null and n.name is not null; | |
Find primary storage utilization |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select vm_instance_id,usage_type,start_date from usage_vm_instance uvi inner join ( select type,created,resource_id,count(*) as count from usage_event where processed=0 and type in ('VM.CREATE','VM.START','VM.STOP','VM.DESTROY') group by resource_id,type,created having count > 1) ue on uvi.vm_instance_id=ue.resource_id and uvi.start_date=ue.created; |