vi /etc/sysconfig/iptablesAdd the following lines:
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT -A INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPTRestart iptables:
service iptables restart
vi /etc/sysconfig/iptablesAdd the following lines:
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT -A INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPTRestart iptables:
service iptables restart
[root@its-webmon ~]# yum search hyperv
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.coreix.net
* epel: mirror.vorboss.net
* extras: mirror.ox.ac.uk
* updates: mirror.ox.ac.uk
============================= N/S matched: hyperv ==============================
hyperv-daemons.x86_64 : HyperV daemons suite
hyperv-daemons-license.noarch : License of the HyperV daemons suite
hypervkvpd.x86_64 : HyperV key value pair (KVP) daemon
hypervvssd.x86_64 : HyperV VSS daemon
perl-Sys-Virt.x86_64 : Represent and manage a libvirt hypervisor connection
Name and summary matches only, use "search all" for everything.
[root@its-webmon ~]# yum install hyperv-daemons
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.coreix.net
* epel: mirror.vorboss.net
* extras: mirrors.coreix.net
* updates: mirror.sov.uk.goscomb.net
Resolving Dependencies
--> Running transaction check
---> Package hyperv-daemons.x86_64 0:0-0.24.20130826git.el7 will be installed
--> Processing Dependency: hypervvssd = 0-0.24.20130826git.el7 for package: hyperv-daemons-0-0.24.20130826git.el7.x86_64
--> Processing Dependency: hypervkvpd = 0-0.24.20130826git.el7 for package: hyperv-daemons-0-0.24.20130826git.el7.x86_64
--> Running transaction check
---> Package hypervkvpd.x86_64 0:0-0.24.20130826git.el7 will be installed
--> Processing Dependency: hyperv-daemons-license = 0-0.24.20130826git.el7 for package: hypervkvpd-0-0.24.20130826git.el7.x86_64
---> Package hypervvssd.x86_64 0:0-0.24.20130826git.el7 will be installed
--> Running transaction check
---> Package hyperv-daemons-license.noarch 0:0-0.24.20130826git.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository
Size
================================================================================
Installing:
hyperv-daemons x86_64 0-0.24.20130826git.el7 base 3.7 k
Installing for dependencies:
hyperv-daemons-license noarch 0-0.24.20130826git.el7 base 11 k
hypervkvpd x86_64 0-0.24.20130826git.el7 base 18 k
hypervvssd x86_64 0-0.24.20130826git.el7 base 9.9 k
Transaction Summary
================================================================================
Install 1 Package (+3 Dependent packages)
Total download size: 43 k
Installed size: 60 k
Is this ok [y/d/N]: y
Downloading packages:
(1/4): hyperv-daemons-0-0.24.20130826git.el7.x86_64.rpm | 3.7 kB 00:00
(2/4): hyperv-daemons-license-0-0.24.20130826git.el7.noarc | 11 kB 00:00
(3/4): hypervvssd-0-0.24.20130826git.el7.x86_64.rpm | 9.9 kB 00:00
(4/4): hypervkvpd-0-0.24.20130826git.el7.x86_64.rpm | 18 kB 00:00
--------------------------------------------------------------------------------
Total 103 kB/s | 43 kB 00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : hyperv-daemons-license-0-0.24.20130826git.el7.noarch 1/4
Installing : hypervkvpd-0-0.24.20130826git.el7.x86_64 2/4
Installing : hypervvssd-0-0.24.20130826git.el7.x86_64 3/4
Installing : hyperv-daemons-0-0.24.20130826git.el7.x86_64 4/4
Verifying : hyperv-daemons-license-0-0.24.20130826git.el7.noarch 1/4
Verifying : hyperv-daemons-0-0.24.20130826git.el7.x86_64 2/4
Verifying : hypervkvpd-0-0.24.20130826git.el7.x86_64 3/4
Verifying : hypervvssd-0-0.24.20130826git.el7.x86_64 4/4
Installed:
hyperv-daemons.x86_64 0:0-0.24.20130826git.el7
Dependency Installed:
hyperv-daemons-license.noarch 0:0-0.24.20130826git.el7
hypervkvpd.x86_64 0:0-0.24.20130826git.el7
hypervvssd.x86_64 0:0-0.24.20130826git.el7
Complete!
[root@its-webmon init.d]# service hypervkvpd start
Redirecting to /bin/systemctl start hypervkvpd.service
[root@its-webmon init.d]# service hypervvssd start
Redirecting to /bin/systemctl start hypervvssd.service
[root@its-webmon init.d]# systemctl|grep hyper
hypervkvpd.service loaded active running Hyper-V KVP daemon
hypervvssd.service loaded active running Hyper-V VSS daemon
echo "Registering networker ports 7937-7999 with backup server" /usr/bin/nsrports -s backupserver.domain.com -S 7937-7999 /usr/bin/nsrports -S 7937-7999 /usr/bin/nsrports -s backupserver.domain.com -C 10001-30000 /usr/bin/nsrports -C 10001-30000
# gnt-group list Group Nodes Instances AllocPolicy NDParams tier1 5 78 last_resort (empty) tier2 3 118 preferred (empty) mvb 4 74 last_resort (empty) # gnt-group assign-nodes cc-tier2 sever # gnt-group list Group Nodes Instances AllocPolicy NDParams tier1 5 78 last_resort (empty) tier2 4 124 preferred (empty) mvb 3 68 last_resort (empty)
grep -oP '\(\K[^\)]+' file\K means that use look around regex advanced feature. More precisely, it's a positive look-behind assertion, you can do it like this too :
grep -oP '(?<=\()[^\)]+' fileif you lack the -P option, you can do this with perl :
perl -lne '/\(\K[^\)]+/ and print $&' fileAnother simpler approach using awk
awk -F'[()]' '{print $2}' file
# vgs --units k -o vg_mda_count,vg_mda_free,vg_mda_size,vg_name
#VMda VMdaFree VMdaSize VG
1 91.50k 188.00k volg0
2 73.50k 188.00k volg1
OK:
# vgs --units k -o vg_mda_count,vg_mda_free,vg_mda_size,vg_name
#VMda VMdaFree VMdaSize VG
1 91.50k 188.00k volg0
4 8091.00k 16384.00k volg1
# gnt-instance start -H kernel_args="rw init=/bin/sh" INSTANCE Waiting for job 1333533 for INSTANCE ... # gnt-instance console INSTANCE Initializing cgroup subsys cpuset Initializing cgroup subsys cpu Linux version 2.6.32-358.23.2.el6.x86_64 (mockbuild@c6b9.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) ) #1 SMP Wed Oct 16 18:37:12 UTC 2013 Command line: ro root=LABEL=root rhgb noquiet root=/dev/xvda rw init=/bin/sh [cut] sh: cannot set terminal process group (-1): Inappropriate ioctl for device sh: no job control in this shell sh-4.1# passwd Changing password for user root. New password: Retype new password: passwd: all authentication tokens updated successfully. sh-4.1# exit # gnt-instance reboot INSTANCE