lost and found ( for me ? )

Fedora 19 VM: enable serial console for virsh console

small tips.

on the Fedora 19 VM ( not a KVM host )
add consle=ttyS0,115200 in /etc/sysconfig/grub file and then update grub.cfg
# cat /etc/sysconfig/grub
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="rd.lvm.lv=fedora/swap rd.md=0 rd.dm=0 vconsole.keymap=us $([ -x /usr/sbin/rhcrashkernel-param ] && /usr/sbin/rhcrashkernel-param || :) rd.luks=0 vconsole.font=latarcyrheb-sun16 rd.lvm.lv=fedora/root rhgb quiet console=ttyS0,115200"
GRUB_DISABLE_RECOVERY="true"

# grub2-mkconfig > /boot/grub2/grub.cfg
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.11.1-200.fc19.x86_64
Found initrd image: /boot/initramfs-3.11.1-200.fc19.x86_64.img
Found linux image: /boot/vmlinuz-3.10.7-200.fc19.x86_64
Found initrd image: /boot/initramfs-3.10.7-200.fc19.x86_64.img
Found linux image: /boot/vmlinuz-3.9.5-301.fc19.x86_64
Found initrd image: /boot/initramfs-3.9.5-301.fc19.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-f3c8f32e33ea5b487a97554afaf10441
Found initrd image: /boot/initramfs-0-rescue-f3c8f32e33ea5b487a97554afaf10441.img
done

on the Feroa19 VM, add “ttyS0” in /etc/securetty file.
# echo ttyS0 >> /etc/securetty

reboot the VM. You will connect to the Fedora 19 VM over virsh console.
on the VM
# reboot

on the KVM host, connect to the VM over virsh console.
[root@localhost ~]# virsh console f19-vm1
ドメイン f19-vm1 に接続しました
エスケープ文字は ^] です
[    0.022000] Failed to access perfctr msr (MSR c0010001 is ffffffffffffffff)
[  OK  ] Started Show Plymouth Boot Screen.
[  OK  ] Reached target Paths.
[  OK  ] Reached target Basic System.
<snip>

Please confirm the VM has a serial port.
[root@localhost ~]# virsh dumpxml f19-vm1 | grep serial
   <controller type='virtio-serial' index='0'>
     <alias name='virtio-serial0'/>
   <serial type='pty'>
     <alias name='serial0'/>
   </serial>
     <target type='serial' port='0'/>
     <alias name='serial0'/>
     <address type='virtio-serial' controller='0' bus='0' port='1'/>

Fedora 19: install open vswitch


# cat /etc/fedora-release ;uname -ri
Fedora release 19 (Schrödinger’s Cat)
3.11.1-200.fc19.x86_64 x86_64

Fedora 19 box has one NIC called p10p1.
p10p1 gets IP address over DHCP.
# cat /etc/sysconfig/network-scripts/ifcfg-p10p1
DEVICE=p10p1
ONBOOT=yes
#BRIDGE=br0
BOOTPROTO=dhcp
#

install open vswitch via yum
# yum install openvswitch

start open vswitch
[root@localhost ~]# systemctl enable openvswitch.service
ln -s '/usr/lib/systemd/system/openvswitch.service' '/etc/systemd/system/multi-user.target.wants/openvswitch.service'
[root@localhost ~]# systemctl start openvswitch.service
[root@localhost ~]# systemctl status openvswitch.service
openvswitch.service - Open vSwitch Unit
  Loaded: loaded (/usr/lib/systemd/system/openvswitch.service; enabled)
  Active: active (exited) since 月 2013-09-30 00:09:20 JST; 5s ago
 Process: 4117 ExecStart=/bin/true (code=exited, status=0/SUCCESS)

configure open vswitch bridge
# ovs-vsctl add-br ovsbr0

associate ovsbr0 to phsical interface p10p1
Please note that you will lost internet connectivity after issuing following command.
# ovs-vsctl add-port ovsbr0 p10p1

after issuing following commands, you will get internet connectivity again.
[root@localhost ~]# ifconfig p10p1 0.0.0.0
[root@localhost ~]# ifconfig ovsbr0 192.168.11.100

[root@localhost ~]# dhclient ovsbr0 &
[1] 4206

