<?xml version="1.0" encoding="UTF-8"?>

<rss version="2.0"
 xmlns:blogChannel="http://backend.userland.com/blogChannelModule"
>

<channel>
<title><![CDATA[Dobrica Pavlinušić's random unstructured stuff: search for category: projects]]></title>
<link>https://saturn.ffzg.hr/rot13/index.cgi?action=search;search_term=category%3A%20projects</link>
<description></description>
<pubDate>Fri, 14 Dec 2018 13:26:45 -0000</pubDate>
<webMaster>root@saturn.ffzg.hr</webMaster>
<generator>Socialtext Workspace v2.19.0.2</generator>

<item>
<title><![CDATA[Eee PC]]></title>
<link>https://saturn.ffzg.hr/rot13/index.cgi?eee_pc</link>
<description><![CDATA[<div>Creator: Dobrica Pavlinušić</div><hr/><div>Tags: eeepc, projects</div><hr/><div class="wiki">
<p>
Here are my notes about setup of various stuff on Eee PC to make it work better for me.</p>
<div class="nlw_phrase"><table class="wafl_container">
  <tr>
    <td>
      <div class="wafl_box">
        
          <div class="wafl_titlebox">
            <div class="wafl_title">
              
                Contents: [Dobrica Pavlinušić's random unstructured stuff]
              
            </div>
          </div>
          <div class="wafl_items">
            
              <div class="wiki">
<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#startup">Dobrica Pavlinušić's random unstructured stuff (Startup)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Startup} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#compressed_root_filesystem">Dobrica Pavlinušić's random unstructured stuff (Compressed root filesystem)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Compressed root filesystem} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#update_2008_01_22">Dobrica Pavlinušić's random unstructured stuff (Update 2008-01-22)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Update 2008-=01-=22} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#links">Dobrica Pavlinušić's random unstructured stuff (Links)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Links} --></span></li>
</ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#disk_images">Dobrica Pavlinušić's random unstructured stuff (Disk images)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Disk images} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#backup_image_from_eee_using_external_usb_disk">Dobrica Pavlinušić's random unstructured stuff (Backup image from Eee using external USB disk)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Backup image from Eee using external USB disk} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#backup_flash_image_from_eee_pc_using_network">Dobrica Pavlinušić's random unstructured stuff (Backup flash image from Eee PC using network)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Backup flash image from Eee PC using network} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#backup_just_part_of_image">Dobrica Pavlinušić's random unstructured stuff (Backup just part of image)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Backup just part of image} --></span></li>
</ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#emulation">Dobrica Pavlinušić's random unstructured stuff (Emulation)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Emulation} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#example_flash_image">Dobrica Pavlinušić's random unstructured stuff (Example flash image)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Example flash image} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#mount_file_system">Dobrica Pavlinušić's random unstructured stuff (Mount file-system)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Mount file-=system} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#start_emulation">Dobrica Pavlinušić's random unstructured stuff (Start emulation)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Start emulation} --></span></li>
</ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#links">Dobrica Pavlinušić's random unstructured stuff (Links)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Links} --></span></li>
</ul>
</div>

            
            
          </div>
        
      </div>
    </td>
  </tr>
</table>
<!-- wiki: {toc: }
--></div><br /><br /><h1 id="startup">Startup</h1>
<p>
Edit <tt>/usr/bin/startsimple.sh</tt> and insert something along following lines before exec icewm</p>
<pre>
 sudo rm /tmp/nologin

 xrdb -merge ~/.Xresources
 setxkbmap hr us
 xterm &amp;

 exec icewm
</pre>
<br /><h1 id="compressed_root_filesystem">Compressed root filesystem</h1>
<p>
I don't really care much about Xandos on my Eee PC. However, I really do like idea about having read-only system filesystem (especially if your startup scripts are breakable as easy as ones on eee are). So, to improve this idea, I started to think how to compress read-only partition so I can at least save space.</p>
<p>
As a first experiment, I copied whole flash from eee (about 3.6Gb used) and compressed it using <tt>gzip -1</tt> (lowest possible compression level). I was quite amazed to see that resulting archive was only 1.3Gb. So, I was up to something (and additional 2Gb of free space on 4Gb eee is also nice :-)</p>
<h2 id="update_2008_01_22">Update 2008-01-22</h2>
<p>
squashfs 3.3 can't compress comtent of eee's <tt>/usr</tt> without hanging on flock after about ~47000 files. This is quite annoying, but 3.2 works. Since it's compiled from upstream source it doesn't include lzma compression, but is saves 1.6Gb of disk space. <a target="_blank" title="(external link)" href="http://groups.google.com/group/eeepc-zagreb/browse_thread/thread/c68d220ec0c5b2dc">More details is available<!-- wiki-renamed-hyperlink "More details is available"<http://groups.google.com/group/eeepc=-zagreb/browse_thread/thread/c68d220ec0c5b2dc> --></a>, but in Croatian only.</p>
<h2 id="links">Links</h2>
<p>
Here is collection of references about this issue:</p>
<div class="nlw_phrase"><div class="fetchrss_box">
  <div class="fetchrss_titlebox">
    
 <div class="fetchrss_title">
     fetchrss: http://del.icio.us/rss/dpavlin/debian+usb
 </div>

  </div>
  
<ul class="fetchrss_item">
  <li class="fetchrss_item">
    There was an error: 500 Can't connect to del.icio.us:80 (Bad hostname 'del.icio.us')

  </li>
</ul>

</div>
















<!-- wiki: {fetchrss: http://del.icio.us/rss/dpavlin/debian+usb full}
--></div><br /><br /><h1 id="disk_images">Disk images</h1>
<h2 id="backup_image_from_eee_using_external_usb_disk">Backup image from Eee using external USB disk</h2>
<pre>
dd if=/dev/sda of=/media/A/Partition1/flash4Gb.img
</pre>
<br /><p>
Path in <tt>of</tt> may be different depending on partition on your disk.</p>
<h2 id="backup_flash_image_from_eee_pc_using_network">Backup flash image from Eee PC using network</h2>
<p>
Transfer somehow whole disk image to other computer. Good way might be to use netcat with something like this:</p>
<ul>
<li>on Eee</li>
</ul>
<pre>
sudo nc -l -p 8888 &lt; /dev/sda
</pre>
<br /><ul>
<li>on other computer</li>
</ul>
<pre>
nc name.of.eee.pc 8888 &gt; hda
</pre>
<br /><p>
You might want to insert compression if your network connection is slower than flash read speed (which is according to <tt>hdparm -tT /dev/hda</tt> around 21MB/sec).</p>
<p>
Alternative is to take <tt>P701L.gz</tt> from DVD which came with machine, but it has only one partition which is factory default one.</p>
<h2 id="backup_just_part_of_image">Backup just part of image</h2>
<p>
You can also copy just parts of flash filesystem if you want (this copies just disk after partition 2):</p>
<ul>
<li>on eee</li>
</ul>
<pre>
dd if=/dev/sda bs=512 skip=4819500 | gzip | nc -w 3 other.computer
88882995524+0 records in
2995524+0 records out
1533708288 bytes (1.5 GB) copied, 279.348 seconds, 5.5 MB/s
</pre>
<br /><ul>
<li>on other computer</li>
</ul>
<pre>
nc -l -p 8888 | gzip -cd | &gt; /rest/tmp/hda2-4
</pre>
<br /><ul>
<li>now, ectract beginning of disk and first partition from P701L</li>
</ul>
<pre>
dd if=P701L of=hda1 bs=512 count=4819500
</pre>
<br /><ul>
<li>and merge partition together to create full disk image</li>
</ul>
<pre>
cat hda1 hda2-4 &gt; hda
</pre>
<br /><h1 id="emulation">Emulation</h1>
<p>
How to create virtual Eee PC?</p>
<h2 id="example_flash_image">Example flash image</h2>
<pre>
# fdisk -l hda 

Disk /backup/eee/hda: 3 GB, 3997486080 bytes
255 heads, 63 sectors/track, 486 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

          Device Boot      Start         End      Blocks   Id  System 
/backup/eee/hda1               1         300     2409718   83  Linux
/backup/eee/hda2             301         484     1469947   83  Linux
/backup/eee/hda3             485         485           0    c  FAT32 LBA
/backup/eee/hda4             486         486           0   ef  EFI FAT
</pre>
<br /><h2 id="mount_file_system">Mount file-system</h2>
<p>
We need first file system (factory defaults) to get access to kernel and initrd image</p>
<pre>
# fdisk -u -l hda 

Disk /backup/eee/hda: 3 GB, 3997486080 bytes
255 heads, 63 sectors/track, 486 cylinders, total 7807590 sectors
Units = sectors of 1 * 512 = 512 bytes

          Device Boot      Start         End      Blocks   Id  System 
/backup/eee/hda1              63     4803435     2409718   83  Linux
/backup/eee/hda2         4819563     7759395     1469947   83  Linux
/backup/eee/hda3         7775523     7775460           0    c  FAT32 LBA
/backup/eee/hda4         7791588     7791525           0   ef  EFI FAT
# mkdir 1
# mount hda 1 -o loop,offset=`expr 63 \* 512`
</pre>
<br /><h2 id="start_emulation">Start emulation</h2>
<pre>
qemu -m 512 -hda hda -kernel boot/vmlinuz-2.6.21.4-eeepc -initrd boot/initramfs-eeepc.img -append &quot;rw root=/dev/sda1&quot;
</pre>
<br /><h1 id="links">Links</h1>
<div class="nlw_phrase"><div class="fetchrss_box">
  <div class="fetchrss_titlebox">
    
 <div class="fetchrss_title">
     fetchrss: http://del.icio.us/rss/dpavlin/eeepc
 </div>

  </div>
  
<ul class="fetchrss_item">
  <li class="fetchrss_item">
    There was an error: 500 Can't connect to del.icio.us:80 (Bad hostname 'del.icio.us')

  </li>
</ul>

</div>
















<!-- wiki: {fetchrss: http://del.icio.us/rss/dpavlin/eeepc full}
--></div><br /></div>
]]></description>
<author>Dobrica Pavlinu&#x161;i&#x107;</author>
<category></category>
<guid isPermaLink="true">https://saturn.ffzg.hr/rot13/index.cgi?eee_pc</guid>
<pubDate>Tue, 22 Jan 2008 18:29:20 -0000</pubDate>
</item>
<item>
<title><![CDATA[vz-tools]]></title>
<link>https://saturn.ffzg.hr/rot13/index.cgi?vz_tools</link>
<description><![CDATA[<div>Creator: Dobrica Pavlinušić</div><hr/><div>Tags: OpenVZ, perl, projects, virtualization</div><hr/><div class="wiki">
<p>
Suite of perl scripts in spirit of <a target="_blank" title="(external link)" href="http://www.xen-tools.org/">xen-tools<!-- wiki-renamed-hyperlink "xen=-tools"<http://www.xen=-tools.org/> --></a> but for <a target="_blank" title="(external link)" href="http://openvz.org/">OpenVZ<!-- wiki-renamed-hyperlink "OpenVZ"<http://openvz.org/> --></a></p>
<div class="nlw_phrase"><table class="wafl_container">
  <tr>
    <td>
      <div class="wafl_box">
        
          <div class="wafl_titlebox">
            <div class="wafl_title">
              
                Contents: [Dobrica Pavlinušić's random unstructured stuff]
              
            </div>
          </div>
          <div class="wafl_items">
            
              <div class="wiki">
<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#installation">Dobrica Pavlinušić's random unstructured stuff (Installation)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Installation} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#install_perl_dependencies_from_debian_packages">Dobrica Pavlinušić's random unstructured stuff (Install perl dependencies from Debian packages)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Install perl dependencies from Debian packages} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#install_utilities_from_debian_packages">Dobrica Pavlinušić's random unstructured stuff (Install utilities from Debian packages)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Install utilities from Debian packages} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#checkout_source">Dobrica Pavlinušić's random unstructured stuff (Checkout source)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Checkout source} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#check_and_install_perl_modules_from_cpan">Dobrica Pavlinušić's random unstructured stuff (Check and install perl modules from CPAN)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Check and install perl modules from CPAN} --></span></li>
</ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#usage">Dobrica Pavlinušić's random unstructured stuff (Usage)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Usage} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#vz_create_pl">Dobrica Pavlinušić's random unstructured stuff (vz-create.pl)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] vz-=create.pl} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#vz_optimize_pl">Dobrica Pavlinušić's random unstructured stuff (vz-optimize.pl)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] vz-=optimize.pl} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#vz_clone_pl">Dobrica Pavlinušić's random unstructured stuff (vz-clone.pl)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] vz-=clone.pl} --></span></li>
</ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#source">Dobrica Pavlinušić's random unstructured stuff (Source)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Source} --></span></li>
</ul>
</div>

            
            
          </div>
        
      </div>
    </td>
  </tr>
</table>
<!-- wiki: {toc: }
--></div><br /><br /><h1 id="installation">Installation</h1>
<h2 id="install_perl_dependencies_from_debian_packages">Install perl dependencies from Debian packages</h2>
<p>
This step is optional. If you don't want to use perl modules from packages provided by your distribution, skip this step, and modules will be automatically installed in next one.</p>
<pre>
sudo apt-get install libio-prompt-perl libregexp-common-perl libdata-dump-perl
</pre>
<br /><h2 id="install_utilities_from_debian_packages">Install utilities from Debian packages</h2>
<pre>
sudo apt-get install host
</pre>
<br /><h2 id="checkout_source">Checkout source</h2>
<pre>
svn co svn://svn.rot13.org/vz-tools/trunk vz-tools
</pre>
<br /><h2 id="check_and_install_perl_modules_from_cpan">Check and install perl modules from CPAN</h2>
<pre>
cd vz-tools
perl Makefile.PL
make
</pre>
<br /><p>
Please note that there is no need to run <tt>make install</tt></p>
<p>
Tools are runnable from current directory. This will probably change in later versions.</p>
<h1 id="usage">Usage</h1>
<p>
This is quick hand-on overview of commands to get you started.</p>
<p>
All commands must be started with <tt>root</tt> priviledges</p>
<h2 id="vz_create_pl">vz-create.pl</h2>
<p>
This will perform following steps:</p>
<ul>
<li>Create new virtual machine bootstraped using <tt>debootstrap</tt></li>
<li>Change root password</li>
<li>Create single user</li>
<li>Make small custimization like installing <tt>vim</tt> and <a target="_blank" title="(external link)" href="http://www.rot13.org/~dpavlin/apt-iselect.html">apt-iselect<!-- wiki-renamed-hyperlink "apt=-iselect"<http://www.rot13.org/~dpavlin/apt=-iselect.html> --></a></li>
</ul>
<p>
All commands will be echoed on screen, <strong>even passwords</strong>. However, if you want to learn steps in creating OpenVZ VE, this is very helpful.</p>
<p>
To run interactive session which asks questions use:</p>
<pre>
./vz-create.pl
</pre>
<br /><p>
Other alternative is to just enter hostname (defined in <tt>/etc/hosts</tt> for example)</p>
<pre>
./vz-create.pl my-new-ve.exmple.com
</pre>
<br /><p>
or by specifing IP adress</p>
<pre>
./vz-create.pl 192.168.42.42
</pre>
<br /><h2 id="vz_optimize_pl">vz-optimize.pl</h2>
<h2 id="vz_clone_pl">vz-clone.pl</h2>
<pre>
root@black:~/vz-tools# time ./vz-clone.pl create 1001
Clone VE 1001 -&gt; 101001
found LV /dev/vg/vz for /vz
vzquota : (warning) Quota is running, so data reported from quota file may not reflect current values
quota for 1001 | 10485760 &lt; 20971520 | usage: 7826792
using existing /dev/vg/vz-clone-101001
Mounting /dev/vg/vz-clone-101001 to /tmp/vz-clone-101001
rsync /vz/private/1001 -&gt; /tmp/vz-clone-101001/private
101001 new IP number: 10.42.42.42
101001 new hostname: clone-42.example.com

Please review config file: /etc/vz/conf/101001.conf
Add NAT for new VE with: iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
Start clone of 1001 with: vzctl start 101001

real    1m57.347s
user    0m2.252s
sys     0m8.591s
</pre>
<br /><h1 id="source">Source</h1>
<div class="nlw_phrase"><div class="fetchrss_box">
  <div class="fetchrss_titlebox">
    
 <div class="fetchrss_title">
     fetchrss: http://svn.rot13.org/index.cgi/vz-tools/rss/trunk
 </div>

  </div>
  
<ul class="fetchrss_item">
  <li class="fetchrss_item">
    There was an error: 404 Not Found

  </li>
</ul>

</div>
















<!-- wiki: {fetchrss: http://svn.rot13.org/index.cgi/vz-=tools/rss/trunk full}
--></div><br /></div>
]]></description>
<author>Dobrica Pavlinu&#x161;i&#x107;</author>
<category></category>
<guid isPermaLink="true">https://saturn.ffzg.hr/rot13/index.cgi?vz_tools</guid>
<pubDate>Thu, 08 Nov 2007 12:49:55 -0000</pubDate>
</item>
<item>
<title><![CDATA[irc-logger]]></title>
<link>https://saturn.ffzg.hr/rot13/index.cgi?irc_logger</link>
<description><![CDATA[<div>Creator: Dobrica Pavlinušić</div><hr/><div>Tags: projects</div><hr/><div class="wiki">
<p>
<tt>irc-logger</tt> is irc bot which records conversations, supports tags and create web archive of your conversations to enable better recall than from vague memory.</p>
<p>
It supports several interesting features including tagging// (just add two slashes at end of the word, and it becomes tag in web archive)</p>
<div class="nlw_phrase"><div class="fetchrss_box">
  <div class="fetchrss_titlebox">
    
 <div class="fetchrss_title">
     fetchrss: http://svn.rot13.org/index.cgi/irc-logger/rss/trunk
 </div>

  </div>
  
<ul class="fetchrss_item">
  <li class="fetchrss_item">
    There was an error: 404 Not Found

  </li>
</ul>

</div>
















<!-- wiki: {fetchrss: http://svn.rot13.org/index.cgi/irc-=logger/rss/trunk full}
--></div><br /></div>
]]></description>
<author>Dobrica Pavlinu&#x161;i&#x107;</author>
<category></category>
<guid isPermaLink="true">https://saturn.ffzg.hr/rot13/index.cgi?irc_logger</guid>
<pubDate>Thu, 01 Nov 2007 10:32:23 -0000</pubDate>
</item>
<item>
<title><![CDATA[Perly]]></title>
<link>https://saturn.ffzg.hr/rot13/index.cgi?perly</link>
<description><![CDATA[<div>Creator: Dobrica Pavlinušić</div><hr/><div>Tags: Jifty, projects</div><hr/><div class="wiki">
<p>
Very small <a target="_blank" title="(external link)" href="http://jifty.org">Jifty<!-- wiki-renamed-hyperlink "Jifty"<http://jifty.org> --></a> application which enables execution of perl code within browser. <strong>This is a gapping security hole.</strong> You have been warned. Source code is <a target="_blank" title="(external link)" href="http://svn.rot13.org/index.cgi/Perly">in subversion<!-- wiki-renamed-hyperlink "in subversion"<http://svn.rot13.org/index.cgi/Perly> --></a> so feel free to checkout it and play with it.</p>
<p>
Aside from that, it's a nice tool to learn perl on the web, without need to install anything on local machine. In fast, that's why it was written.</p>
<p>
Features:</p>
<ul>
<li>upload or copy/paste code or input</li>
<li>edit code using <a target="_blank" title="(external link)" href="http://codepress.org">JavaScript syntax highlighted editor<!-- wiki-renamed-hyperlink "JavaScript syntax highlighted editor"<http://codepress.org> --></a></li>
<li>run scripts from browsers and get command-line equivalent output</li>
<li>resolve dependencies within code (needed to dump all files required for run)</li>
</ul>
<p>
Security holes:</p>
<ul>
<li>It execute any code entered by user on server. It will timeout it after 5s (configurable in config.yml)</li>
<li>User can require any module installed on system (there is <strong>FIXME</strong> comment in code, but I'm not sure that white listing of modules would be usable).</li>
</ul>
<div class="nlw_phrase"><div class="fetchrss_box">
  <div class="fetchrss_titlebox">
    
 <div class="fetchrss_title">
     fetchrss: http://svn.rot13.org/index.cgi/Perly/rss
 </div>

  </div>
  
<ul class="fetchrss_item">
  <li class="fetchrss_item">
    There was an error: 404 Not Found

  </li>
</ul>

</div>
















<!-- wiki: {fetchrss: http://svn.rot13.org/index.cgi/Perly/rss full}
--></div><br /></div>
]]></description>
<author>Dobrica Pavlinu&#x161;i&#x107;</author>
<category></category>
<guid isPermaLink="true">https://saturn.ffzg.hr/rot13/index.cgi?perly</guid>
<pubDate>Mon, 16 Jul 2007 11:25:10 -0000</pubDate>
</item>
<item>
<title><![CDATA[Grep]]></title>
<link>https://saturn.ffzg.hr/rot13/index.cgi?grep</link>
<description><![CDATA[<div>Creator: Dobrica Pavlinušić</div><hr/><div>Tags: Jifty, projects</div><hr/><div class="wiki">
<p>
Grep is RSS feed searcher and cacher. Actually, more correct is to think about Grep as your search console.<br />
If you are into buzzword land, you can even call that <em>information worker workbench</em> but, enough of that.</p>
<p>
It's mostly useful with web sites that provide search results as RSS feed. If they include full content in feeds even better. One example of such web service is <a target="_blank" title="(external link)" href="http://www.socialtext.com/">SocialText wiki<!-- wiki-renamed-hyperlink "SocialText wiki"<http://www.socialtext.com/> --></a> for which Grep was originally written.</p>
<blockquote>
I <strong>know</strong> that I wrote it in some wiki workspace, <strong>but where</strong> ?!</blockquote>
<br /><p>
Following that idea, Grep gained powerful plugin mechanism which enable users (err, developers who can write 10-line perl module) to scrape any site which has form or rest API and produce search results as links. While doing that, it will also fetch result pages and cache them locally. Have in mind that this is a slow process which puts much load on remote server, so use it sparsely. However, once remote results are fetched, they are always available in local cache for quick reference, even when offline!</p>
<p>
For now, here is a feature list:</p>
<ul>
<li>cache all results locally, great for off-line use</li>
<li>supports credential spoofing using Cookies (useful to login into protected areas)</li>
<li>comes with easy bookmarklet subscribe helper</li>
<li>written using <a target="_blank" title="(external link)" href="http://jifty.org/">Jifty<!-- wiki-renamed-hyperlink "Jifty"<http://jifty.org/> --></a> and <a target="_blank" title="(external link)" href="http://www.rectangular.com/kinosearch/">KinoSearch<!-- wiki-renamed-hyperlink "KinoSearch"<http://www.rectangular.com/kinosearch/> --></a></li>
<li>scrapers for other wikis and CMS engines which can be <a target="_blank" title="(external link)" href="http://svn.rot13.org/index.cgi/Grep/browse/lib/Grep/Source">source of items<!-- wiki-renamed-hyperlink "source of items"<http://svn.rot13.org/index.cgi/Grep/browse/lib/Grep/Source> --></a> for Grep</li>
<li>de-duplicate local results (based on <a target="_blank" title="(external link)" href="http://search.cpan.org/~janpom/Text-DeDuper/">near duplicates detection<!-- wiki-renamed-hyperlink "near duplicates detection"<http://search.cpan.org/~janpom/Text=-DeDuper/> --></a> which is great for sites which change just slightly like wikis)</li>
<li>import local html pages from <a target="_blank" title="(external link)" href="http://amb.vis.ne.jp/mozilla/scrapbook/">ScrapBook<!-- wiki-renamed-hyperlink "ScrapBook"<http://amb.vis.ne.jp/mozilla/scrapbook/> --></a> FireFox plugin</li>
</ul>
<p>
Source code is in <a target="_blank" title="(external link)" href="http://svn.rot13.org/index.cgi/Grep/">development Subversion repository<!-- wiki-renamed-hyperlink "development Subversion repository"<http://svn.rot13.org/index.cgi/Grep/> --></a></p>
<div class="nlw_phrase"><div class="fetchrss_box">
  <div class="fetchrss_titlebox">
    
 <div class="fetchrss_title">
     fetchrss: http://svn.rot13.org/index.cgi/Grep/rss
 </div>

  </div>
  
<ul class="fetchrss_item">
  <li class="fetchrss_item">
    There was an error: 404 Not Found

  </li>
</ul>

</div>
















<!-- wiki: {fetchrss: http://svn.rot13.org/index.cgi/Grep/rss full}
--></div><br /></div>
]]></description>
<author>Dobrica Pavlinu&#x161;i&#x107;</author>
<category></category>
<guid isPermaLink="true">https://saturn.ffzg.hr/rot13/index.cgi?grep</guid>
<pubDate>Mon, 11 Jun 2007 09:24:59 -0000</pubDate>
</item>
<item>
<title><![CDATA[Virtualization workshop]]></title>
<link>https://saturn.ffzg.hr/rot13/index.cgi?virtualization_workshop</link>
<description><![CDATA[<div>Creator: Dobrica Pavlinušić</div><hr/><div>Tags: KVM, OpenVZ, projects, QEMU, virtualization</div><hr/><div class="wiki">
<p>
Materijali za <a target="_blank" title="(external link)" href="http://www.hroug.hr/hr/hroug_konferencija/u_pripremi/hroug2008_rovinj/predavanja_radionice_demogroundi/radionice/virtualizacija_na_linuxu_jednostavan_izbor_zar_ne">Virtualizacija na Linuxu -- jednostavan izbor zar ne?<!-- wiki-renamed-hyperlink "Virtualizacija na Linuxu =-=- jednostavan izbor zar ne?"<http://www.hroug.hr/hr/hroug_konferencija/u_pripremi/hroug2008_rovinj/predavanja_radionice_demogroundi/radionice/virtualizacija_na_linuxu_jednostavan_izbor_zar_ne> --></a></p>
<div class="nlw_phrase"><table class="wafl_container">
  <tr>
    <td>
      <div class="wafl_box">
        
          <div class="wafl_titlebox">
            <div class="wafl_title">
              
                Contents: [Dobrica Pavlinušić's random unstructured stuff]
              
            </div>
          </div>
          <div class="wafl_items">
            
              <div class="wiki">
<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#hardware">Dobrica Pavlinušić's random unstructured stuff (Hardware)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Hardware} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#cpu">Dobrica Pavlinušić's random unstructured stuff (CPU)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] CPU} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#disk_performance">Dobrica Pavlinušić's random unstructured stuff (Disk performance)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Disk performance} --></span></li>
</ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#kvm">Dobrica Pavlinušić's random unstructured stuff (KVM)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] KVM} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#qemu">Dobrica Pavlinušić's random unstructured stuff (QEMU)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] QEMU} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#virtualbox">Dobrica Pavlinušić's random unstructured stuff (VirtualBox)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] VirtualBox} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#openvz">Dobrica Pavlinušić's random unstructured stuff (OpenVZ)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] OpenVZ} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#vmware">Dobrica Pavlinušić's random unstructured stuff (VMWare)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] VMWare} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#convert_image_to_monolithic_growable_disk">Dobrica Pavlinušić's random unstructured stuff (Convert image to monolithic growable disk)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Convert image to monolithic growable disk} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#vmware_vdiskmanager_error_messages">Dobrica Pavlinušić's random unstructured stuff (vmware-vdiskmanager error messages)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] vmware-=vdiskmanager error messages} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#resize_disk_image">Dobrica Pavlinušić's random unstructured stuff (Resize disk image)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Resize disk image} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#convert_vmdk_to_qcow">Dobrica Pavlinušić's random unstructured stuff (Convert vmdk to qcow)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Convert vmdk to qcow} --></span></li>
</ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#xen">Dobrica Pavlinušić's random unstructured stuff (Xen)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Xen} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#disk_speed">Dobrica Pavlinušić's random unstructured stuff (disk speed)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] disk speed} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#resize_domu_image">Dobrica Pavlinušić's random unstructured stuff (resize domU image)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] resize domU image} --></span></li>
</ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#proxmox">Dobrica Pavlinušić's random unstructured stuff (proxmox)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] proxmox} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#linux_containers">Dobrica Pavlinušić's random unstructured stuff (Linux Containers)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Linux Containers} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#guest_os">Dobrica Pavlinušić's random unstructured stuff (Guest OS)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Guest OS} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#windows">Dobrica Pavlinušić's random unstructured stuff (Windows)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Windows} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#solaris">Dobrica Pavlinušić's random unstructured stuff (Solaris)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Solaris} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#darwin">Dobrica Pavlinušić's random unstructured stuff (Darwin)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Darwin} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#plan_9">Dobrica Pavlinušić's random unstructured stuff (Plan 9)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Plan 9} --></span></li>
</ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#links">Dobrica Pavlinušić's random unstructured stuff (Links)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Links} --></span></li>
</ul>
</div>

            
            
          </div>
        
      </div>
    </td>
  </tr>
</table>
<!-- wiki: {toc: }
--></div><br /><br /><ul>
<li><a target="_blank" title="(external link)" href="https://penta.debconf.org/dc8_schedule/events/275.en.html">Virtualisation in Debian - Present and future<!-- wiki-renamed-hyperlink "Virtualisation in Debian =- Present and future"<https://penta.debconf.org/dc8_schedule/events/275.en.html> --></a> - DebConf 2008</li>
</ul>
<h1 id="hardware">Hardware</h1>
<h2 id="cpu">CPU</h2>
<p>
Support for hardware virtualization:</p>
<pre>
egrep '^flags.*(vmx|svm)' /proc/cpuinfo
</pre>
<br /><table style="border-collapse: collapse;" class="formatter_table">
<tr>
<td style="border: 1px solid black;padding: .2em;"><span style="padding:.5em">&nbsp;</span></td>
<td style="border: 1px solid black;padding: .2em;"><strong>vmx/svm</strong></td>
<td style="border: 1px solid black;padding: .2em;">no vmx/svn</td>
</tr>
<tr>
<td style="border: 1px solid black;padding: .2em;"><strong>USB</strong></td>
<td style="border: 1px solid black;padding: .2em;">kvm</td>
<td style="border: 1px solid black;padding: .2em;">qemu+kqemu</td>
</tr>
<tr>
<td style="border: 1px solid black;padding: .2em;">no USB</td>
<td style="border: 1px solid black;padding: .2em;">VirtualBox</td>
<td style="border: 1px solid black;padding: .2em;"><span style="padding:.5em">&nbsp;</span></td>
</tr>
</table>
<br /><p>
How much CPU do I use? :-)</p>
<pre>
dpavlin@brr:~$ cpufreq-info 
cpufrequtils 004: cpufreq-info (C) Dominik Brodowski 2004-2006
Report errors and bugs to cpufreq@lists.linux.org.uk, please.
analyzing CPU 0:
  driver: acpi-cpufreq
  CPUs which need to switch frequency at the same time: 0
  hardware limits: 2.40 GHz - 3.20 GHz
  available frequency steps: 3.20 GHz, 2.80 GHz, 2.40 GHz
  available cpufreq governors: userspace, powersave, ondemand, conservative, performance
  current policy: frequency should be within 2.40 GHz and 3.20 GHz.
                  The governor &quot;ondemand&quot; may decide which speed to use
                  within this range.
  current CPU frequency is 2.40 GHz.
  cpufreq stats: 3.20 GHz:1.80%, 2.80 GHz:0.00%, 2.40 GHz:98.20%  (17)
</pre>
<br /><h2 id="disk_performance">Disk performance</h2>
<span class="nlw_phrase"><div class="wiki-include-page">
<div class="wiki-include-title"><a href='https://saturn.ffzg.hr/rot13/index.cgi?disk_performance' >Disk performance</a> </div>
<div class="wiki-include-content">
<div class="nlw_phrase"><table class="wafl_container">
  <tr>
    <td>
      <div class="wafl_box">
        
          <div class="wafl_titlebox">
            <div class="wafl_title">
              
                Contents: [Dobrica Pavlinušić's random unstructured stuff]
              
            </div>
          </div>
          <div class="wafl_items">
            
              <div class="wiki">
<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#speed">Dobrica Pavlinušić's random unstructured stuff (Speed)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Speed} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#disk_platter_transfer_speed">Dobrica Pavlinušić's random unstructured stuff (Disk platter transfer speed)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Disk platter transfer speed} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#individial_disks">Dobrica Pavlinušić's random unstructured stuff (Individial disks)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Individial disks} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#software_raid">Dobrica Pavlinušić's random unstructured stuff (Software RAID)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Software RAID} --></span></li>
</ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#temperature">Dobrica Pavlinušić's random unstructured stuff (Temperature)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Temperature} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#data_security">Dobrica Pavlinušić's random unstructured stuff (Data security)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Data security} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#smart">Dobrica Pavlinušić's random unstructured stuff (Smart)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Smart} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#raid">Dobrica Pavlinušić's random unstructured stuff (RAID)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] RAID} --></span></li>
</ul></ul>
</div>

            
            
          </div>
        
      </div>
    </td>
  </tr>
</table>
<!-- wiki: {toc: }
--></div><br /><br /><p>
Have many disks. More disk spindles brings more than capacity alone! (Same as in databases)</p>
<h1 id="speed">Speed</h1>
<h2 id="disk_platter_transfer_speed">Disk platter transfer speed</h2>
<p>
If you think that disk has constant transfer speed, <a target="_blank" title="(external link)" href="http://www.coker.com.au/bonnie++/zcav/results.html">ZCAV has interesting graphs<!-- wiki-renamed-hyperlink "ZCAV has interesting graphs"<http://www.coker.com.au/bonnie++/zcav/results.html> --></a></p>
<h2 id="individial_disks">Individial disks</h2>
<p>
Slow laptop 2.5&quot; 5400 disk</p>
<pre>
dpavlin@llin:~$ sudo hdparm -i /dev/sda

/dev/sda:

 Model=FUJITSU MHV2080BH                       , FwRev=00840028, SerialNo=        NW05T6B29HM5
 Config={ HardSect NotMFM HdSw&gt;15uSec Fixed DTR&gt;10Mbs }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4
 BuffType=DualPortCache, BuffSize=8192kB, MaxMultSect=16, MultSect=?16?
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=156301488
 IORDY=on/off, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4 
 DMA modes:  mdma0 mdma1 mdma2 
 UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5 
 AdvancedPM=yes: mode=0x80 (128) WriteCache=enabled
 Drive conforms to: unknown:  ATA/ATAPI-3,4,5,6,7

 * signifies the current active mode

dpavlin@llin:~$ sudo hdparm -tT /dev/sda
/dev/sda:
 Timing cached reads:   1566 MB in  2.00 seconds = 782.85 MB/sec
 Timing buffered disk reads:   66 MB in  3.03 seconds =  21.79 MB/sec
</pre>
<br /><p>
Interesting numbers are <tt>BuffSize</tt> (cache in disk) and <tt>MaxMultSect</tt> which we want to use for read-ahead param:</p>
<pre>
hdparm -m 16 -a 16 /dev/sda
</pre>
<br /><p>
This will <strong>decrease</strong> a bit speed of linerar buffer reads which <tt>hdparm</tt> uses, but we will pull from disk only blocks which are allready in cache, improving random read/write performance.</p>
<p>
To find optimal readahead for your drive using hdparm access pattern you can use <a target="_blank" title="(external link)" href="http://svn.rot13.org/index.cgi/scripts/view/trunk/hdparm-readahead.pl">hdparm-readahead.pl<!-- wiki-renamed-hyperlink "hdparm=-readahead.pl"<http://svn.rot13.org/index.cgi/scripts/view/trunk/hdparm=-readahead.pl> --></a> which will try different combinations for you.</p>
<p>
Faster (!) external 3.5 USB disk (no <tt>hdparm -i</tt> on USB), but just because it's <strong>another</strong> disk not loaded by system.</p>
<pre>
dpavlin@llin:~$ sudo hdparm -tT /dev/sdb

/dev/sdb:
 Timing cached reads:   1508 MB in  2.00 seconds = 753.72 MB/sec
 Timing buffered disk reads:   56 MB in  3.03 seconds =  18.48 MB/sec
</pre>
<br /><h2 id="software_raid">Software RAID</h2>
<span class="nlw_phrase"><div class="wiki-include-page">
<div class="wiki-include-title"><a href='https://saturn.ffzg.hr/rot13/index.cgi?home_made_raid_disk_holder' >Home-made RAID disk holder</a> </div>
<div class="wiki-include-content">
<p>
Home-made software md RAID 5 array from SATA drives:</p>
<div class="nlw_phrase"><div class="fetchrss_box">
  <div class="fetchrss_titlebox">
    
 <div class="fetchrss_title">
     fetchrss: http://api.flickr.com/services/feeds/photoset.gne?set=72157603375109805&nsid=46217738@N00&lang=en-us
 </div>

  </div>
  
<ul class="fetchrss_item">
  <li class="fetchrss_item">
    There was an error: 500 SSL negotiation failed: 

  </li>
</ul>

</div>
















<!-- wiki: {fetchrss: http://api.flickr.com/services/feeds/photoset.gne?set==72157603375109805&nsid==46217738@N00&lang==en-=us full}
--></div><br /><br /><p>
Note nice usage of construction metal stripes with holes which is usually used to hold fence. It has holes just the right size for screws to go through and hold disks nicely spaced (although a little bit more space would be ideal). It's soft enough to be bent at corners to produce nice and leveled space between it and case.</p>
<p>
Blog post <a target="_blank" title="(external link)" href="http://blog.rot13.org/2007/11/raid5_for_home.html">RAID5 for home<!-- wiki-renamed-hyperlink "RAID5 for home"<http://blog.rot13.org/2007/11/raid5_for_home.html> --></a> describes setup in some details.</p>
</div></div><!-- wiki: {include: [Home-=made RAID disk holder]} --></span><br /><br /><p>
Drive info:</p>
<pre>
dpavlin@brr:~$ sudo hdparm -i /dev/sdd

/dev/sdd:

 Model=WDC WD5000AAKS-00YGA0                   , FwRev=12.01C02, SerialNo=     WD-WCAS80929678
 Config={ HardSect NotMFM HdSw&gt;15uSec SpinMotCtl Fixed DTR&gt;5Mbs FmtGapReq }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=50
 BuffType=unknown, BuffSize=16384kB, MaxMultSect=16, MultSect=?16?
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=976773168
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio3 pio4 
 DMA modes:  mdma0 mdma1 mdma2 
 UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 *udma6 
 AdvancedPM=no WriteCache=enabled
 Drive conforms to: Unspecified:  ATA/ATAPI-1,2,3,4,5,6,7

 * signifies the current active mode
</pre>
<br /><p>
Speed of individual drives in array:</p>
<pre>
dpavlin@brr:~$ sudo hdparm -tT /dev/sda /dev/sdb /dev/sdd

/dev/sda:
 Timing cached reads:   1982 MB in  2.00 seconds = 991.18 MB/sec
 Timing buffered disk reads:  232 MB in  3.03 seconds =  76.67 MB/sec

/dev/sdb:
 Timing cached reads:   2010 MB in  2.00 seconds = 1004.95 MB/sec
 Timing buffered disk reads:  228 MB in  3.01 seconds =  75.85 MB/sec

/dev/sdd:
 Timing cached reads:   2006 MB in  2.00 seconds = 1003.01 MB/sec
 Timing buffered disk reads:  230 MB in  3.01 seconds =  76.47 MB/sec
</pre>
<br /><p>
How are hey assembled into /dev/md0 RAID 5 array:</p>
<pre>
dpavlin@brr:~$ cat /proc/mdstat 
Personalities : [raid6] [raid5] [raid4] 
md0 : active raid5 sdd1[0] sda1[2] sdb1[1]
      976767872 blocks level 5, 64k chunk, algorithm 2 [3/3] [UUU]
</pre>
<br /><p>
Speed of array</p>
<pre>
dpavlin@brr:~$ sudo hdparm -tT /dev/md0

/dev/md0:
 Timing cached reads:   1986 MB in  2.00 seconds = 993.20 MB/sec
 Timing buffered disk reads:  434 MB in  3.01 seconds = 144.41 MB/sec
</pre>
<br /><p>
As expected RAID 5 speed is 75 + 75 + 0 (parity disk) ~ 144 MB/sec</p>
<h1 id="temperature">Temperature</h1>
<p>
Disks don't like it hot!</p>
<pre>
root@brr:~# hddtemp /dev/sda /dev/sdb /dev/sdd
/dev/sda: WDC WD5000AAKS-00YGA0: 33°C
/dev/sdb: WDC WD5000AAKS-00YGA0: 32°C
/dev/sdd: WDC WD5000AAKS-00YGA0: 32°C
</pre>
<br /><p>
On output above, middle disk is <tt>/dev/sda</tt> so it's 1° hotter than other two. I could mitigate this with additional fan on front of case, but it's making enough noise already, so I'll leave it as is.</p>
<h1 id="data_security">Data security</h1>
<h2 id="smart">Smart</h2>
<pre>
root@brr:~# smartctl --all /dev/sda | head -20
smartctl version 5.38 [i686-pc-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

=== START OF INFORMATION SECTION ===
Model Family:     Western Digital Caviar Second Generation Serial ATA family
Device Model:     WDC WD5000AAKS-00YGA0
Serial Number:    WD-WCAS80815866
Firmware Version: 12.01C02
User Capacity:    500,107,862,016 bytes
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   8
ATA Standard is:  Exact ATA specification draft version not indicated
Local Time is:    Sat Oct 11 00:27:01 2008 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
</pre>
<br /><p>
Before you start to beleve in SMART as solution to all disk health problems, read <a target="_blank" title="(external link)" href="http://labs.google.com/papers/disk_failures.pdf">Failure Trends in a Large Disk Drive Population<!-- wiki-renamed-hyperlink "Failure Trends in a Large Disk Drive Population"<http://labs.google.com/papers/disk_failures.pdf> --></a></p>
<p>
<img alt="http://media.arstechnica.com/staff.media/failurehd.png" src="http://media.arstechnica.com/staff.media/failurehd.png" border="0" /></p>
<p>
See also <a href="https://saturn.ffzg.hr/rot13/index.cgi?bad_block_howto_for_smartmontools" title="(210 months) My transcript for fixing error based on original documentation http smartmontools.sourceforge.net ba...">Bad block HOWTO for smartmontools</a> if you ever get smart errors and don't just want to throw out your disk.</p>
<h2 id="raid">RAID</h2>
<p>
Also interesting is <a target="_blank" title="(external link)" href="http://etbe.coker.com.au/2008/10/14/some-raid-issues/">Some RAID Issues<!-- wiki-renamed-hyperlink "Some RAID Issues"<http://etbe.coker.com.au/2008/10/14/some=-raid=-issues/> --></a></p>
<p>
Read also <a target="_blank" title="(external link)" href="http://blogs.zdnet.com/storage/?p=162">Why RAID 5 stops working in 2009<!-- wiki-renamed-hyperlink "Why RAID 5 stops working in 2009"<http://blogs.zdnet.com/storage/?p=162> --></a></p>
</div></div><!-- wiki: {include: [Disk performance]} --></span><br /><br /><h1 id="kvm">KVM</h1>
<span class="nlw_phrase"><div class="wiki-include-page">
<div class="wiki-include-title"><a href='https://saturn.ffzg.hr/rot13/index.cgi?kvm' >KVM</a> </div>
<div class="wiki-include-content">
<div class="nlw_phrase"><table class="wafl_container">
  <tr>
    <td>
      <div class="wafl_box">
        
          <div class="wafl_titlebox">
            <div class="wafl_title">
              
                Contents: [Dobrica Pavlinušić's random unstructured stuff]
              
            </div>
          </div>
          <div class="wafl_items">
            
              <div class="wiki">
<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#install">Dobrica Pavlinušić's random unstructured stuff (Install)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Install} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#migration">Dobrica Pavlinušić's random unstructured stuff (Migration)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Migration} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#prepare_shared_disk_image">Dobrica Pavlinušić's random unstructured stuff (Prepare shared disk image)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Prepare shared disk image} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#new_target">Dobrica Pavlinušić's random unstructured stuff (New target)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] New target} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#running_source">Dobrica Pavlinušić's random unstructured stuff (Running source)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Running source} --></span></li>
</ul></ul>
</div>

            
            
          </div>
        
      </div>
    </td>
  </tr>
</table>
<!-- wiki: {toc: }
--></div><br /><br /><p>
<a target="_blank" title="(external link)" href="http://kvm.qumranet.com/kvmwiki/FAQ">http://kvm.qumranet.com/kvmwiki/FAQ</a></p>
<h1 id="install">Install</h1>
<pre>
sudo apt-get install kvm
</pre>
<br /><h1 id="migration">Migration</h1>
<p>
<a target="_blank" title="(external link)" href="http://kvm.qumranet.com/kvmwiki/Migration">http://kvm.qumranet.com/kvmwiki/Migration</a></p>
<ul>
<li><span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/01-kvm-start.sh?action=attachments_download;page_name=kvm;id=20090302181146-0-32348">01-kvm-start.sh</a><!-- wiki: {file: 01-=kvm-=start.sh} --></span> - how to start kvm</li>
<li><span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/config?action=attachments_download;page_name=kvm;id=20090302181234-0-9282">config</a><!-- wiki: {file: config} --></span> - variables included in following scripts</li>
<li><span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/02-kvm-migration-incomming.sh?action=attachments_download;page_name=kvm;id=20090302181204-0-7425">02-kvm-migration-incomming.sh</a><!-- wiki: {file: 02-=kvm-=migration-=incomming.sh} --></span></li>
<li><span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/03-kvm-migration-running.sh?action=attachments_download;page_name=kvm;id=20090302181220-1-7425">03-kvm-migration-running.sh</a><!-- wiki: {file: 03-=kvm-=migration-=running.sh} --></span></li>
<li><span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/kvm-migration-demo.sh?action=attachments_download;page_name=kvm;id=20090302181244-1-9282">kvm-migration-demo.sh</a><!-- wiki: {file: kvm-=migration-=demo.sh} --></span> - wrap it all in demo</li>
</ul>
<h2 id="prepare_shared_disk_image">Prepare shared disk image</h2>
<p>
Usually, you will use <tt>nfs</tt> for this. Edit <tt>/etc/exports</tt> and add something like (if your local network is 192.168.1.x):</p>
<pre>
/rest           192.168.1.0/255.255.255.0(rw)
</pre>
<br /><p>
And start <tt>nfs</tt> server</p>
<pre>
dpavlin@llin:~$ sudo /etc/init.d/nfs-user-server start
</pre>
<br /><h2 id="new_target">New target</h2>
<p>
Mount shared storage and run qemu which will receive running machine</p>
<pre>
dpavlin@squeak:~$ mkdir mnt/rest
dpavlin@squeak:~$ sudo mount 192.168.1.13:/rest mnt/rest/
dpavlin@squeak:~$ ls -al mnt/rest/iso/gparted-live-0.3.9-4.iso 
-rw-r--r-- 1 dpavlin dpavlin 98347008 Oct  9 17:31 mnt/rest/iso/gparted-live-0.3.9-4.iso

dpavlin@squeak:~$ kvm -cdrom mnt/rest/iso/gparted-live-0.3.9-4.iso -incoming tcp://0:4444 -monitor stdio
</pre>
<br /><h2 id="running_source">Running source</h2>
<pre>
dpavlin@llin:~$ kvm -m 128 -cdrom /rest/iso/gparted-live-0.3.9-4.iso -monitor stdio -no-kvm
QEMU 0.9.1 monitor - type 'help' for more information
(qemu) migrate tcp://192.168.1.30:4444
</pre>
<br /><p>
We use <tt>-no-kvm</tt> to disable kvm because our target machine doesn't have vmx|svm support!</p>
</div></div><!-- wiki: {include: [KVM]} --></span><br /><br /><h1 id="qemu">QEMU</h1>
<span class="nlw_phrase"><div class="wiki-include-page">
<div class="wiki-include-title"><a href='https://saturn.ffzg.hr/rot13/index.cgi?qemu' >QEMU</a> </div>
<div class="wiki-include-content">
<div class="nlw_phrase"><table class="wafl_container">
  <tr>
    <td>
      <div class="wafl_box">
        
          <div class="wafl_titlebox">
            <div class="wafl_title">
              
                Contents: [Dobrica Pavlinušić's random unstructured stuff]
              
            </div>
          </div>
          <div class="wafl_items">
            
              <div class="wiki">
<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#installation">Dobrica Pavlinušić's random unstructured stuff (Installation)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Installation} --></span></li>
</ul>
</div>

            
            
          </div>
        
      </div>
    </td>
  </tr>
</table>
<!-- wiki: {toc: }
--></div><br /><br /><h1 id="installation">Installation</h1>
<pre>
sudo apt-get install qemu kqemu-source
</pre>
<br /><p>
<tt>kqemu</tt> module compilation on Debian:</p>
<pre>
sudo module-assistant a-i kqemu
</pre>
</div></div><!-- wiki: {include: [QEMU]} --></span><br /><br /><h1 id="virtualbox">VirtualBox</h1>
<span class="nlw_phrase"><div class="wiki-include-page">
<div class="wiki-include-title"><a href='https://saturn.ffzg.hr/rot13/index.cgi?virtualbox' >VirtualBox</a> </div>
<div class="wiki-include-content">
<p>
Seems to be best supported right now (package in Debian, optional drivers for Windows, starting unmodified VMWare machines -- after you guess right settings that is!)</p>
<h1 id="links">Links</h1>
<ul>
<li><a target="_blank" title="(external link)" href="http://www.virtualbox.org/ticket/995">Windows ACPI problem<!-- wiki-renamed-hyperlink "Windows ACPI problem"<http://www.virtualbox.org/ticket/995> --></a> - <tt>agp440.sys</tt> problem</li>
<li><a target="_blank" title="(external link)" href="http://www.virtualbox.org/wiki/Migrate_Windows">How to migrate existing Windows installations to VirtualBox<!-- wiki-renamed-hyperlink "How to migrate existing Windows installations to VirtualBox"<http://www.virtualbox.org/wiki/Migrate_Windows> --></a> - it's applicable to other emulators as well!</li>
<li><a target="_blank" title="(external link)" href="http://vmetc.com/2008/07/12/creating-and-configuring-headless-vms-in-virtualbox/">Creating and Configuring Headless VMs in VirtualBox<!-- wiki-renamed-hyperlink "Creating and Configuring Headless VMs in VirtualBox"<http://vmetc.com/2008/07/12/creating=-and=-configuring=-headless=-vms=-in=-virtualbox/> --></a></li>
<li><a target="_blank" title="(external link)" href="http://svn.rot13.org/index.cgi/vbox-tools">vbox-tools<!-- wiki-renamed-hyperlink "vbox=-tools"<http://svn.rot13.org/index.cgi/vbox=-tools> --></a> set of shell scripts to manage VirtualBox</li>
</ul>
<h1 id="debian_install">Debian Install</h1>
<p>
OSE version (no USB!) comes in Debian, compile <tt>vboxdrv</tt> with:</p>
<pre>
root@llin:~# module-assistant a-i virtualbox-ose
</pre>
<br /><h1 id="command_line_vm_creation">Command line VM creation</h1>
<pre>
VBoxManage createvm -name &quot;VirtWorkshop&quot; -register
VBoxManage modifyvm VirtWorkshop -memory 512Mb -acpi on -boot1 dvd -nic1 nat -dvd /rest/iso/ScummVM\ Launcher\ 2.iso 
VBoxManage createvdi -filename hda-8Gb.vdi -size 8Mb -register
VBoxManage modifyvm VirtWorkshop -hda hda-8Gb.vdi
VBoxHeadless -startvm VirtWorkshop
</pre>
<br /><h1 id="convert_vdi_disk_to_raw_image">Convert .vdi disk to raw image</h1>
<p>
<strong>sic</strong> this requires more than reading -h output:</p>
<pre>
dpavlin@x200:/virtual/win$ vboxmanage internalcommands converttoraw hda-winxp.vdi hda.img
VirtualBox Command Line Management Interface Version 2.1.4_OSE
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

Converting image &quot;hda-winxp.vdi&quot; with size 8589934592 bytes (8192MB) to raw...
</pre>
</div></div><!-- wiki: {include: [VirtualBox]} --></span><br /><br /><h1 id="openvz">OpenVZ</h1>
<span class="nlw_phrase"><div class="wiki-include-page">
<div class="wiki-include-title"><a href='https://saturn.ffzg.hr/rot13/index.cgi?openvz' >OpenVZ</a> </div>
<div class="wiki-include-content">
<p>
<a target="_blank" title="(external link)" href="http://www.openvz.org/">OpenVZ<!-- wiki-renamed-hyperlink "OpenVZ"<http://www.openvz.org/> --></a> is nice name-space virtualization, creating chroot jails on steroids, similar in spirit to Solaris zones. It ideal if you want to run single kernel and allocate resources using bean counters as opposed to hard-limits (20% of CPU as opposed to one core). Each slice is called <tt>VE</tt>.</p>
<div class="nlw_phrase"><table class="wafl_container">
  <tr>
    <td>
      <div class="wafl_box">
        
          <div class="wafl_titlebox">
            <div class="wafl_title">
              
                Contents: [Dobrica Pavlinušić's random unstructured stuff]
              
            </div>
          </div>
          <div class="wafl_items">
            
              <div class="wiki">
<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#disk_speed">Dobrica Pavlinušić's random unstructured stuff (Disk speed)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Disk speed} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#add_disk_space_to_ve">Dobrica Pavlinušić's random unstructured stuff (Add disk space to VE)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Add disk space to VE} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#ve_management">Dobrica Pavlinušić's random unstructured stuff (VE management)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] VE management} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#update_debian">Dobrica Pavlinušić's random unstructured stuff (Update Debian)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Update Debian} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#quick_reporting">Dobrica Pavlinušić's random unstructured stuff (Quick reporting)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Quick reporting} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#find_getty_processes">Dobrica Pavlinušić's random unstructured stuff (find getty processes)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] find getty processes} --></span></li>
</ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#devices_inside_ve">Dobrica Pavlinušić's random unstructured stuff (devices inside VE)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] devices inside VE} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#links">Dobrica Pavlinušić's random unstructured stuff (Links)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Links} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#vz_tools">Dobrica Pavlinušić's random unstructured stuff (vz-tools)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] vz-=tools} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#related_posts_on_my_blog">Dobrica Pavlinušić's random unstructured stuff (Related posts on my blog)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Related posts on my blog} --></span></li>
</ul>
</div>

            
            
          </div>
        
      </div>
    </td>
  </tr>
</table>
<!-- wiki: {toc: }
--></div><br /><br /><h1 id="disk_speed">Disk speed</h1>
<pre>
dpavlin@zut:~$ sudo hdparm -tT /dev/cciss/c1d0 /dev/sda

/dev/cciss/c1d0:
 Timing cached reads:   2184 MB in  2.00 seconds = 1092.39 MB/sec
 Timing buffered disk reads:  324 MB in  3.02 seconds = 107.40 MB/sec

/dev/sda:
 Timing cached reads:   2144 MB in  2.00 seconds = 1071.89 MB/sec
 Timing buffered disk reads:  136 MB in  3.02 seconds =  45.02 MB/sec
</pre>
<br /><p>
Insert joke about <a target="_blank" title="(external link)" href="http://images.google.com/images?hl=en&amp;q=enterprise+storage">enterprise storage<!-- wiki-renamed-hyperlink "enterprise storage"<http://images.google.com/images?hl=en&q=enterprise+storage> --></a></p>
<h1 id="add_disk_space_to_ve">Add disk space to VE</h1>
<p>
We are using normal Linux LVM with single logical volume for all VEs.</p>
<p>
First, resize logical volume:</p>
<pre>
root@koha-hw:~# vgextend -L +80G /dev/vg/vz
vgextend: invalid option -- L
  Error during parsing of command line.

root@koha-hw:~# lvextend -L +80G /dev/vg/vz
  Extending logical volume vz to 100.00 GB
  Logical volume vz successfully resized

root@koha-hw:~# resize2fs /dev/vg/vz 
resize2fs 1.40-WIP (14-Nov-2006)
Filesystem at /dev/vg/vz is mounted on /vz; on-line resizing required
old desc_blocks = 2, new_desc_blocks = 7
Performing an on-line resize of /dev/vg/vz to 26214400 (4k) blocks.
The filesystem on /dev/vg/vz is now 26214400 blocks long.

root@koha-hw:~# df -h /vz/
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg-vz      99G   20G   79G  21% /vz
</pre>
<br /><p>
Then, take a look how much space does VEs take:</p>
<pre>
root@koha-hw:~# vzlist -o veid,diskspace,diskspace.s,diskspace.h,diskinodes,diskinodes.s,diskspace.h
      VEID   DQBLOCKS DQBLOCKS.S DQBLOCKS.H   DQINODES DQINODES.S DQBLOCKS.H
    212052   11717220   15728640   20971520      61001     286527   20971520
    212226    6407804   10485760   12582912      69011     435472   12582912
</pre>
<br /><p>
alternativly, you can also execute df inside VEs:</p>
<pre>
root@koha-hw:~# vzlist -o veid -H | xargs -i sh -c &quot;echo --{}-- ; vzctl exec {} df -h&quot;
--212052--
Filesystem            Size  Used Avail Use% Mounted on
simfs                  15G   12G  3.9G  75% /
tmpfs                 2.0G     0  2.0G   0% /lib/init/rw
tmpfs                 2.0G     0  2.0G   0% /dev/shm
--212226--
Filesystem            Size  Used Avail Use% Mounted on
simfs                  10G  6.2G  3.9G  62% /
tmpfs                 2.0G     0  2.0G   0% /lib/init/rw
tmpfs                 2.0G     0  2.0G   0% /dev/shm
</pre>
<br /><p>
next, we will set diskpace on both VEs (becase we want them to share all available resources) to new logical volume size:</p>
<pre>
root@koha-hw:~# vzlist -o veid -H | xargs -i vzctl set {} --diskspace 100G:100G --save
Saved parameters for VE 212052
Saved parameters for VE 212226
</pre>
<br /><p>
This VEs are not in production, and one is development version of another. When we move to production, we want to enforce more strict limit on disk usage, to protect production machine from running out of disk space in case the development one goes wild.</p>
<h1 id="ve_management">VE management</h1>
<p>
We usually want to do some operations on bunch of VEs at once. This can be done using <tt>vzctl exec</tt> in one sweep like this:</p>
<h2 id="update_debian">Update Debian</h2>
<pre>
vzlist -H -o veid | xargs -i vzctl exec {} 'apt-get update &amp;&amp; apt-get -y upgrade' 2&gt;&amp;1 | tee ~/log
</pre>
<br /><h2 id="quick_reporting">Quick reporting</h2>
<p>
You can read more about <a target="_blank" title="(external link)" href="http://blog.rot13.org/2008/05/group_by_data_in_shell_pipes.html">groupby.pl and sum.pl on my blog<!-- wiki-renamed-hyperlink "groupby.pl and sum.pl on my blog"<http://blog.rot13.org/2008/05/group_by_data_in_shell_pipes.html> --></a>.</p>
<pre>
# install dependencies which are not part of standard lenny (sorry!)
cpanp i IPC::System::Simple

dpavlin@mjesec:~$ vzps -E axv --no-headers \
  | groupby.pl 'sum:($7+$8+$9*1024),1,count:1' --join 'sudo vzlist -H -o veid,hostname' --on 2 \
  | sort -rn | align | sum.pl -h
webgui.rot13.org  23      1026M OOOOOOOOOOOO                              1026M
0                385       855M OOOOOOOOOO------------                    1882M
saturn.ffzg.hr    32       544M OOOOOO-----------------------             2427M
eprints.ffzg.hr   18       351M OOOO-----------------------------         2778M
arh.rot13.org     20       224M OO----------------------------------      3003M
</pre>
<br /><h2 id="find_getty_processes">find getty processes</h2>
<pre>
root@mljac:~# ps ax | grep getty | cut -c-5 | xargs vzpid
Pid     VEID    Name
5668    0       getty
5670    0       getty
5672    0       getty
5673    0       getty
5674    0       getty
5675    0       getty
9503    207016  getty
9504    207013  getty
9505    207013  getty
9534    207016  getty
9535    207015  getty
9536    207013  getty
9537    207013  getty
9538    207015  getty
9539    207015  getty
9540    207015  getty
9541    207016  getty
9542    207015  getty
9543    207016  getty
9545    207013  getty
9546    207013  getty
9547    207015  getty
9548    207016  getty
</pre>
<br /><h1 id="devices_inside_ve">devices inside VE</h1>
<p>
For example, <a target="_blank" title="(external link)" href="http://wiki.openvz.org/FUSE">fuse<!-- wiki-renamed-hyperlink "fuse"<http://wiki.openvz.org/FUSE> --></a></p>
<pre>
dpavlin@brr:/dev$ vzctl set 100 --devices c:10:229:rw --save
</pre>
<br /><h1 id="links">Links</h1>
<ul>
<li><a target="_blank" title="(external link)" href="http://community.livejournal.com/openvz/27178.html">Recent Advances in the Linux Kernel resource management<!-- wiki-renamed-hyperlink "Recent Advances in the Linux Kernel resource management"<http://community.livejournal.com/openvz/27178.html> --></a></li>
</ul>
<h1 id="vz_tools">vz-tools</h1>
<span class="nlw_phrase"><div class="wiki-include-page">
<div class="wiki-include-title"><a href='https://saturn.ffzg.hr/rot13/index.cgi?vz_tools' >vz-tools</a> </div>
<div class="wiki-include-content">
<p>
Suite of perl scripts in spirit of <a target="_blank" title="(external link)" href="http://www.xen-tools.org/">xen-tools<!-- wiki-renamed-hyperlink "xen=-tools"<http://www.xen=-tools.org/> --></a> but for <a target="_blank" title="(external link)" href="http://openvz.org/">OpenVZ<!-- wiki-renamed-hyperlink "OpenVZ"<http://openvz.org/> --></a></p>
<div class="nlw_phrase"><table class="wafl_container">
  <tr>
    <td>
      <div class="wafl_box">
        
          <div class="wafl_titlebox">
            <div class="wafl_title">
              
                Contents: [Dobrica Pavlinušić's random unstructured stuff]
              
            </div>
          </div>
          <div class="wafl_items">
            
              <div class="wiki">
<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#installation">Dobrica Pavlinušić's random unstructured stuff (Installation)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Installation} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#install_perl_dependencies_from_debian_packages">Dobrica Pavlinušić's random unstructured stuff (Install perl dependencies from Debian packages)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Install perl dependencies from Debian packages} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#install_utilities_from_debian_packages">Dobrica Pavlinušić's random unstructured stuff (Install utilities from Debian packages)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Install utilities from Debian packages} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#checkout_source">Dobrica Pavlinušić's random unstructured stuff (Checkout source)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Checkout source} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#check_and_install_perl_modules_from_cpan">Dobrica Pavlinušić's random unstructured stuff (Check and install perl modules from CPAN)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Check and install perl modules from CPAN} --></span></li>
</ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#usage">Dobrica Pavlinušić's random unstructured stuff (Usage)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Usage} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#vz_create_pl">Dobrica Pavlinušić's random unstructured stuff (vz-create.pl)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] vz-=create.pl} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#vz_optimize_pl">Dobrica Pavlinušić's random unstructured stuff (vz-optimize.pl)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] vz-=optimize.pl} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#vz_clone_pl">Dobrica Pavlinušić's random unstructured stuff (vz-clone.pl)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] vz-=clone.pl} --></span></li>
</ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#source">Dobrica Pavlinušić's random unstructured stuff (Source)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Source} --></span></li>
</ul>
</div>

            
            
          </div>
        
      </div>
    </td>
  </tr>
</table>
<!-- wiki: {toc: }
--></div><br /><br /><h1 id="installation">Installation</h1>
<h2 id="install_perl_dependencies_from_debian_packages">Install perl dependencies from Debian packages</h2>
<p>
This step is optional. If you don't want to use perl modules from packages provided by your distribution, skip this step, and modules will be automatically installed in next one.</p>
<pre>
sudo apt-get install libio-prompt-perl libregexp-common-perl libdata-dump-perl
</pre>
<br /><h2 id="install_utilities_from_debian_packages">Install utilities from Debian packages</h2>
<pre>
sudo apt-get install host
</pre>
<br /><h2 id="checkout_source">Checkout source</h2>
<pre>
svn co svn://svn.rot13.org/vz-tools/trunk vz-tools
</pre>
<br /><h2 id="check_and_install_perl_modules_from_cpan">Check and install perl modules from CPAN</h2>
<pre>
cd vz-tools
perl Makefile.PL
make
</pre>
<br /><p>
Please note that there is no need to run <tt>make install</tt></p>
<p>
Tools are runnable from current directory. This will probably change in later versions.</p>
<h1 id="usage">Usage</h1>
<p>
This is quick hand-on overview of commands to get you started.</p>
<p>
All commands must be started with <tt>root</tt> priviledges</p>
<h2 id="vz_create_pl">vz-create.pl</h2>
<p>
This will perform following steps:</p>
<ul>
<li>Create new virtual machine bootstraped using <tt>debootstrap</tt></li>
<li>Change root password</li>
<li>Create single user</li>
<li>Make small custimization like installing <tt>vim</tt> and <a target="_blank" title="(external link)" href="http://www.rot13.org/~dpavlin/apt-iselect.html">apt-iselect<!-- wiki-renamed-hyperlink "apt=-iselect"<http://www.rot13.org/~dpavlin/apt=-iselect.html> --></a></li>
</ul>
<p>
All commands will be echoed on screen, <strong>even passwords</strong>. However, if you want to learn steps in creating OpenVZ VE, this is very helpful.</p>
<p>
To run interactive session which asks questions use:</p>
<pre>
./vz-create.pl
</pre>
<br /><p>
Other alternative is to just enter hostname (defined in <tt>/etc/hosts</tt> for example)</p>
<pre>
./vz-create.pl my-new-ve.exmple.com
</pre>
<br /><p>
or by specifing IP adress</p>
<pre>
./vz-create.pl 192.168.42.42
</pre>
<br /><h2 id="vz_optimize_pl">vz-optimize.pl</h2>
<h2 id="vz_clone_pl">vz-clone.pl</h2>
<pre>
root@black:~/vz-tools# time ./vz-clone.pl create 1001
Clone VE 1001 -&gt; 101001
found LV /dev/vg/vz for /vz
vzquota : (warning) Quota is running, so data reported from quota file may not reflect current values
quota for 1001 | 10485760 &lt; 20971520 | usage: 7826792
using existing /dev/vg/vz-clone-101001
Mounting /dev/vg/vz-clone-101001 to /tmp/vz-clone-101001
rsync /vz/private/1001 -&gt; /tmp/vz-clone-101001/private
101001 new IP number: 10.42.42.42
101001 new hostname: clone-42.example.com

Please review config file: /etc/vz/conf/101001.conf
Add NAT for new VE with: iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
Start clone of 1001 with: vzctl start 101001

real    1m57.347s
user    0m2.252s
sys     0m8.591s
</pre>
<br /><h1 id="source">Source</h1>
<div class="nlw_phrase"><div class="fetchrss_box">
  <div class="fetchrss_titlebox">
    
 <div class="fetchrss_title">
     fetchrss: http://svn.rot13.org/index.cgi/vz-tools/rss/trunk
 </div>

  </div>
  
<ul class="fetchrss_item">
  <li class="fetchrss_item">
    There was an error: 404 Not Found

  </li>
</ul>

</div>
















<!-- wiki: {fetchrss: http://svn.rot13.org/index.cgi/vz-=tools/rss/trunk full}
--></div><br /></div></div><!-- wiki: {include: [vz-=tools]} --></span><br /><br /><h1 id="related_posts_on_my_blog">Related posts on my blog</h1>
<div class="nlw_phrase"><div class="fetchrss_box">
  <div class="fetchrss_titlebox">
    
  
  
 <div class="fetchrss_title">
   <a href="https://blog.rot13.org/mt/mt-search.cgi?IncludeBlogs=1&search=openvz">Search Results for openvz</a>
 </div>


  </div>
  
 <ul class="fetchrss_items">
  
  
    
  <li class="fetchrss_item">
    <a href="https://blog.rot13.org/2010/03/bak-git-manage-cloud-configuration-with-ease.html">bak-git: easy cloud configuration management</a>
    
      <p class="fetchrss_description">
        
         I wrote initial version of bak-git more than a month ago, and started using it to manage my share of Internet cloud. Currently, it's 16 hosts, some of them real hardware, some OpenVZ or LXC containers. Since then, I...
        
      </p>
    
  </li>

  
    
  <li class="fetchrss_item">
    <a href="https://blog.rot13.org/2010/03/lxc-watchdog-missing-bits-for-openvz---linux-containers-migration.html">lxc-watchdog for OpenVZ - Linux Containers migration</a>
    
      <p class="fetchrss_description">
        
         I have been playing with Linux containers for a while, and finally I decided to take a plunge and migrate one of my servers from OpenVZ to lxc. It worked quite well for testing until I noticed lack of...
        
      </p>
    
  </li>

  
    
  <li class="fetchrss_item">
    <a href="https://blog.rot13.org/2010/02/openvz-vlan-ethernet-bridge-and-ssh-tunneling.html">OpenVZ, VLANs, ethernet bridge and ssh tunneling</a>
    
      <p class="fetchrss_description">
        
         I know that title is mouthful. But, I occasionally use this blog as place to dump interesting configuration settings and it helps me remember configuration which helps me to remember it and might be useful to lone surfers who...
        
      </p>
    
  </li>

  
    
  <li class="fetchrss_item">
    <a href="https://blog.rot13.org/2009/07/apache2-mpm-worker-considered-harmful-to-memory-usage.html">apache2-mpm-worker considered harmful to memory usage</a>
    
      <p class="fetchrss_description">
        
         Last few weeks I have been struggling with memory usage on one of machines which run several OpenVZ containers. It was eating whole memory in just few days: I was always fond of graphing system counters, and since reboots...
        
      </p>
    
  </li>

  
    
  <li class="fetchrss_item">
    <a href="https://blog.rot13.org/2009/07/sharing-mysql-between-openvz-containers.html">Sharing MySQL between OpenVZ containers</a>
    
      <p class="fetchrss_description">
        
         It seems that I wasn't the first one to have idea of sharing MySQL installation between OpenVZ containers. However, simple hardlink didn't work for me: root@koha-hw:~# ln /vz/root/212052/var/run/mysqld/mysqld.sock \ /vz/root/212056/var/run/mysqld/ ln: creating hard link `/vz/root/212056/var/run/mysqld/mysqld.sock' to `/vz/root/212052/var/run/mysqld/mysqld.sock': Invalid cross-device...
        
      </p>
    
  </li>

  
    
  <li class="fetchrss_item">
    <a href="https://blog.rot13.org/2009/06/storage-appliance-with-containers-using-linux-and-zfs.html">Storage appliance with containers using Linux and ZFS</a>
    
      <p class="fetchrss_description">
        
         I'm working on Linux version of Sun storage machines, using commodity hardware, OpenVZ and Fuse-ZFS. I'm do have working system in my Sysadmin Cookbook so I might as well write a little bit of documentation about it. My basic...
        
      </p>
    
  </li>

  
    
  <li class="fetchrss_item">
    <a href="https://blog.rot13.org/2009/05/enterprise-storage-in-recession-what-about-linux-and-zfs.html">Enterprise storage in recession? What about Linux and ZFS?</a>
    
      <p class="fetchrss_description">
        
        My point of view First, let me explain my position. I was working for quite a few years in big corporation, and followed EMC storage systems (one from end of of last century and improvement that Clarion did on our...
        
      </p>
    
  </li>

  
    
  <li class="fetchrss_item">
    <a href="https://blog.rot13.org/2009/02/recording-screencasts-using-ttyrec-and-ffmpeg.html">Recording screencasts using ttyrec and ffmpeg</a>
    
      <p class="fetchrss_description">
        
         I'm preparing walk-through screencasts for workshop about virtualization so I needed easy way to produce console screencasts. First, I found TTYShare which displays ttyrec files using flash, but I really wanted to copy/paste parts of commands and disliked flash...
        
      </p>
    
  </li>

  
    
  <li class="fetchrss_item">
    <a href="https://blog.rot13.org/2009/01/moving-data-in-a-hurry-copy-disk-images.html">Moving data in a hurry? Copy disk images!</a>
    
      <p class="fetchrss_description">
        
         I have written about data migration from disk to disk before, but moving data off the laptop is really painful (at least for me). This time, I didn't have enough time to move files with filesystem copy since it...
        
      </p>
    
  </li>

  
    
  <li class="fetchrss_item">
    <a href="https://blog.rot13.org/2008/05/group-by-data-in-shell-pipes.html">Group by data in shell pipes</a>
    
      <p class="fetchrss_description">
        
        My mind is just too accustomed to RDBMS engines to accept that I can't have GROUP BY in my shell pipes. So I wrote one groupby.pl. Aside from fact that it somewhat looks like perl golfing (which I'm somewhat proud...
        
      </p>
    
  </li>

  
 </ul>

</div>
















<!-- wiki: {fetchrss: http://blog.rot13.org/mt/mt-=search.cgi?search==openvz&Template==feed&IncludeBlogs==1 full}
--></div><br /></div></div><!-- wiki: {include: [OpenVZ]} --></span><br /><br /><h1 id="vmware">VMWare</h1>
<h2 id="convert_image_to_monolithic_growable_disk">Convert image to monolithic growable disk</h2>
<p>
This format is supported by other emulators, so it's a best choice.</p>
<pre>
dpavlin@llin:/rest/vmware/winxp$ vmware-vdiskmanager -r Windows\ XP\ Professional.vmdk -t 0 /mnt/usb/vmware/win-xp.vmdk 
Using log file /tmp/vmware-dpavlin/vdiskmanager.log
Creating a monolithic growable disk '/mnt/usb/vmware/win-xp.vmdk'
  Convert: 57% done.
</pre>
<br /><h2 id="vmware_vdiskmanager_error_messages">vmware-vdiskmanager error messages</h2>
<p>
Have in mind that <tt>vmware-vdiskmanger</tt> doesn't have a really helpful error messages:</p>
<pre>
dpavlin@tab:/mnt/brr/virtual/winxp$ vmware-vdiskmanager -r Windows\ XP\ Professional.vmdk -t 0 /virtual/win-xp.vmdk
Using log file /tmp/vmware-dpavlin/vdiskmanager.log
Creating a monolithic growable disk '/virtual/win-xp.vmdk'
Failed to convert disk: The destination file system does not support large files (13).
</pre>
<br /><p>
is really <strong>permission denied</strong> !</p>
<h2 id="resize_disk_image">Resize disk image</h2>
<pre>
dpavlin@llin:/mnt/usb/vmware$ qemu-img info win-xp.vmdk
(VMDK) image open: flags=0x2 filename=win-xp.vmdk
image: win-xp.vmdk
file format: vmdk
virtual size: 3.0G (3221225472 bytes)
disk size: 3.0G
</pre>
<br /><p>
There is a way to extend image using only <tt>qemu-img</tt>, but that involves converting image to raw and appending zeros at end to produce larger image. However, we will do that using VMWare's <tt>vmware-vdiskmanager</tt></p>
<pre>
dpavlin@llin:/mnt/usb/vmware$ vmware-vdiskmanager -x 6Gb win-xp.vmdk
Using log file /tmp/vmware-dpavlin/vdiskmanager.log
  Grow: 100% done.
The old geometry C/H/S of the disk is: 6241/16/63
The new geometry C/H/S of the disk is: 12483/16/63
Disk expansion completed successfully.

WARNING: If the virtual disk is partitioned, you must use a third-party
         utility in the virtual machine to expand the size of the
         partitions. For more information, see:
         http://www.vmware.com/support/kb/enduser/std_adp.php?p_faqid=1647
</pre>
<br /><p>
This will make disk unbootable, so we will have to resize partition. Download <a target="_blank" title="(external link)" href="http://gparted.sourceforge.net/">GParted<!-- wiki-renamed-hyperlink "GParted"<http://gparted.sourceforge.net/> --></a> live CD and resize partition using it...</p>
<pre>
kvm -m 512 -hda win-xp.vmdk -no-acpi -std-vga -cdrom /rest/iso/gparted-live-0.3.9-4.iso -boot d
</pre>
<br /><h2 id="convert_vmdk_to_qcow">Convert vmdk to qcow</h2>
<pre>
dpavlin@llin:/mnt/usb/vmware$ qemu-img convert -O qcow win-xp.vmdk win-xp.qcow
(VMDK) image open: flags=0x2 filename=win-xp.vmdk
dpavlin@llin:/mnt/usb/vmware$ ls -al win-xp.*
-rw-r--r-- 1 dpavlin dpavlin 3190906880 Oct  9 17:41 win-xp.qcow
-rw------- 1 dpavlin dpavlin 3208577024 Oct  9 17:35 win-xp.vmdk
</pre>
<br /><h1 id="xen">Xen</h1>
<h2 id="disk_speed">disk speed</h2>
<p>
this is domU</p>
<pre>
root@vega:~# uname -a
Linux vega 2.6.18-6-xen-amd64 #1 SMP Mon Jun 16 23:42:47 UTC 2008 x86_64 GNU/Linux
root@vega:~# hdparm -tT /dev/hda1

/dev/hda1:
 Timing cached reads:   5488 MB in  2.00 seconds = 2750.74 MB/sec
 Timing buffered disk reads:  318 MB in  3.00 seconds = 105.98 MB/sec
</pre>
<br /><h2 id="resize_domu_image">resize domU image</h2>
<ul>
<li><a target="_blank" title="(external link)" href="http://www.meta.net.nz/~daniel/blog/2007/07/27/resizing-domu-partitions-with-xen-enterprise-32/">Resizing domU partitions with Xen Enterprise 3.2<!-- wiki-renamed-hyperlink "Resizing domU partitions with Xen Enterprise 3.2"<http://www.meta.net.nz/~daniel/blog/2007/07/27/resizing=-domu=-partitions=-with=-xen=-enterprise=-32/> --></a>, good stuff, even if you are not interested in Xen!</li>
</ul>
<h1 id="proxmox">proxmox</h1>
<p>
<a href="https://saturn.ffzg.hr/rot13/index.cgi?proxmox" title="(112 months) This page will document my expirience with Proxmox http pve.proxmox.com wiki Main_Page which you mig...">proxmox</a> is bare metal Debian 64-bit installation supporting containers using <a href="https://saturn.ffzg.hr/rot13/index.cgi?openvz" title="(209 months)  OpenVZ http www.openvz.org is nice name-space virtualization, creating chroot jails on steroids, si...">OpenVZ</a> and full system emulation using <a href="https://saturn.ffzg.hr/rot13/index.cgi?kvm" title="(209 months)  toc http kvm.qumranet.com kvmwiki FAQ Install .pre sudo apt-get install kvm .pre Migration http kvm...">KVM</a>.</p>
<h1 id="linux_containers">Linux Containers</h1>
<p>
<a href="https://saturn.ffzg.hr/rot13/index.cgi?openvz" title="(209 months)  OpenVZ http www.openvz.org is nice name-space virtualization, creating chroot jails on steroids, si...">OpenVZ</a> isn't only linux container solution:</p>
<ul>
<li><a target="_blank" title="(external link)" href="http://www.ibm.com/developerworks/linux/library/l-lxc-security/index.html">LSM, SELinux and Smack<!-- wiki-renamed-hyperlink "LSM, SELinux and Smack"<http://www.ibm.com/developerworks/linux/library/l=-lxc=-security/index.html> --></a></li>
<li><a target="_blank" title="(external link)" href="http://www.ibm.com/developerworks/linux/library/l-lxc-containers/?ca=dgr-lnxw04Linux-Containers&amp;S_TACT=105AGX59&amp;S_CMP=grsitelnxw04">LXC: Linux container tools<!-- wiki-renamed-hyperlink "LXC: Linux container tools"<http://www.ibm.com/developerworks/linux/library/l=-lxc=-containers/?ca=dgr=-lnxw04Linux=-Containers&S_TACT=105AGX59&S_CMP=grsitelnxw04> --></a></li>
</ul>
<h1 id="guest_os">Guest OS</h1>
<h2 id="windows">Windows</h2>
<ul>
<li><tt>agp440.sys</tt> <a target="_blank" title="(external link)" href="http://support.microsoft.com/kb/324764">killed my VMWare XP installation!<!-- wiki-renamed-hyperlink "killed my VMWare XP installation!"<http://support.microsoft.com/kb/324764> --></a></li>
</ul>
<ul>
<li><tt>intelppm.dll</tt> blue screen of death -- <a target="_blank" title="(external link)" href="http://kvm.qumranet.com/kvmwiki/Windows_ACPI_Workaround">http://kvm.qumranet.com/kvmwiki/Windows_ACPI_Workaround</a></li>
</ul>
<ul>
<li><a target="_blank" title="(external link)" href="http://www.geocities.com/bearwindows/vbemp.htm">Install VBEMP x86 Project Universal VESA/VBE Video Display Driver<!-- wiki-renamed-hyperlink "Install VBEMP x86 Project Universal VESA/VBE Video Display Driver"<http://www.geocities.com/bearwindows/vbemp.htm> --></a> to get different resolutions on virtual machine</li>
</ul>
<p>
Remove them:</p>
<pre>
cd c:\windows\system32\drivers
del agp440.sys
del intelppm.dll
</pre>
<br /><p>
Startup script:</p>
<pre>
# 3M RFID 810
usbdev=0403:6001

sudo chown -R $USER /proc/bus/usb/*

kvm -m 512 -hda win-xp.vmdk -no-acpi -std-vga -monitor stdio -usb -usbdevice host:$usbdev
</pre>
<br /><p>
USB sniffing:</p>
<pre>
info usbhost
</pre>
<br /><h2 id="solaris">Solaris</h2>
<ul>
<li><a target="_blank" title="(external link)" href="http://opensolaris.org/os/project/qemu/QEMUGuests/guest/">http://opensolaris.org/os/project/qemu/QEMUGuests/guest/</a></li>
</ul>
<p>
It will not boot pass &quot;Loading Nexenta...&quot; stage without <tt>kvm</tt> module loaded.</p>
<pre>
# to install from iso image
kvm -m 512 -hda solaris.vmdk -cdrom ../iso/nexenta-core-platform_1.0.1-b85-test4_x86.iso -boot d -net nic,model=rtl8139 -net user

# run after installation
kvm -m 512 -hda solaris.vmdk -net nic,model=rtl8139 -net user
</pre>
<br /><h2 id="darwin">Darwin</h2>
<ul>
<li><a target="_blank" title="(external link)" href="http://www.puredarwin.org/">http://www.puredarwin.org/</a></li>
</ul>
<h2 id="plan_9">Plan 9</h2>
<ul>
<li><a target="_blank" title="(external link)" href="http://wiki.glugcen.dc.uba.ar/Empezando_con_Plan9">http://wiki.glugcen.dc.uba.ar/Empezando_con_Plan9</a></li>
<li><a target="_blank" title="(external link)" href="http://www.oszoo.org/wiki/index.php/Plan9_070107.zip">http://www.oszoo.org/wiki/index.php/Plan9_070107.zip</a></li>
</ul>
<h1 id="links">Links</h1>
<p>
Is Linux going wrong way with <tt>btrfs</tt> as solution to all storage problems? <a target="_blank" title="(external link)" href="http://lwn.net/Articles/305740/">Linux and object storage devices<!-- wiki-renamed-hyperlink "Linux and object storage devices"<http://lwn.net/Articles/305740/> --></a></p>
</div>
<hr/><div>Attachments: vmware-vdiskmanager</div>]]></description>
<author>Dobrica Pavlinu&#x161;i&#x107;</author>
<category></category>
<guid isPermaLink="true">https://saturn.ffzg.hr/rot13/index.cgi?virtualization_workshop</guid>
<pubDate>Thu, 12 Feb 2009 17:43:01 -0000</pubDate>
</item>
<item>
<title><![CDATA[Hauppauge Nova-T Stick]]></title>
<link>https://saturn.ffzg.hr/rot13/index.cgi?hauppauge_nova_t_stick</link>
<description><![CDATA[<div>Creator: Dobrica Pavlinušić</div><hr/><div>Tags: DVB, projects, TV</div><hr/><div class="wiki">
<span class="nlw_phrase"><img alt="n516950085_2337724_7335.jpg" src="https://saturn.ffzg.hr/rot13/index.cgi/n516950085_2337724_7335.jpg?action=attachments_download;page_name=hauppauge_nova_t_stick;id=20090103172727-0-16120" /><!-- wiki: {image: n516950085_2337724_7335.jpg} --></span><br /><br /><blockquote>
Second try at buying USB TV card that <strong>works</strong> under Linux</blockquote>
<br /><p>
And sure, 22 EUR later (chepest card in the shop which <strong>included</strong> remote) I had working DVB-T under Linux</p>
<div class="nlw_phrase"><table class="wafl_container">
  <tr>
    <td>
      <div class="wafl_box">
        
          <div class="wafl_titlebox">
            <div class="wafl_title">
              
                Contents: [Dobrica Pavlinušić's random unstructured stuff]
              
            </div>
          </div>
          <div class="wafl_items">
            
              <div class="wiki">
<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#info">Dobrica Pavlinušić's random unstructured stuff (Info)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Info} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#firmware">Dobrica Pavlinušić's random unstructured stuff (Firmware)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Firmware} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#info">Dobrica Pavlinušić's random unstructured stuff (info)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] info} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#zagreb_frequencies">Dobrica Pavlinušić's random unstructured stuff (Zagreb frequencies)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Zagreb frequencies} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#eeepc_as_tv_for_my_mother">Dobrica Pavlinušić's random unstructured stuff (EeePC as TV for my mother)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] EeePC as TV for my mother} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#dmesg">Dobrica Pavlinušić's random unstructured stuff (dmesg)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] dmesg} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#scan">Dobrica Pavlinušić's random unstructured stuff (scan)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] scan} --></span></li>
</ul>
</div>

            
            
          </div>
        
      </div>
    </td>
  </tr>
</table>
<!-- wiki: {toc: }
--></div><br /><br /><h1 id="info">Info</h1>
<p>
<a target="_blank" title="(external link)" href="http://linuxtv.org/wiki/index.php/Hauppauge_WinTV-NOVA-T-Stick">http://linuxtv.org/wiki/index.php/Hauppauge_WinTV-NOVA-T-Stick</a></p>
<h1 id="firmware">Firmware</h1>
<pre>
cd /lib/firmware/
wget http://www.wi-bw.tfh-wildau.de/~pboettch/home/linux-dvb-firmware/dvb-usb-dib0700-1.10.fw
</pre>
<br /><h1 id="info">info</h1>
<pre>
dpavlin@t61p:~$ lsusb | grep Nova
Bus 002 Device 003: ID 2040:7070 Hauppauge Nova-T Stick 3
</pre>
<br /><h1 id="zagreb_frequencies">Zagreb frequencies</h1>
<pre>
T 754000000 8MHz 2/3 NONE AUTO 8k 1/8 NONE    # CH27:
T 642000000 8MHz 2/3 NONE AUTO 8k 1/8 NONE    # CH27:
T 690000000 8MHz 2/3 NONE AUTO 8k 1/8 NONE    # CH27:
</pre>
<br /><p>
Feed that file to <tt>scan</tt> from <tt>dvb-apps</tt> to get output for mplayer's <tt>channels.conf</tt></p>
<h1 id="eeepc_as_tv_for_my_mother">EeePC as TV for my mother</h1>
<div class="nlw_phrase"><div class="fetchrss_box">
  <div class="fetchrss_titlebox">
    
 <div class="fetchrss_title">
     fetchrss: http://svn.rot13.org/index.cgi/mplayer-eee-tv/rss
 </div>

  </div>
  
<ul class="fetchrss_item">
  <li class="fetchrss_item">
    There was an error: 404 Not Found

  </li>
</ul>

</div>
















<!-- wiki: {fetchrss: http://svn.rot13.org/index.cgi/mplayer-=eee-=tv/rss full}
--></div><br /><br /><h1 id="dmesg">dmesg</h1>
<pre>
[352538.540055] usb 3-1.1: new high-speed USB device number 32 using ehci-pci
[352538.648944] usb 3-1.1: New USB device found, idVendor=2040, idProduct=7070, bcdDevice= 1.00
[352538.648951] usb 3-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[352538.648956] usb 3-1.1: Product: Nova-T Stick
[352538.648960] usb 3-1.1: Manufacturer: Hauppauge
[352538.648964] usb 3-1.1: SerialNumber: 4032258708
[352538.682065] dvb-usb: found a 'Hauppauge Nova-T Stick' in cold state, will try to load a firmware
[352538.682869] usb 3-1.1: firmware: direct-loading firmware dvb-usb-dib0700-1.20.fw
[352538.885559] dib0700: firmware started successfully.
[352539.420241] dvb-usb: found a 'Hauppauge Nova-T Stick' in warm state.
[352539.420476] dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
[352539.420571] dvbdev: DVB: registering new adapter (Hauppauge Nova-T Stick)
[352539.664695] usb 3-1.1: DVB: registering adapter 0 frontend 0 (DiBcom 7000PC)...
[352539.903507] dib0070: DiB0070: successfully identified
[352539.936061] Registered IR keymap rc-dib0700-rc5
[352539.936410] rc rc0: Hauppauge Nova-T Stick as /devices/pci0000:00/0000:00:1d.0/usb3/3-1/3-1.1/rc/rc0
[352539.936486] input: Hauppauge Nova-T Stick as /devices/pci0000:00/0000:00:1d.0/usb3/3-1/3-1.1/rc/rc0/input13
[352539.936674] rc rc0: lirc_dev: driver dib0700 registered at minor = 0, scancode receiver, no transmitter
[352539.936678] dvb-usb: schedule remote query interval to 50 msecs.
[352539.936682] dvb-usb: Hauppauge Nova-T Stick successfully initialized and connected.
[352539.936876] usbcore: registered new interface driver dvb_usb_dib0700


</pre>
<br /><h1 id="scan">scan</h1>
<ul>
<li><a target="_blank" title="(external link)" href="https://www.linuxtv.org/wiki/index.php/Scan">https://www.linuxtv.org/wiki/index.php/Scan</a></li>
<li><a target="_blank" title="(external link)" href="https://www.linuxtv.org/wiki/index.php/Testing_your_DVB_device">https://www.linuxtv.org/wiki/index.php/Testing_your_DVB_device</a></li>
</ul>
<pre>

dpavlin@klin:~$ mkdir ~/.{a,c,s,t}zap


dpavlin@klin:~$ scan -v /usr/share/dvb/dvb-legacy/dvb-t/hr-All &gt; .tzap/channels.conf

dumping lists (4 services)
[0015]:690000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_3_4:FEC_AUTO:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:2011:2012:21
[0016]:690000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_3_4:FEC_AUTO:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:2021:2022:22
[0017]:690000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_3_4:FEC_AUTO:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:2031:2032:23
[0018]:690000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_3_4:FEC_AUTO:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:2041:2042:24

dpavlin@klin:~$ /usr/bin/tzap -r -c ~/.tzap/channels.conf &quot;[0018]&quot;
using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
reading channels from file '/home/dpavlin/.tzap/channels.conf'
Version: 5.11    FE_CAN { DVB-T }
tuning to 690000000 Hz
video pid 0x07f9, audio pid 0x07fa
status 0f | signal 9dca | snr 00ad | ber 001fffff | unc 00000000 | 
status 1f | signal 9cd0 | snr 00bc | ber 000060a0 | unc 00000000 | FE_HAS_LOCK

dpavlin@klin:~$ mplayer /dev/dvb/adapter0/dvr0

</pre>
</div>
<hr/><div>Attachments: n516950085_2337724_7335.jpg</div>]]></description>
<author>Dobrica Pavlinu&#x161;i&#x107;</author>
<category></category>
<guid isPermaLink="true">https://saturn.ffzg.hr/rot13/index.cgi?hauppauge_nova_t_stick</guid>
<pubDate>Fri, 14 Dec 2018 13:26:45 -0000</pubDate>
</item>
</channel>
</rss>