<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7155281442908728750</id><updated>2024-10-24T10:27:55.702+01:00</updated><category term="Freeware Apps"/><category term="XenServer"/><category term="7-zip"/><category term="Microsoft SQL Server"/><category term="Sage 200"/><category term="Windows 2008 R2"/><category term="Xen Cloud Portal"/><title type='text'>xenhelp</title><subtitle type='html'>admin tips</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://xenhelp.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7155281442908728750/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://xenhelp.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>James</name><uri>http://www.blogger.com/profile/01426890982696404895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>18</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7155281442908728750.post-6712287209408937913</id><published>2017-07-26T15:47:00.000+01:00</published><updated>2017-07-26T15:47:41.911+01:00</updated><title type='text'>Monitor status of LSI Hardware RAID from XenServer 7</title><content type='html'>(Tested on&amp;nbsp;Supermicro SMC2108)&lt;br /&gt;
&lt;br /&gt;
This is a small update to my previous post on the same setup for XenServer 6.2&lt;br /&gt;
&lt;br /&gt;
download and install MegaCli 8.07.14-1 :&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
cd /root&lt;br /&gt;
wget http://mirror.cogentco.com/pub/misc/MegaCli-8.07.14-1.noarch.rpm&lt;br /&gt;
rpm -ivh MegaCli-8.07.14-1.noarch.rpm
&lt;/div&gt;
test MegaCli:&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
/opt/MegaRAID/MegaCli/MegaCli64 -AdpAllinfo -aALL&lt;/div&gt;
add to PATH [so you can just type megacli from command line] :&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
ln -s /opt/MegaRAID/MegaCli/MegaCli64 /usr/bin/MegaCli&lt;br /&gt;
ln -s /opt/MegaRAID/MegaCli/MegaCli64 /usr/bin/megacli [so you don&#39;t have to remember the capital M and C]
&lt;/div&gt;
setup to send emails via gmail&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
vi /etc/ssmtp/ssmtp.conf [and replace with the lines below as applicable]&lt;br /&gt;&lt;br /&gt;
TLS_CA_FILE=/etc/pki/tls/certs/ca-bundle.crt&lt;br /&gt;
root=postmaster&lt;br /&gt;
mailhub=smtp.gmail.com:587&lt;br /&gt;
Hostname=server.hostname [name of xen server)&lt;br /&gt;
FromLineOverride=NO&lt;br /&gt;
AuthUser=email@domain.name [gmail account username]&lt;br /&gt;
AuthPass=password [gmail account password]&lt;br /&gt;
UseSTARTTLS=YES&lt;br /&gt;
&lt;/div&gt;
test email :&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
/opt/MegaRAID/MegaCli/MegaCli64 -AdpAllinfo -aALL | grep -A 9 &quot;Device Present&quot; | mail -s &quot;$HOSTNAME - RAID Status&quot; email@your.domain&lt;/div&gt;
send email every day at 09:15 :&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
crontab -e [add the following line]&lt;br /&gt;
15 09 * * * /opt/MegaRAID/MegaCli/MegaCli64 -AdpAllinfo -aALL | grep -A 9 &quot;Device Present&quot; | mail -s &quot;$HOSTNAME - RAID Status&quot;&amp;nbsp;email@your.domain&lt;/div&gt;
&lt;br /&gt;
Useful CLI Commands :&lt;br /&gt;
&lt;br /&gt;
flash light on a certain drive (to aid replacement) :&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
MegaCli -AdpSetProp \{UseDiskActivityforLocate -0\} -aALL&lt;br /&gt;
MegaCli -PdLocate -start -physdrv\[252:5\] -aALL [252 is enclosure id, 5 is slot/drive id]
&lt;/div&gt;
show rebuild progress :&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
MegaCli -Pdrbld -showprog -physdrv\[252:5\] -aALL [252 is enclosure id, 5 is slot/drive id]&lt;br /&gt;
MegaCli -Pdrbld -progdsply -physdrv\[252:5\] -aALL [252 is enclosure id, 5 is slot/drive id]&lt;/div&gt;
other commands :&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
MegaCli -AdpAllInfo -aAll&lt;br /&gt;
MegaCli -PDList -aAll&lt;br /&gt;
MegaCli -LDInfo -lAll -aAll&lt;br /&gt;
MegaCli -help&lt;br /&gt;
&lt;br /&gt;
MegaCli -AdpEventLog -GetLatest 100 -f /opt/MegaRAID/MegaCli/events.log -aALL&lt;br /&gt;
less /opt/MegaRAID/MegaCli/events.log&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://xenhelp.blogspot.com/feeds/6712287209408937913/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://xenhelp.blogspot.com/2017/07/monitor-status-of-lsi-hardware-raid.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7155281442908728750/posts/default/6712287209408937913'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7155281442908728750/posts/default/6712287209408937913'/><link rel='alternate' type='text/html' href='http://xenhelp.blogspot.com/2017/07/monitor-status-of-lsi-hardware-raid.html' title='Monitor status of LSI Hardware RAID from XenServer 7'/><author><name>James</name><uri>http://www.blogger.com/profile/01426890982696404895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7155281442908728750.post-3695126886308736743</id><published>2017-06-14T17:19:00.001+01:00</published><updated>2017-06-14T17:19:45.734+01:00</updated><title type='text'>Mikrotik RouterOS - setup SIP port forwarding for multiple Cisco 7940 IP phones</title><content type='html'>Set the following within the phones .cnf file on the TFTP server :&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
nat_enable: &quot;1&quot;&lt;br /&gt;
nat_address: &quot;&amp;lt;external-ip-address&amp;gt;&quot;&lt;br /&gt;
&lt;br /&gt;
voip_control_port: 52060 ; UDP port used for SIP messages (default - 5060)&lt;br /&gt;
start_media_port: 22004 &amp;nbsp;; Start RTP range for media (default - 16384)&lt;br /&gt;
end_media_port: 22034 &amp;nbsp; &amp;nbsp;; End RTP range for media (default - 32766)&lt;/div&gt;
Replace &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;lt;external-ip-address&amp;gt;&lt;/span&gt; with your external/public IP.&lt;br /&gt;
You must set different &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;voip_control_port&lt;/span&gt; and &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;media_port&lt;/span&gt; range for each phone.&lt;br /&gt;
&lt;br /&gt;
On Mikrotik router, add the firewall port forwarding (destination NAT) rules for each phone :&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
/ip firewall nat&lt;br /&gt;
add action=dst-nat chain=dstnat disabled=no comment=&quot;voip 1&quot;\&lt;br /&gt;
&amp;nbsp;dst-port=52060,22004-22034 in-interface=&amp;lt;external-interface&amp;gt;\&lt;br /&gt;
&amp;nbsp;protocol=udp to-addresses=&amp;lt;internal-lan-ip-of-phone1&amp;gt;&lt;br /&gt;
add action=dst-nat chain=dstnat disabled=no&amp;nbsp;comment=&quot;voip 2&quot;\&lt;br /&gt;
&amp;nbsp;dst-port=52160,23004-23034 in-interface=&amp;lt;external-interface&amp;gt;\&lt;br /&gt;
&amp;nbsp;protocol=udp to-addresses=&amp;lt;internal-lan-ip-of-phone2&amp;gt;&lt;/div&gt;
For me, &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;lt;external-interface&amp;gt;&lt;/span&gt;&amp;nbsp;is&amp;nbsp;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;pppoe-out1&lt;/span&gt; but it could well be &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;eth1&lt;/span&gt; or another name for you.&lt;br /&gt;
Change &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;lt;internal-lan-ip-of-phoneX&amp;gt;&lt;/span&gt; to the LAN ip of each device.&lt;br /&gt;
&lt;br /&gt;
Reboot phones to enable download of new config.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://xenhelp.blogspot.com/feeds/3695126886308736743/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://xenhelp.blogspot.com/2017/06/mikrotik-routeros-setup-sip-port.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7155281442908728750/posts/default/3695126886308736743'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7155281442908728750/posts/default/3695126886308736743'/><link rel='alternate' type='text/html' href='http://xenhelp.blogspot.com/2017/06/mikrotik-routeros-setup-sip-port.html' title='Mikrotik RouterOS - setup SIP port forwarding for multiple Cisco 7940 IP phones'/><author><name>James</name><uri>http://www.blogger.com/profile/01426890982696404895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7155281442908728750.post-2808891446757311751</id><published>2017-06-14T15:36:00.000+01:00</published><updated>2017-06-14T15:36:14.929+01:00</updated><title type='text'>Mikrotik RouterOS - Set custom TFTP server in DHCP</title><content type='html'>With other DNS servers you set DHCP option 66 with the IP address of the TFTP server. Not with Mikrotik!! You must set &lt;b&gt;DHCP option 150&lt;/b&gt; and make the value the hex of the TFTP server IP.&lt;br /&gt;
&lt;br /&gt;
First work out the hex of the IP - you can use this online tool : &lt;a href=&quot;http://www.miniwebtool.com/ip-address-to-hex-converter/&quot;&gt;http://www.miniwebtool.com/ip-address-to-hex-converter/&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
e.g. for &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;192.168.4.9&lt;/span&gt; the hex is &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;0xC0A80409&lt;/span&gt; and  for &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;10.10.10.10&lt;/span&gt; the hex is &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;0x0A0A0A0A
&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Then to add to RouterOS : 

&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
/ip dhcp-server option add code=150 name=customtftp value=0xC0A80409&lt;/div&gt;
If you want to add two IP addresses then you must add as follows (note the formatting of the value!) : 

&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
/ip dhcp-server option add code=150 name=customtftp value=0xC0A804090A0A0A0A&lt;/div&gt;
Then assign DHCP option &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;b&gt;customtftp&lt;/b&gt;&lt;/span&gt; to your Networks or static Leases.</content><link rel='replies' type='application/atom+xml' href='http://xenhelp.blogspot.com/feeds/2808891446757311751/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://xenhelp.blogspot.com/2017/06/mikrotik-routeros-set-custom-tftp.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7155281442908728750/posts/default/2808891446757311751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7155281442908728750/posts/default/2808891446757311751'/><link rel='alternate' type='text/html' href='http://xenhelp.blogspot.com/2017/06/mikrotik-routeros-set-custom-tftp.html' title='Mikrotik RouterOS - Set custom TFTP server in DHCP'/><author><name>James</name><uri>http://www.blogger.com/profile/01426890982696404895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7155281442908728750.post-3196252046071366199</id><published>2017-06-14T14:23:00.001+01:00</published><updated>2017-06-14T15:36:25.902+01:00</updated><title type='text'>Mikrotik RouterOS - VoIP SIP Problems</title><content type='html'>after setting up dst-nat rules in firewall for incoming calls, incoming calls were still not working. after some investigation i found the &quot;Service Ports&quot; in the Firewall, disable SIP
&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
/ip firewall service-port disable sip&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://xenhelp.blogspot.com/feeds/3196252046071366199/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://xenhelp.blogspot.com/2017/06/mikrotik-router-os-voip-sip-problems.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7155281442908728750/posts/default/3196252046071366199'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7155281442908728750/posts/default/3196252046071366199'/><link rel='alternate' type='text/html' href='http://xenhelp.blogspot.com/2017/06/mikrotik-router-os-voip-sip-problems.html' title='Mikrotik RouterOS - VoIP SIP Problems'/><author><name>James</name><uri>http://www.blogger.com/profile/01426890982696404895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7155281442908728750.post-1653521098842364101</id><published>2017-06-14T09:29:00.000+01:00</published><updated>2017-06-14T09:31:18.447+01:00</updated><title type='text'>Mikrotik RouterOS - disable DNS servers assigned by DHCP</title><content type='html'>To disable &quot;Dynamic Servers&quot; for DNS :&lt;br /&gt;
&lt;br /&gt;
To get a MikroTik router to use your own choice of DNS servers (such as OpenDNS), you first need to make sure that you are not using your ISP’s Peer DNS servers. To disable the PeerDNS on an internet facing interface that uses a DHCP client:&lt;br /&gt;
&lt;br /&gt;
List all the dhcp clients that are running.&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;/ip dhcp-client print&lt;/div&gt;
The output should look something like this:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHRSxDPDpOAqAajK_A6TyfEME_igG7pzj8Ohm_MdqQLAMMvpFNGdCG_lmViPhOYKNw0f_HB5s-CvdXLOW-zKb_tGpXRyM66jRX-j4kuETq9fgnA3JbRLEMtFjNLX4iyXPUoKJtPhY6vVM/s1600/mikrotik-dhcp-client-print.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;74&quot; data-original-width=&quot;773&quot; height=&quot;60&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHRSxDPDpOAqAajK_A6TyfEME_igG7pzj8Ohm_MdqQLAMMvpFNGdCG_lmViPhOYKNw0f_HB5s-CvdXLOW-zKb_tGpXRyM66jRX-j4kuETq9fgnA3JbRLEMtFjNLX4iyXPUoKJtPhY6vVM/s640/mikrotik-dhcp-client-print.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
In this case there is only one DHCP client.&lt;br /&gt;
&lt;br /&gt;
Disable using PeerDNS on DHCP client 0&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;/ip dhcp-client set use-peer-dns=no&lt;/div&gt;
or to disable PeerDNS on a PPPOE client interface, type&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;/interface pppoe-client set use-peer-dns=no 0&lt;/div&gt;
&lt;br /&gt;
Configure your router to use the OpenDNS servers&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;/ip dns set server=208.67.222.222,208.67.220.220&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://xenhelp.blogspot.com/feeds/1653521098842364101/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://xenhelp.blogspot.com/2017/06/mikrotik-routeros-disable-dns-servers.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7155281442908728750/posts/default/1653521098842364101'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7155281442908728750/posts/default/1653521098842364101'/><link rel='alternate' type='text/html' href='http://xenhelp.blogspot.com/2017/06/mikrotik-routeros-disable-dns-servers.html' title='Mikrotik RouterOS - disable DNS servers assigned by DHCP'/><author><name>James</name><uri>http://www.blogger.com/profile/01426890982696404895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHRSxDPDpOAqAajK_A6TyfEME_igG7pzj8Ohm_MdqQLAMMvpFNGdCG_lmViPhOYKNw0f_HB5s-CvdXLOW-zKb_tGpXRyM66jRX-j4kuETq9fgnA3JbRLEMtFjNLX4iyXPUoKJtPhY6vVM/s72-c/mikrotik-dhcp-client-print.png" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7155281442908728750.post-2267836652863231267</id><published>2016-11-15T10:35:00.002+00:00</published><updated>2016-11-15T10:35:33.494+00:00</updated><title type='text'>fix clock in Centos 7 VM on XenServer 7</title><content type='html'>yum -y install ntp &amp;&amp; timedatectl set-ntp yes &amp;&amp; timedatectl set-local-rtc 1 &amp;&amp; timedatectl set-local-rtc 0 &amp;&amp; ntpq -c lpeer &amp;&amp; timedatectl status</content><link rel='replies' type='application/atom+xml' href='http://xenhelp.blogspot.com/feeds/2267836652863231267/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://xenhelp.blogspot.com/2016/11/fix-clock-in-centos-7-vm-on-xenserver-7.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7155281442908728750/posts/default/2267836652863231267'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7155281442908728750/posts/default/2267836652863231267'/><link rel='alternate' type='text/html' href='http://xenhelp.blogspot.com/2016/11/fix-clock-in-centos-7-vm-on-xenserver-7.html' title='fix clock in Centos 7 VM on XenServer 7'/><author><name>James</name><uri>http://www.blogger.com/profile/01426890982696404895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7155281442908728750.post-2369669640244477350</id><published>2016-05-31T13:43:00.002+01:00</published><updated>2016-06-02T13:50:04.727+01:00</updated><title type='text'>Wordpress 500 errors / yum update not working since upgrade to CentOS v6.8</title><content type='html'>When running a CentOS VM on XenServer, after upgrading to CentOS v.6.8, we noticed various seemingly random errors from Wordpress sites hosted on that server. Also, yum update didn&#39;t work, and curl to an https URL didn&#39;t work.&lt;br /&gt;
&lt;br /&gt;
errors seen :&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
Premature end of script headers: wp-login.php&lt;br /&gt;
mod_fcgid: process /home/client-name/fcgi-bin/php5.fcgi(6080) exit(communication error), get unexpected signal 4&lt;br /&gt;
&lt;/div&gt;
&lt;div class=&quot;code&quot;&gt;
[james@server79 ~]# yum update&lt;br /&gt;
Loaded plugins: fastestmirror, priorities, replace&lt;br /&gt;
Setting up Update Process&lt;br /&gt;
Determining fastest mirrors&lt;br /&gt;
Illegal instruction&lt;br /&gt;
&lt;/div&gt;
&lt;br /&gt;
Turns out to be an issue with nss/nspr [Network Security Services (NSS)/Netscape Portable Runtime (NSPR)] which was updated as part of the CentOS v6.8 update released on May 25th.&lt;br /&gt;
&lt;br /&gt;
it only seems to be an issue with these conditions:&lt;br /&gt;
a VM running Redhat/Centos v6.8&lt;br /&gt;
running on XenServer&lt;br /&gt;
on a physical server with a cpu that exposes &quot;aes&quot; as a feature&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
[james@server79 ~]# grep -i aes /proc/cpuinfo&lt;br /&gt;
flags &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : fpu de tsc msr pae cx8 sep cmov pat clflush mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good unfair_spinlock pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 popcnt tsc_deadline_timer aes hypervisor lahf_lm arat epb pln pts dtherm&lt;/div&gt;
&lt;br /&gt;
we fixed by reverting nss and nspr to the previously installed rpm&#39;s - which we didn&#39;t have to hand so had to go find them :&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
wget http://vault.centos.org/6.7/updates/x86_64/Packages/nss-util-3.21.0-0.3.el6_7.x86_64.rpm&lt;br /&gt;
wget http://vault.centos.org/6.7/updates/x86_64/Packages/nss-sysinit-3.21.0-0.3.el6_7.x86_64.rpm&lt;br /&gt;
wget http://vault.centos.org/6.7/updates/x86_64/Packages/nss-tools-3.21.0-0.3.el6_7.x86_64.rpm&lt;br /&gt;
wget http://vault.centos.org/6.7/updates/x86_64/Packages/nss-3.21.0-0.3.el6_7.x86_64.rpm&lt;br /&gt;
wget http://vault.centos.org/6.7/updates/x86_64/Packages/nspr-4.11.0-0.1.el6_7.x86_64.rpm&lt;br /&gt;
rpm -Uvh --oldpackage ./nss-3.21.0-0.3.el6_7.x86_64.rpm ./nss-tools-3.21.0-0.3.el6_7.x86_64.rpm ./nss-util-3.21.0-0.3.el6_7.x86_64.rpm ./nss-sysinit-3.21.0-0.3.el6_7.x86_64.rpm ./nspr-4.11.0-0.1.el6_7.x86_64.rpm&lt;br /&gt;
yum install yum-plugin-versionlock&lt;br /&gt;
yum versionlock add nss-3.21.0-0.3.el6_7.x86_64 nss-sysinit-3.21.0-0.3.el6_7.x86_64 nss-tools-3.21.0-0.3.el6_7.x86_64 nss-util-3.21.0-0.3.el6_7.x86_64 nspr-4.11.0-0.1.el6_7.x86_64&lt;/div&gt;
&lt;br /&gt;
More info :&lt;br /&gt;
&lt;a href=&quot;https://www.centos.org/forums/viewtopic.php?t=58002&quot;&gt;https://www.centos.org/forums/viewtopic.php?t=58002&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://access.redhat.com/solutions/2313911&quot;&gt;https://access.redhat.com/solutions/2313911&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Hopefully the nss and nspr packages will be fixed soon so we can remove the versionlock.

(Updated package links to vault.centos.org which will always be available)</content><link rel='replies' type='application/atom+xml' href='http://xenhelp.blogspot.com/feeds/2369669640244477350/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://xenhelp.blogspot.com/2016/05/wordpress-500-errors-yum-update-not.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7155281442908728750/posts/default/2369669640244477350'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7155281442908728750/posts/default/2369669640244477350'/><link rel='alternate' type='text/html' href='http://xenhelp.blogspot.com/2016/05/wordpress-500-errors-yum-update-not.html' title='Wordpress 500 errors / yum update not working since upgrade to CentOS v6.8'/><author><name>James</name><uri>http://www.blogger.com/profile/01426890982696404895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7155281442908728750.post-5235596119332408422</id><published>2015-02-25T12:03:00.001+00:00</published><updated>2015-02-25T12:03:24.269+00:00</updated><title type='text'>Fix java error with XVP Viewer</title><content type='html'>If you get the following error when attempting to use the XVP vnc viewer :
&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
Error: access denied (&quot;java.net.SocketPermission&quot; &quot;your.ip.address:5900&quot; &quot;connect,resolve&quot;)
&lt;/div&gt;
You can fix this by giving permission within your local java policy.&lt;br /&gt;
Edit C:\Program Files (x86)\Java\jre1.8.0_31\lib\security\java.policy (the jre1.8.0_31 part may be different on your system)

and put the following lines inside grant {
&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
// Allow the client to connect to the server&lt;br /&gt;
// connect includes resolve, client need only connect&lt;br /&gt;
permission java.net.SocketPermission &quot;your.ip.address:5900-&quot;, &quot;connect&quot;;
&lt;/div&gt;
[change your.ip.address] !&lt;br /&gt;
&lt;br /&gt;
Restart browser and it should connect now.</content><link rel='replies' type='application/atom+xml' href='http://xenhelp.blogspot.com/feeds/5235596119332408422/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://xenhelp.blogspot.com/2015/02/fix-java-error-with-xvp-viewer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7155281442908728750/posts/default/5235596119332408422'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7155281442908728750/posts/default/5235596119332408422'/><link rel='alternate' type='text/html' href='http://xenhelp.blogspot.com/2015/02/fix-java-error-with-xvp-viewer.html' title='Fix java error with XVP Viewer'/><author><name>James</name><uri>http://www.blogger.com/profile/01426890982696404895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7155281442908728750.post-4774553776817696467</id><published>2015-01-05T18:05:00.000+00:00</published><updated>2015-01-05T18:09:11.242+00:00</updated><title type='text'>Monitor status of LSI Hardware RAID from XenServer 6.2</title><content type='html'>(Tested on&amp;nbsp;Supermicro SMC2108)&lt;br /&gt;
&lt;br /&gt;
download and install MegaCli 8.07.14-1 :&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
cd /root&lt;br /&gt;
wget http://mirror.cogentco.com/pub/misc/MegaCli-8.07.14-1.noarch.rpm&lt;br /&gt;
rpm -ivh MegaCli-8.07.14-1.noarch.rpm
&lt;/div&gt;
test MegaCli:&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
/opt/MegaRAID/MegaCli/MegaCli -AdpAllinfo -aALL&lt;/div&gt;
add to PATH [so you can just type megacli from command line] :&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
ln -s /opt/MegaRAID/MegaCli/MegaCli /usr/bin/MegaCli&lt;br /&gt;
ln -s /opt/MegaRAID/MegaCli/MegaCli /usr/bin/megacli [so you don&#39;t have to remember the capital M and C]
&lt;/div&gt;
install mail command [to be able to easily send a simple email] :&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
yum --enablerepo=base install mailx&lt;br /&gt;
vi /etc/ssmtp/ssmtp.conf [and set the 3 lines below as applicable]&lt;br /&gt;
root=postmaster&lt;br /&gt;
mailhub=mail.your.domain [the mailserver for the domain you want to send to]&lt;br /&gt;
rewriteDomain=server.hostname [this will be the domain part of the from address e.g. from root@server.hostname]
&lt;/div&gt;
test email :&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
/opt/MegaRAID/MegaCli/MegaCli -AdpAllinfo -aALL | grep -A 9 &quot;Device Present&quot; | mail -s &quot;$HOSTNAME - RAID Status&quot; email@your.domain&lt;/div&gt;
send email every day at 09:15 :&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
crontab -e [add the following line]&lt;br /&gt;
15 09 * * * /opt/MegaRAID/MegaCli/MegaCli -AdpAllinfo -aALL | grep -A 9 &quot;Device Present&quot; | mail -s &quot;$HOSTNAME - RAID Status&quot;&amp;nbsp;email@your.domain&amp;nbsp;]&lt;/div&gt;
&lt;br /&gt;
Useful CLI Commands :&lt;br /&gt;
&lt;br /&gt;
flash light on a certain drive (to aid replacement) :&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
MegaCli -AdpSetProp \{UseDiskActivityforLocate -0\} -aALL&lt;br /&gt;
MegaCli -PdLocate -start -physdrv\[252:5\] -aALL [252 is enclosure id, 5 is slot/drive id]
&lt;/div&gt;
show rebuild progress :&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
MegaCli -Pdrbld -showprog -physdrv\[252:5\] -aALL [252 is enclosure id, 5 is slot/drive id]&lt;br /&gt;
MegaCli -Pdrbld -progdsply -physdrv\[252:5\] -aALL [252 is enclosure id, 5 is slot/drive id]&lt;/div&gt;
other commands :&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
MegaCli -AdpAllInfo -aAll&lt;br /&gt;
MegaCli -PDList -aAll&lt;br /&gt;
MegaCli -LDInfo -lAll -aAll&lt;br /&gt;
MegaCli -help&lt;br /&gt;
&lt;br /&gt;
MegaCli -AdpEventLog -GetLatest 100 -f /opt/MegaRAID/MegaCli/events.log -aALL&lt;br /&gt;
less /opt/MegaRAID/MegaCli/events.log&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://xenhelp.blogspot.com/feeds/4774553776817696467/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://xenhelp.blogspot.com/2015/01/monitor-status-of-lsi-hardware-raid.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7155281442908728750/posts/default/4774553776817696467'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7155281442908728750/posts/default/4774553776817696467'/><link rel='alternate' type='text/html' href='http://xenhelp.blogspot.com/2015/01/monitor-status-of-lsi-hardware-raid.html' title='Monitor status of LSI Hardware RAID from XenServer 6.2'/><author><name>James</name><uri>http://www.blogger.com/profile/01426890982696404895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7155281442908728750.post-4613037430423223102</id><published>2014-05-09T10:28:00.000+01:00</published><updated>2014-05-09T10:31:03.042+01:00</updated><title type='text'>LiveMotion from cli</title><content type='html'>&lt;div class=&quot;code&quot;&gt;xe vm-migrate live=true remote-master=&amp;lt;ip&amp;gt; remote-username=root remote-password=&amp;lt;password&amp;gt; destination-sr-uuid=&amp;lt;uuid of destination SR&amp;gt; vm=&amp;lt;uuid of VM to migrate&amp;gt;&lt;/div&gt;
&lt;br /&gt;
to bypass CPU validation add &lt;div class=&quot;code&quot;&gt;--force&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://xenhelp.blogspot.com/feeds/4613037430423223102/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://xenhelp.blogspot.com/2014/05/blog-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7155281442908728750/posts/default/4613037430423223102'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7155281442908728750/posts/default/4613037430423223102'/><link rel='alternate' type='text/html' href='http://xenhelp.blogspot.com/2014/05/blog-post.html' title='LiveMotion from cli'/><author><name>James</name><uri>http://www.blogger.com/profile/01426890982696404895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7155281442908728750.post-9054346709634526733</id><published>2012-05-24T15:40:00.000+01:00</published><updated>2012-05-28T16:33:31.389+01:00</updated><title type='text'>&#39;compress&#39; / &#39;compact&#39; a Linux .vhd virtual hard disk in XenServer/XCP</title><content type='html'>If you use thin provisioning there are 3 good reasons to &#39;compress&#39; / &#39;compact&#39; your .vhd disk image files.&lt;br /&gt;
&lt;br /&gt;
1. free up disk space on host&lt;br /&gt;
2. creating a new .vhd and writing all files to it in one go should somewhat &#39;defrag&#39; your .vhd files on host&lt;br /&gt;
3. make your backups MUCH smaller&lt;br /&gt;
&lt;br /&gt;
(&lt;i&gt;assumes you have root fs / on /dev/xvda1 and swap on /dev/xvda2 - assumes you have fsarchiver installed&lt;/i&gt;)&lt;br /&gt;
&lt;br /&gt;
Create new .vhd and attach to VM (same size to make the partition table work)&lt;br /&gt;
&lt;br /&gt;
Backup partition table&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
dd if=/dev/xvda of=/root/backup-xvda.mbr count=1 bs=512&lt;br /&gt;
&lt;br /&gt;
sfdisk -d /dev/xvda &amp;gt; /root/backup-xvda.sf&lt;/div&gt;
&lt;br /&gt;
Create archive&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
fsarchiver -v -j3 -z2 -A -a savefs /root/backup-xvda1.fsa --exclude=/root/backup-xvda1.fsa /dev/xvda1&lt;/div&gt;
&lt;br /&gt;
Restore partition table&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
dd if=/root/backup-xvda.mbr of=/dev/xvdb&lt;br /&gt;
&lt;br /&gt;
sfdisk /dev/xvdb &amp;lt; /root/backup-xvda.sf&lt;/div&gt;
&lt;br /&gt;
Restore archive&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
fsarchiver -v -j3 restfs /root/backup-xvda1.fsa id=0,dest=/dev/xvdb1&lt;br /&gt;
&lt;br /&gt;
mkswap -L swap /dev/xvdb2&lt;/div&gt;
&lt;br /&gt;
Boot from new .vhd

Shutdown VM, detach new disk, detach old disk, attach new disk (this makes sure its /dev/xvda), Start VM&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will hopefully be pleasantly suprised by how quickly the .fsa image is created. (if you want to save the .fsa file, use -z8 to make a smaller archive, it will be slower but still quite fast)&lt;br /&gt;
&lt;br /&gt;
This procedure can also be used to &#39;shrink&#39; your virtual hard disk, the difference being you will have to manually partition the smaller destination disk.&lt;br /&gt;
&lt;br /&gt;
Example 1 : a newly created and installed Debian Wheezy VM had a 1.39GB .vhd file on export (264MB compressed with 7z-LZMA2). After running the process above, the exported .vhd file was 0.82GB (149MB compressed with 7z-LZMA2) =&amp;gt; 56% of the original size.&lt;br /&gt;
&lt;br /&gt;
Example 2 : a slightly older Debian Squeeze VM had&amp;nbsp;a&amp;nbsp;5.68GB&amp;nbsp;.vhd file on export (3.71GB&amp;nbsp;compressed with 7z-LZMA2). After running the process above, the exported .vhd file was&amp;nbsp;1.77GB&amp;nbsp;(316MB&amp;nbsp;compressed with 7z-LZMA2) =&amp;gt; &lt;b&gt;&lt;u&gt;8%&lt;/u&gt;&lt;/b&gt; of the original size.</content><link rel='replies' type='application/atom+xml' href='http://xenhelp.blogspot.com/feeds/9054346709634526733/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://xenhelp.blogspot.com/2012/05/compress-linux-vhd-hard-disk-in.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7155281442908728750/posts/default/9054346709634526733'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7155281442908728750/posts/default/9054346709634526733'/><link rel='alternate' type='text/html' href='http://xenhelp.blogspot.com/2012/05/compress-linux-vhd-hard-disk-in.html' title='&#39;compress&#39; / &#39;compact&#39; a Linux .vhd virtual hard disk in XenServer/XCP'/><author><name>James</name><uri>http://www.blogger.com/profile/01426890982696404895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7155281442908728750.post-7437335778170140559</id><published>2012-05-24T14:54:00.001+01:00</published><updated>2012-05-24T17:27:25.908+01:00</updated><title type='text'>What I did to make a Debian wheezy64 VM on Xenserver 6.0.2 (XCP 1.5 Beta) with : ssh samba nfs webmin snmpd xs-tools iptables</title><content type='html'>&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
what does it need to do ?&lt;br /&gt;
&lt;br /&gt;
ssh/webmin for local admin&lt;br /&gt;
accept rsync backups from local machines (sshd)&lt;br /&gt;
accept backups over smb (samba)&lt;br /&gt;
accept backups over nfs (nfs-kernel-server)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
create custom template&lt;br /&gt;
&lt;br /&gt;
xe template-list | grep -B1 name-label | awk -F: &#39;{print $2}&#39;&lt;br /&gt;
&lt;br /&gt;
find uuid of template you want to clone&lt;br /&gt;
&lt;br /&gt;
xe vm-clone uuid=&amp;lt;UUID&amp;gt; new-name-label=&quot;&amp;lt;NAME&amp;gt;&quot;&lt;br /&gt;
#xe template-param-set uuid=&amp;lt;UUID&amp;gt; other-config:install-methods=http,ftp,nfs other-config:default_template=true&lt;br /&gt;
xe template-param-set uuid=&amp;lt;UUID&amp;gt; other-config:install-methods=http other-config:debian-release=wheezy&lt;br /&gt;
&lt;br /&gt;
after creation&lt;br /&gt;
&lt;br /&gt;
get xm uuid&lt;br /&gt;
&lt;br /&gt;
xe vm-list&lt;br /&gt;
xe vm-param-set uuid=&amp;lt;UUID&amp;gt; other-config-install-repository=http://ftp.uk.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
8gb disk&lt;br /&gt;
&lt;br /&gt;
make 1gb&lt;br /&gt;
make 256mb swap&lt;br /&gt;
delete 1gb&lt;br /&gt;
create as large as can, ext4, label=root, bootable&lt;br /&gt;
&lt;br /&gt;
accept&lt;br /&gt;
&lt;br /&gt;
no packages&lt;br /&gt;
&lt;br /&gt;
fs errors, reboot&lt;br /&gt;
&lt;br /&gt;
apt-get install ssh vim iptraf lsof less&lt;br /&gt;
&lt;br /&gt;
e2label /dev/xvda1 root&lt;br /&gt;
swapoff /dev/xvda2&lt;br /&gt;
mkswap -L swap /dev/xvda2&lt;br /&gt;
swapon /dev/xvda2&lt;br /&gt;
&lt;br /&gt;
vi /etc/fstab&lt;br /&gt;
&lt;br /&gt;
replace with :&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;file system&amp;gt; &amp;lt;mount point&amp;gt; &amp;nbsp; &amp;lt;type&amp;gt; &amp;nbsp;&amp;lt;options&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;dump&amp;gt; &amp;nbsp;&amp;lt;pass&amp;gt;&lt;br /&gt;
proc &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/proc &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; proc &amp;nbsp; &amp;nbsp;defaults &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;br /&gt;
LABEL=root &amp;nbsp; &amp;nbsp; &amp;nbsp;/ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ext4 &amp;nbsp; &amp;nbsp;errors=remount-ro,barrier=0 &amp;nbsp; &amp;nbsp; 0 &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;br /&gt;
LABEL=swap &amp;nbsp; &amp;nbsp; &amp;nbsp;none &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;swap &amp;nbsp; &amp;nbsp;sw &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;wierd df shit, need to fix grub&amp;gt;&lt;br /&gt;
http://forums.linuxmint.com/viewtopic.php?f=46&amp;amp;t=38599&lt;br /&gt;
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=653073&lt;br /&gt;
&lt;br /&gt;
vi /etc/ssh/sshd_config&lt;br /&gt;
&lt;br /&gt;
Port 47522&lt;br /&gt;
AddressFamily inet&lt;br /&gt;
PermitRootLogin no&lt;br /&gt;
ChallengeResponseAuthentication yes&lt;br /&gt;
PasswordAuthentication no&lt;br /&gt;
&lt;br /&gt;
service ssh restart&lt;br /&gt;
&lt;br /&gt;
add dvd drive&lt;br /&gt;
reboot&lt;br /&gt;
&lt;br /&gt;
Install and fix Xen Tools&lt;br /&gt;
&lt;br /&gt;
add the xs-tools.iso to dvd drive&lt;br /&gt;
mount /dev/xvdd /mnt&lt;br /&gt;
cd /mnt/Linux&lt;br /&gt;
dpkg -i xe-guest-utilities_1.4.90-747_amd64.deb&lt;br /&gt;
&lt;br /&gt;
vi /var/cache/xe-linux-distribution&lt;br /&gt;
&lt;br /&gt;
change os_name to Debian wheezy&lt;br /&gt;
&amp;lt;this seems to change itself back&amp;gt;&lt;br /&gt;
&lt;br /&gt;
vi /usr/sbin/xe-update-guest-attrs&lt;br /&gt;
&lt;br /&gt;
change the MajorVersion to 6&lt;br /&gt;
change the MinorVersion to 0&lt;br /&gt;
change the MicroVersion to 99&lt;br /&gt;
&lt;br /&gt;
reboot&lt;br /&gt;
umount the dvd while its rebooting!&lt;br /&gt;
&lt;br /&gt;
vi /etc/hosts&lt;br /&gt;
&lt;br /&gt;
127.0.0.1 &amp;nbsp; &amp;nbsp; &amp;nbsp; localhost&lt;br /&gt;
192.168.2.47 &amp;nbsp; &amp;nbsp;kinzie&lt;br /&gt;
&lt;br /&gt;
apt-get install samba nfs-kernel-server&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
vi /etc/netconfig&lt;br /&gt;
&lt;br /&gt;
comment out the tcp6 and udp6 lines&lt;br /&gt;
&lt;br /&gt;
mkdir /backup&lt;br /&gt;
&lt;br /&gt;
vi /etc/samba/smb.conf&lt;br /&gt;
&lt;br /&gt;
[global]&lt;br /&gt;
&lt;br /&gt;
server string = kinzie&lt;br /&gt;
workgroup = NUM&lt;br /&gt;
interfaces = 192.168.2.47&lt;br /&gt;
hosts allow = 192.168.2.0/255.255.255.0&lt;br /&gt;
&lt;br /&gt;
bind interfaces only = yes&lt;br /&gt;
smb ports = 139 445&lt;br /&gt;
dns proxy = no&lt;br /&gt;
wins supoort = no&lt;br /&gt;
disable netbios = yes&lt;br /&gt;
encrypt passwords = true&lt;br /&gt;
passwd program = /usr/bin/passwd %u&lt;br /&gt;
passdb backend = tdbsam&lt;br /&gt;
invalid users = root&lt;br /&gt;
os level = 20&lt;br /&gt;
security = user&lt;br /&gt;
syslog = 0&lt;br /&gt;
panic action = /usr/share/samba/panic-action %d&lt;br /&gt;
max log size = 1000&lt;br /&gt;
unix password sync = yes&lt;br /&gt;
log file = /var/log/samba/log.%m&lt;br /&gt;
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n *password\supdated\ssuccessfully* .&lt;br /&gt;
socket options = TCP_NODELAY SO_SNDBUF=65536 SO_RCVBUF=65536&lt;br /&gt;
obey pam restrictions = yes&lt;br /&gt;
&lt;br /&gt;
[backup]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; force user = root&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; browseable = no&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; writeable = yes&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; path = /backup&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; force group = root&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; allow hosts = 192.168.2.0/255.255.255.0&lt;br /&gt;
&lt;br /&gt;
vi /etc/exports&lt;br /&gt;
&lt;br /&gt;
/backup &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 192.168.2.0/24(no_subtree_check,no_root_squash,rw)&lt;br /&gt;
&lt;br /&gt;
vi /etc/hosts.allow&lt;br /&gt;
&lt;br /&gt;
rpc.mountd : &amp;nbsp; &amp;nbsp;192.168.2.&lt;br /&gt;
rpc.statd : &amp;nbsp; &amp;nbsp; 192.168.2.&lt;br /&gt;
&lt;br /&gt;
service rpcbind restart ; service nfs-common restart ; service nfs-kernel-server restart&lt;br /&gt;
&lt;br /&gt;
apt-get install apt-show-versions libapt-pkg-perl libauthen-pam-perl libio-pty-perl libnet-ssleay-perl openssl fsarchiver&amp;nbsp;liblzo2-2&lt;br /&gt;
&lt;br /&gt;
vi /etc/apt/sources.list&lt;br /&gt;
&lt;br /&gt;
deb http://download.webmin.com/download/repository sarge contrib&lt;br /&gt;
deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib&lt;br /&gt;
&lt;br /&gt;
cd~&lt;br /&gt;
wget http://www.webmin.com/jcameron-key.asc&lt;br /&gt;
apt-key add jcameron-key.asc&lt;br /&gt;
&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install webmin&lt;br /&gt;
&lt;br /&gt;
browse to https://192.168.2.47:10000&lt;br /&gt;
Webmin, Webmin Configuration, Ports and Addresses&lt;br /&gt;
change 10000 to 27573, disable udp&lt;br /&gt;
Create user james, unix auth, select all modules&lt;br /&gt;
&lt;br /&gt;
apt-get install libperl5.14 libsensors4 libsnmp-base libsnmp15 snmpd&lt;br /&gt;
&lt;br /&gt;
vi /etc/snmp/snmpd.conf&lt;br /&gt;
&lt;br /&gt;
agentaddress udp:50007&lt;br /&gt;
rocommunity nu-h0st1ng&lt;br /&gt;
&lt;br /&gt;
service snmpd restart&lt;br /&gt;
&lt;br /&gt;
vi /etc/iptables.up.rules&lt;br /&gt;
&lt;br /&gt;
*nat&lt;br /&gt;
:PREROUTING ACCEPT [2:809]&lt;br /&gt;
:POSTROUTING ACCEPT [2:3000]&lt;br /&gt;
:OUTPUT ACCEPT [2:3000]&lt;br /&gt;
COMMIT&lt;br /&gt;
*mangle&lt;br /&gt;
:PREROUTING ACCEPT [43:2698]&lt;br /&gt;
:INPUT ACCEPT [43:2698]&lt;br /&gt;
:FORWARD ACCEPT [0:0]&lt;br /&gt;
:OUTPUT ACCEPT [59:88726]&lt;br /&gt;
:POSTROUTING ACCEPT [59:88726]&lt;br /&gt;
COMMIT&lt;br /&gt;
*filter&lt;br /&gt;
:FORWARD ACCEPT [0:0]&lt;br /&gt;
:INPUT DROP [0:0]&lt;br /&gt;
:OUTPUT ACCEPT [0:0]&lt;br /&gt;
# Accept traffic from local interface&lt;br /&gt;
-A INPUT -i lo -j ACCEPT&lt;br /&gt;
# Accept traffic with the ACK flag set&lt;br /&gt;
-A INPUT -p tcp -m tcp --tcp-flags ACK ACK -j ACCEPT&lt;br /&gt;
# Allow incoming data that is part of a connection we established&lt;br /&gt;
-A INPUT -m state --state ESTABLISHED -j ACCEPT&lt;br /&gt;
# Allow data that is related to existing connections&lt;br /&gt;
-A INPUT -m state --state RELATED -j ACCEPT&lt;br /&gt;
# Accept responses to DNS queries&lt;br /&gt;
-A INPUT -p udp -m udp --dport 1024:65535 --sport 53 -j ACCEPT&lt;br /&gt;
# Accept responses to our pings&lt;br /&gt;
-A INPUT -p icmp -m icmp --icmp-type echo-reply -j ACCEPT&lt;br /&gt;
# Accept notifications of unreachable hosts&lt;br /&gt;
-A INPUT -p icmp -m icmp --icmp-type destination-unreachable -j ACCEPT&lt;br /&gt;
# Accept notifications to reduce sending speed&lt;br /&gt;
-A INPUT -p icmp -m icmp --icmp-type source-quench -j ACCEPT&lt;br /&gt;
# Accept notifications of lost packets&lt;br /&gt;
-A INPUT -p icmp -m icmp --icmp-type time-exceeded -j ACCEPT&lt;br /&gt;
# Accept notifications of protocol problems&lt;br /&gt;
-A INPUT -p icmp -m icmp --icmp-type parameter-problem -j ACCEPT&lt;br /&gt;
# ssh from james&lt;br /&gt;
-A INPUT -p tcp -m tcp -m state -s 192.168.2.50 --dport 47522 --state NEW -j ACCEPT&lt;br /&gt;
# webmin from james&lt;br /&gt;
-A INPUT -p tcp -m tcp -m state -s 192.168.2.50 --dport 27573 --state NEW -j ACCEPT&lt;br /&gt;
# smb from james&lt;br /&gt;
-A INPUT -p tcp -m tcp -m state -s 192.168.2.50 --dport 139 --state NEW -j ACCEPT&lt;br /&gt;
# smb from james&lt;br /&gt;
-A INPUT -p tcp -m tcp -m state -s 192.168.2.50 --dport 445 --state NEW -j ACCEPT&lt;br /&gt;
# nfs from NUM&lt;br /&gt;
-A INPUT -p tcp -m tcp -m state -s 192.168.2.0/24 --dport 111 --state NEW -j ACCEPT&lt;br /&gt;
-A INPUT -p tcp -m tcp -m state -s 192.168.2.0/24 --dport 2049 --state NEW -j ACCEPT&lt;br /&gt;
-A INPUT -p tcp -m tcp -m state -s 192.168.2.0/24 --dport 32764:32769 --state NEW -j ACCEPT&lt;br /&gt;
-A INPUT -p udp -m udp -s 192.168.2.0/24 --dport 111 -j ACCEPT&lt;br /&gt;
-A INPUT -p udp -m udp -s 192.168.2.0/24 --dport 2049 -j ACCEPT&lt;br /&gt;
-A INPUT -p udp -m udp -s 192.168.2.0/24 --dport 32764:32769 -j ACCEPT&lt;br /&gt;
# snmp&lt;br /&gt;
-A INPUT -p udp -m udp -s 109.123.119.240 --dport 50007 -j ACCEPT&lt;br /&gt;
# dns to opendns 1&lt;br /&gt;
-A OUTPUT -p udp -m udp -d 208.67.222.222 --dport 53 -j ACCEPT&lt;br /&gt;
# dns to opendns 2&lt;br /&gt;
-A OUTPUT -p udp -m udp -d 208.67.220.220 --dport 53 -j ACCEPT&lt;br /&gt;
# allow ukdebian.mirror.anlx.net 1&lt;br /&gt;
-A OUTPUT -p tcp -m tcp -d 81.91.108.243 --dport 80 -j ACCEPT&lt;br /&gt;
# allow ukdebian.mirror.anlx.net 2&lt;br /&gt;
-A OUTPUT -p tcp -m tcp -d 81.91.108.244 --dport 80 -j ACCEPT&lt;br /&gt;
-A OUTPUT -p tcp -m tcp -d 128.101.240.212 --dport 80 -j ACCEPT&lt;br /&gt;
-A OUTPUT -p tcp -m tcp -d 128.31.0.36 --dport 80 -j ACCEPT&lt;br /&gt;
-A OUTPUT -p tcp -m tcp -d 149.20.20.6 --dport 80 -j ACCEPT&lt;br /&gt;
# webmin 1&lt;br /&gt;
-A OUTPUT -p tcp -m tcp -d 67.228.198.100 --dport 80 -j ACCEPT&lt;br /&gt;
# webmin 2&lt;br /&gt;
-A OUTPUT -p tcp -m tcp -d 78.110.165.186 --dport 80 -j ACCEPT&lt;br /&gt;
# no www&lt;br /&gt;
-A OUTPUT -p tcp -m tcp --dport 80 -j DROP&lt;br /&gt;
# no www&lt;br /&gt;
-A OUTPUT -p tcp -m tcp --dport 443 -j DROP&lt;br /&gt;
# no irc&lt;br /&gt;
-A OUTPUT -p tcp -m tcp --dport 6667:7000 -j DROP&lt;br /&gt;
COMMIT&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
vi /etc/default/nfs-common&lt;br /&gt;
&lt;br /&gt;
STATDOPTS=&quot;--port 32765 --outgoing-port 32766&quot;&lt;br /&gt;
&lt;br /&gt;
vi /etc/default/nfs-kernel-server&lt;br /&gt;
&lt;br /&gt;
RPCMOUNTDOPTS=&quot;-p 32767&quot;&lt;br /&gt;
&lt;br /&gt;
vi /etc/services&lt;br /&gt;
&lt;br /&gt;
change&lt;br /&gt;
&lt;br /&gt;
ssh &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 47522/tcp&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;# SSH Remote Login Protocol&lt;br /&gt;
webmin &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;27573/tcp&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
&lt;br /&gt;
rpc.nfsd &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2049/tcp &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# RPC nfsd&lt;br /&gt;
rpc.nfsd &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2049/udp &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# RPC nfsd&lt;br /&gt;
rpc.nfs-cb &amp;nbsp; &amp;nbsp; &amp;nbsp;32764/tcp &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # RPC nfs callback&lt;br /&gt;
rpc.nfs-cb &amp;nbsp; &amp;nbsp; &amp;nbsp;32764/udp &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # RPC nfs callback&lt;br /&gt;
rpc.statd-bc &amp;nbsp; &amp;nbsp;32765/tcp &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # RPC statd broadcast&lt;br /&gt;
rpc.statd-bc &amp;nbsp; &amp;nbsp;32765/udp &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # RPC statd broadcast&lt;br /&gt;
rpc.statd &amp;nbsp; &amp;nbsp; &amp;nbsp; 32766/tcp &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # RPC statd listen&lt;br /&gt;
rpc.statd &amp;nbsp; &amp;nbsp; &amp;nbsp; 32766/udp &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # RPC statd listen&lt;br /&gt;
rpc.mountd &amp;nbsp; &amp;nbsp; &amp;nbsp;32767/tcp &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # RPC mountd&lt;br /&gt;
rpc.mountd &amp;nbsp; &amp;nbsp; &amp;nbsp;32767/udp &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # RPC mountd&lt;br /&gt;
rpc.lockd &amp;nbsp; &amp;nbsp; &amp;nbsp; 32768/tcp &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # RPC lockd/nlockmgr&lt;br /&gt;
rpc.lockd &amp;nbsp; &amp;nbsp; &amp;nbsp; 32768/udp &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # RPC lockd/nlockmgr&lt;br /&gt;
rpc.quotad &amp;nbsp; &amp;nbsp; &amp;nbsp;32769/tcp &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # RPC quotad&lt;br /&gt;
rpc.quotad &amp;nbsp; &amp;nbsp; &amp;nbsp;32769/udp &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # RPC quotad&lt;br /&gt;
&lt;br /&gt;
apt-get install rsync&lt;br /&gt;
update-rc.d -f rsync remove&lt;br /&gt;
&lt;br /&gt;
vi /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
export LS_OPTIONS=&#39;--color=auto&#39;&lt;br /&gt;
eval &quot;`dircolors`&quot;&lt;br /&gt;
alias ls=&#39;ls $LS_OPTIONS -al&#39;&lt;br /&gt;
alias lsh=&#39;ls $LS_OPTIONS -alh&#39;&lt;br /&gt;
alias df=&#39;df -h&#39;&lt;br /&gt;
alias update=&#39;apt-get update ; apt-get -V upgrade&#39;&lt;br /&gt;
export LC_ALL=C&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
rm -rf /var/cache/apt/archives/*.deb&lt;br /&gt;
rm /webmin-setup.out&lt;br /&gt;
rm /root/jcameron-key.asc&lt;br /&gt;
rm -rf /lost+found/</content><link rel='replies' type='application/atom+xml' href='http://xenhelp.blogspot.com/feeds/7437335778170140559/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://xenhelp.blogspot.com/2012/05/what-i-did-to-make-debian-wheezy64-vm.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7155281442908728750/posts/default/7437335778170140559'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7155281442908728750/posts/default/7437335778170140559'/><link rel='alternate' type='text/html' href='http://xenhelp.blogspot.com/2012/05/what-i-did-to-make-debian-wheezy64-vm.html' title='What I did to make a Debian wheezy64 VM on Xenserver 6.0.2 (XCP 1.5 Beta) with : ssh samba nfs webmin snmpd xs-tools iptables'/><author><name>James</name><uri>http://www.blogger.com/profile/01426890982696404895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7155281442908728750.post-37978675242621800</id><published>2012-05-21T12:53:00.000+01:00</published><updated>2012-05-21T12:53:12.772+01:00</updated><title type='text'>Simple disk tests on Linux</title><content type='html'>See how long it takes to write 2GB of zeros to the disk
&lt;br&gt;
&lt;div class=&quot;code&quot;&gt;
time sh -c &quot;dd if=/dev/zero of=ddfile bs=8k count=250000 &amp;amp;&amp;amp; sync&quot;
&lt;/div&gt;
The dd results aren&#39;t strictly true, use the file size divided by &#39;real&#39; time for the true write speed.
&lt;br&gt;&lt;br&gt;
Do it a second time (to check the results and also so when we read back from the file created in the first test, its not still in memory cache. File size must &gt;= RAM)&lt;br&gt;
&lt;div class=&quot;code&quot;&gt;
time sh -c &quot;dd if=/dev/zero of=ddfile2 bs=8k count=250000 &amp;amp;&amp;amp; sync&quot;
&lt;/div&gt;
Test reading back the first file
&lt;div class=&quot;code&quot;&gt;
time dd if=ddfile of=/dev/null bs=8k
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://xenhelp.blogspot.com/feeds/37978675242621800/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://xenhelp.blogspot.com/2012/05/simple-disk-tests-on-linux.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7155281442908728750/posts/default/37978675242621800'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7155281442908728750/posts/default/37978675242621800'/><link rel='alternate' type='text/html' href='http://xenhelp.blogspot.com/2012/05/simple-disk-tests-on-linux.html' title='Simple disk tests on Linux'/><author><name>James</name><uri>http://www.blogger.com/profile/01426890982696404895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7155281442908728750.post-2442202220722298827</id><published>2012-05-17T16:41:00.000+01:00</published><updated>2012-05-17T17:08:02.826+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Freeware Apps"/><title type='text'>CCleaner</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9-WFj8h25SE2y5GQsl-5M8dgC575AMUe1JO3OKlde-60rgj3fyfGWXHV7MkcqRvojaKjrRULQ8AL2_5JnjBTCtbZT9IyXl0uoBUEO52rx89WdIC7moyVVl5lenBIlN9G8_PgZRHrbfE0/s1600/cc_64.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9-WFj8h25SE2y5GQsl-5M8dgC575AMUe1JO3OKlde-60rgj3fyfGWXHV7MkcqRvojaKjrRULQ8AL2_5JnjBTCtbZT9IyXl0uoBUEO52rx89WdIC7moyVVl5lenBIlN9G8_PgZRHrbfE0/s1600/cc_64.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;a href=&quot;http://www.piriform.com/ccleaner&quot; target=&quot;_blank&quot;&gt;CCleaner&lt;/a&gt; is great for doing a bunch of PC housekeeping tasks at once - deleting temp files, browser caches, fixing/deleting registry problems etc. It&#39;s aware of a lot of programs and when I run it on client PC&#39;s it will often clean over 2.5GB of crap!</content><link rel='replies' type='application/atom+xml' href='http://xenhelp.blogspot.com/feeds/2442202220722298827/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://xenhelp.blogspot.com/2012/05/ccleaner.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7155281442908728750/posts/default/2442202220722298827'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7155281442908728750/posts/default/2442202220722298827'/><link rel='alternate' type='text/html' href='http://xenhelp.blogspot.com/2012/05/ccleaner.html' title='CCleaner'/><author><name>James</name><uri>http://www.blogger.com/profile/01426890982696404895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9-WFj8h25SE2y5GQsl-5M8dgC575AMUe1JO3OKlde-60rgj3fyfGWXHV7MkcqRvojaKjrRULQ8AL2_5JnjBTCtbZT9IyXl0uoBUEO52rx89WdIC7moyVVl5lenBIlN9G8_PgZRHrbfE0/s72-c/cc_64.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7155281442908728750.post-4319823121106375449</id><published>2012-05-17T11:23:00.002+01:00</published><updated>2012-05-17T14:07:45.640+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Freeware Apps"/><title type='text'>Attribute Changer</title><content type='html'>a handy little freeware app to change file and folder attributes, such as Date Modified :&amp;nbsp;&lt;a href=&quot;http://www.petges.lu/&quot; target=&quot;_blank&quot;&gt;Attribute Changer&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://xenhelp.blogspot.com/feeds/4319823121106375449/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://xenhelp.blogspot.com/2012/05/attribute-changer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7155281442908728750/posts/default/4319823121106375449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7155281442908728750/posts/default/4319823121106375449'/><link rel='alternate' type='text/html' href='http://xenhelp.blogspot.com/2012/05/attribute-changer.html' title='Attribute Changer'/><author><name>James</name><uri>http://www.blogger.com/profile/01426890982696404895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7155281442908728750.post-430776674910408948</id><published>2012-05-17T10:12:00.000+01:00</published><updated>2012-05-24T15:40:39.772+01:00</updated><title type='text'>Debian Wheezy on XenServer/XCP</title><content type='html'>how to get Wheezy to run nicely on Xen&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
create custom template&lt;br /&gt;
&lt;br /&gt;
xe template-list | grep -B1 name-label | awk -F: &#39;{print $2}&#39;&lt;br /&gt;
&lt;br /&gt;
find uuid of template you want to clone&lt;br /&gt;
&lt;br /&gt;
xe vm-clone uuid=&amp;lt;UUID&amp;gt; new-name-label=&quot;&amp;lt;NAME&amp;gt;&quot;&lt;br /&gt;
#xe template-param-set uuid=&amp;lt;UUID&amp;gt; other-config:install-methods=http,ftp,nfs other-config:default_template=true&lt;br /&gt;
xe template-param-set uuid=&amp;lt;UUID&amp;gt; other-config:install-methods=http other-config:debian-release=wheezy&lt;br /&gt;
&lt;br /&gt;
after creation&lt;br /&gt;
&lt;br /&gt;
get xm uuid&lt;br /&gt;
&lt;br /&gt;
xe vm-list&lt;br /&gt;
xe vm-param-set uuid=&amp;lt;UUID&amp;gt; other-config-install-repository=http://ftp.uk.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;worked for wheezy but not for sid&amp;gt;&lt;br /&gt;
&lt;br /&gt;
fs errors, reboot&lt;br /&gt;
&lt;br /&gt;
e2label /dev/xvda1 root&lt;br /&gt;
swapoff /dev/xvda2&lt;br /&gt;
mkswap -L swap /dev/xvda2&lt;br /&gt;
swapon /dev/xvda2&lt;br /&gt;
&lt;br /&gt;
vi /etc/fstab&lt;br /&gt;
&lt;br /&gt;
replace with :&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;file system&amp;gt; &amp;lt;mount point&amp;gt; &amp;nbsp; &amp;lt;type&amp;gt; &amp;nbsp;&amp;lt;options&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;dump&amp;gt; &amp;nbsp;&amp;lt;pass&amp;gt;&lt;br /&gt;
proc &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/proc &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; proc &amp;nbsp; &amp;nbsp;defaults &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;br /&gt;
LABEL=root &amp;nbsp; &amp;nbsp; &amp;nbsp;/ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ext4 &amp;nbsp; &amp;nbsp;errors=remount-ro,barrier=0 &amp;nbsp; &amp;nbsp; 0 &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;br /&gt;
LABEL=swap &amp;nbsp; &amp;nbsp; &amp;nbsp;none &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;swap &amp;nbsp; &amp;nbsp;sw &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;wierd df shit, need to fix grub&amp;gt;&lt;br /&gt;
http://forums.linuxmint.com/viewtopic.php?f=46&amp;amp;t=38599&lt;br /&gt;
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=653073&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Install and fix Xen Tools&lt;br /&gt;
&lt;br /&gt;
add the xs-tools.iso to dvd drive&lt;br /&gt;
mount /dev/xvdd /mnt&lt;br /&gt;
cd /mnt/Linux&lt;br /&gt;
dpkg -i xe-guest-utilities_1.4.90-747_amd64.deb&lt;br /&gt;
&lt;br /&gt;
vi /var/cache/xe-linux-distribution&lt;br /&gt;
&lt;br /&gt;
change os_name to Debian wheezy&lt;br /&gt;
&lt;br /&gt;
vi /usr/sbin/xe-update-guest-attrs&lt;br /&gt;
&lt;br /&gt;
change the MajorVersion to 6&lt;br /&gt;
change the MinorVersion to 0&lt;br /&gt;
change the MicroVersion to 99&lt;br /&gt;
&lt;br /&gt;
/usr/sbin/xe-update-guest-attrs&lt;br /&gt;
cd /&lt;br /&gt;
umount /mnt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://xenhelp.blogspot.com/feeds/430776674910408948/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://xenhelp.blogspot.com/2012/05/debian-wheezy-on-xenserverxcp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7155281442908728750/posts/default/430776674910408948'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7155281442908728750/posts/default/430776674910408948'/><link rel='alternate' type='text/html' href='http://xenhelp.blogspot.com/2012/05/debian-wheezy-on-xenserverxcp.html' title='Debian Wheezy on XenServer/XCP'/><author><name>James</name><uri>http://www.blogger.com/profile/01426890982696404895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7155281442908728750.post-3202579058609018403</id><published>2012-05-17T09:48:00.000+01:00</published><updated>2012-05-17T14:07:22.755+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="7-zip"/><category scheme="http://www.blogger.com/atom/ns#" term="Microsoft SQL Server"/><category scheme="http://www.blogger.com/atom/ns#" term="Sage 200"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows 2008 R2"/><category scheme="http://www.blogger.com/atom/ns#" term="XenServer"/><title type='text'>batch file to compress SQL backups</title><content type='html'>Our &lt;a href=&quot;http://www.sage.co.uk/sage-200&quot; target=&quot;_blank&quot;&gt;Sage 200&lt;/a&gt;&amp;nbsp;database backups from
&lt;a href=&quot;http://www.microsoft.com/sqlserver/en/us/default.aspx&quot; target=&quot;_blank&quot;&gt;Microsoft SQL&amp;nbsp;Server&lt;/a&gt;&amp;nbsp;are well over 3GB a piece so I made a batch file to compress them using &lt;a href=&quot;http://www.7-zip.org/&quot; target=&quot;_blank&quot;&gt;7-zip&lt;/a&gt;.

&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
for %%f in (*.bak) do &quot;C:\Program Files\7-zip\7z.exe&quot; a -m0=lzma2 -mmt7 -mx7 -ms=on &quot;%%~nf&quot;.7z &quot;%%f&quot; &amp;amp;&amp;amp; del &quot;%%f&quot;
&lt;/div&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;-m0=lzma2&lt;/span&gt;&lt;/td&gt;&lt;td&gt;sets compression algorithm to LZMA2&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;-mmt7&lt;/span&gt;&lt;/td&gt;&lt;td&gt;uses 7 CPU cores for compression (kinda)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;-mx7&lt;/span&gt;&lt;/td&gt;&lt;td&gt;sets compression &#39;level&#39; 7 (tradeoff between speed and compression, smallest=9, fastest=0)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;-ms=on&lt;/span&gt;&lt;/td&gt;&lt;td&gt;forces solid mode (better compression for archives that do not need to be updated)&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
These SQL files seem to compress better with LZMA2 than LZMA (the 7z default).&lt;br /&gt;
&lt;br /&gt;
I&#39;m running this script on a &lt;a href=&quot;http://www.microsoft.com/en-us/server-cloud/windows-server/default.aspx&quot; target=&quot;_blank&quot;&gt;Windows 2008 R2&lt;/a&gt; server, which runs on a &lt;a href=&quot;http://www.citrix.com/English/ps2/products/product.asp?contentID=683148&amp;amp;ntref=prod_cat&quot; target=&quot;_blank&quot;&gt;XenServer&lt;/a&gt; with 8 cores (8 VCPU&#39;s allocated to the VM). I don&#39;t want it to use 100% cpu of all cores and possibly slow down other VM&#39;s, so after some trial and error i chose&amp;nbsp;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;-mmt7&lt;/span&gt;&amp;nbsp;as the best option.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;-mx7&lt;/span&gt;&amp;nbsp;is not the highest compression level but&amp;nbsp;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;-mx8&lt;/span&gt;&amp;nbsp;takes a lot longer and&amp;nbsp;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;-mx9&lt;/span&gt;&amp;nbsp;takes ages, both with minor reduction in archive file size, I decided&amp;nbsp;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;-mx7&lt;/span&gt;&amp;nbsp;would be best for us.&amp;nbsp;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;-mx4&lt;/span&gt;&amp;nbsp;is a lot faster and only a bit bigger.&lt;br /&gt;
&lt;br /&gt;
Solid mode is supposedly the default with 7z but it seemed not to be so I forced it on, as each archive will only ever contain one file and will never be updated.</content><link rel='replies' type='application/atom+xml' href='http://xenhelp.blogspot.com/feeds/3202579058609018403/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://xenhelp.blogspot.com/2012/05/batch-file-to-compress-sql-backups.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7155281442908728750/posts/default/3202579058609018403'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7155281442908728750/posts/default/3202579058609018403'/><link rel='alternate' type='text/html' href='http://xenhelp.blogspot.com/2012/05/batch-file-to-compress-sql-backups.html' title='batch file to compress SQL backups'/><author><name>James</name><uri>http://www.blogger.com/profile/01426890982696404895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7155281442908728750.post-2567226535894382798</id><published>2012-05-16T21:59:00.000+01:00</published><updated>2012-05-25T10:32:43.086+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Xen Cloud Portal"/><category scheme="http://www.blogger.com/atom/ns#" term="XenServer"/><title type='text'>Xen Cloud Portal &gt;= XenServer</title><content type='html'>Anyone using the free version of &lt;a href=&quot;http://www.citrix.com/English/ps2/products/product.asp?contentID=683148&amp;amp;ntref=prod_cat&quot;&gt;XenServer 6&lt;/a&gt; should definitely check out &lt;a href=&quot;http://www.xen.org/download/xcp/index_1.5.0.html&quot;&gt;Xen Cloud Portal 1.5 Beta&lt;/a&gt; - it&#39;s the open source version of XenServer, and can still be managed with XenCenter. The best part is that most of the functionality provided by the various paid versions of XenServer works - for free. The only thing that I can&#39;t get to work is the &lt;a href=&quot;http://openvswitch.org/&quot;&gt;Open VSwitch&lt;/a&gt; appliance.&lt;br /&gt;
&lt;br /&gt;
What I have actually tested works :&lt;br /&gt;
&lt;br /&gt;
Memory Management&lt;br /&gt;
Performance Graphs beyond 1 day&lt;br /&gt;
Web Self Service&lt;br /&gt;
VM Protection and Recovery (auto snapshots and archiving) - Recovery part isn&#39;t great though - why to a template ?&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://xenhelp.blogspot.com/feeds/2567226535894382798/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://xenhelp.blogspot.com/2012/05/xen-cloud-portal-xenserver.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7155281442908728750/posts/default/2567226535894382798'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7155281442908728750/posts/default/2567226535894382798'/><link rel='alternate' type='text/html' href='http://xenhelp.blogspot.com/2012/05/xen-cloud-portal-xenserver.html' title='Xen Cloud Portal &gt;= XenServer'/><author><name>James</name><uri>http://www.blogger.com/profile/01426890982696404895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>