# ip addr show dev ovsbr0
8: ovsbr0: <BROADCAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
   link/ether 78:e7:d1:7f:84:b7 brd ff:ff:ff:ff:ff:ff
   inet 192.168.11.100/24 brd 192.168.11.255 scope global ovsbr0
      valid_lft forever preferred_lft forever
   inet 192.168.11.5/24 brd 192.168.11.255 scope global secondary ovsbr0
      valid_lft forever preferred_lft forever
   inet6 fe80::e8ec:5aff:fe59:8655/64 scope link
      valid_lft forever preferred_lft forever

[root@localhost ~]#
[1]+  終了                  dhclient ovsbr0
[root@localhost ~]# ovs-vsctl show
6e8e87c4-700b-4556-b977-cc3fa103d893
   Bridge "ovsbr0"
       Port "p10p1"
           Interface "p10p1"
       Port "ovsbr0"
           Interface "ovsbr0"
               type: internal

edit VM’s xml file to use open vswitch.
# virsh dumpxml f19-vm1
   <interface type='bridge'>
     <mac address='52:54:00:d0:86:2e'/>
     <source bridge='ovsbr0'/>
     <virtualport type='openvswitch'>

start the VM
# virsh start f19-vm1

on the VM, confirm that the VM gets an IP address over DHCP.
[root@localhost ~]# ip addr show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
   link/ether 52:54:00:d0:86:2e brd ff:ff:ff:ff:ff:ff
   inet 192.168.11.11/24 brd 192.168.11.255 scope global eth0
      valid_lft forever preferred_lft forever
   inet6 fe80::5054:ff:fed0:862e/64 scope link
      valid_lft forever preferred_lft forever
[root@localhost ~]#
[root@localhost ~]# ping www.google.com -c 1
PING www.google.com (173.194.38.114) 56(84) bytes of data.
64 bytes from nrt19s18-in-f18.1e100.net (173.194.38.114): icmp_seq=1 ttl=53 time=11.2 ms

--- www.google.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 11.256/11.256/11.256/0.000 ms

CentOS6 64bit: install munin server and node by using EPEL repository


munin-server: 192.168.122.223
munin-node: 192.168.122.200

[ munin server ]


# rpm -ivh epel-release-6-8.noarch.rpm

# yum update

# yum install munin

config
[root@localhost munin]# pwd
/etc/munin

[root@localhost munin]# ls
conf.d          munin-node.conf  node.d         plugins  templates
munin-htpasswd  munin.conf       plugin-conf.d  static

# egrep -v ^# munin.conf | egrep -v ^$
dbdir   /var/lib/munin
htmldir /var/www/html/munin
logdir /var/log/munin
rundir  /var/run/munin
includedir /etc/munin/conf.d
graph_strategy cron
cgiurl_graph /munin-cgi/munin-cgi-graph
html_strategy cron
[localhost]
   address 127.0.0.1
   use_node_name yes
[node1]
   address 192.168.122.200
   use_node_name yes
+fork no

# chown -R munin.munin /var/www/html/munin

# /etc/init.d/munin-node start
Starting Munin Node: [  OK  ]

to view statistics over HTTP
# yum install httpd

# htpasswd -c /etc/munin/munin-htpasswd hattori
New password:
Re-type new password:
Adding password for user hattori

# apachectl start

the munin-server and munin-nodes use TCP4949 for its communication.

cron job for munin are executed every 5 minutes.
[root@localhost cron.d]# pwd
/etc/cron.d
[root@localhost cron.d]# cat munin
#
# cron-jobs for munin
#

MAILTO=root

*/5 * * * *     munin test -x /usr/bin/munin-cron && /usr/bin/munin-cron

[ munin node ]

install munin-node

# rpm -ivh epel-release-6-8.noarch.rpm


# yum install munin-node -y

config
allow access from the munin-server
egrep -v ^# munin-node.conf | grep -v ^$
log_level 4
log_file /var/log/munin-node/munin-node.log
pid_file /var/run/munin/munin-node.pid
background 1
setsid 1
user root
group root
ignore_file [\#~]$
ignore_file DEADJOE$
ignore_file \.bak$
ignore_file %$
ignore_file \.dpkg-(tmp|new|old|dist)$
ignore_file \.rpm(save|new)$
ignore_file \.pod$
allow ^127\.0\.0\.1$
allow ^::1$
allow ^192\.168\.122\.223$
host *
port 4949

# /etc/init.d/munin-node start
Starting Munin Node: [  OK  ]



[ access to the munin-server]

http:// munin server IP/munin



install GNU Panel within Ubuntu12.04 LTS 64bit

About GNU panel
GNU panel is open source web based system management tools similar to webmin, open panel etc. You can install GNU panel on Debian or Ubuntu distributions.


# tail -1 /etc/lsb-release ;uname -ri
DISTRIB_DESCRIPTION="Ubuntu 12.04.3 LTS"
3.2.0-52-virtual x86_64

configure network such as hostname, static IP address

ip address: 192.168.110.10
fqdn: ubuntu.defaultdomain
# hostname
ubuntu

# hostname -f
ubuntu.defaultdomain

# egrep -v ^# /etc/hosts
127.0.0.1 localhost
192.168.110.10 ubuntu.defaultdomain ubuntu

::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

# egrep -v ^# /etc/network/interfaces

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
       address 192.168.110.10
       netmask 255.255.255.0
       broadcast 192.168.110.255
       gateway 192.168.110.1
       dns-nameservers 192.168.110.1


#  egrep -v ^# /etc/resolv.conf
nameserver 192.168.110.1

root@ubuntu:/etc/resolvconf/resolv.conf.d# pwd
/etc/resolvconf/resolv.conf.d

root@ubuntu:/etc/resolvconf/resolv.conf.d# cat base

root@ubuntu:/etc/resolvconf/resolv.conf.d# cat head
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN

root@ubuntu:/etc/resolvconf/resolv.conf.d# cat original

root@ubuntu:/etc/resolvconf/resolv.conf.d#

change locales
# cat /usr/share/i18n/SUPPORTED > /var/lib/locales/supported.d/local
# dpkg-reconfigure locales
# echo 'LANG="en_US.ISO-8859-1"' > /etc/default/locale
# reboot

# echo $LANG
en_US.ISO-8859-1




# bunzip2 gnupanel_lenny_squeeze_wheezy_precise_0.3.5_R4.tar.bz2

# tar xvf gnupanel_lenny_squeeze_wheezy_precise_0.3.5_R4.tar

# cd gnupanel_lenny_squeeze_wheezy_precise_0.3.5_R4

# ./install-dep.sh

- postfix: internet site
- mySQL password: leave blank
- Configuring pdns-backend-pgsql: no
- Configuring phpmyadmin: password leave blank, apache2 as an web server
- ProFTPD configuration: standalone
- Configuring courier-base: no
- Configuring mailman: select all languages, Default language for Mailman English
-Configuring roundcube-core: yes, mysql, user for admin: leave blank, password: blank
- Isoqlog Configuration: postfix, directory /var/www/isoqlog, hostname: ubntu.defaultdomain, English, Domains for which you want to make reports: blank
- Configuring mailman: select all languages, English

then run gnupanel-insall.sh script.
# ./gnupanel-install.sh

run gnupanel-config.sh which is under /usr/bin directory.
# which gnupanel-config.sh
/usr/bin/gnupanel-config.sh

# /usr/bin/gnupanel-config.sh

You have new mail in /var/mail/root
# echo $?

access to https:// IP /admin

From now on you can enter all GNUPanel levels:
   https://IP/admin
   https://IP/reseller
   https://IP/users
   https://IP/mail

https:// IP /admin





main -> add IP








reseller plans -> add plan





resellers -> add reseller

nnn, error..

need to look into the root causes on this…

I was able to re-initialize gnu panel config by executing “gunupanel-config.sh
# gnupanel-config.sh



config files
root@ubuntu:/etc/gnupanel# pwd
/etc/gnupanel
root@ubuntu:/etc/gnupanel# ls
gnupanel-admin-ini.php  GNUPANEL_INSTALL_DATA  gnupanel-reseller-ini.php  sdns.conf.pl          SKEL_APACHE_SUBDOMINIOS
gnupanel.conf.pl        gnupanel-mail-ini.php  gnupanel-usuarios-ini.php  SKEL_APACHE_GNUPANEL