<?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: Proxmox]]></title>
<link>https://saturn.ffzg.hr/rot13/index.cgi?proxmox</link>
<description></description>
<pubDate>Mon, 27 Feb 2017 12:10:42 -0000</pubDate>
<webMaster>root@saturn.ffzg.hr</webMaster>
<generator>Socialtext Workspace v2.19.0.2</generator>

<item>
<title><![CDATA[Proxmox]]></title>
<link>https://saturn.ffzg.hr/rot13/index.cgi?proxmox</link>
<description><![CDATA[<div>Creator: Dobrica Pavlinušić</div><hr/><div>Tags: KVM, OpenVZ, virtualization</div><hr/><div class="wiki">
<p>
This page will document my expirience with <a target="_blank" title="(external link)" href="http://pve.proxmox.com/wiki/Main_Page">Proxmox<!-- wiki-renamed-hyperlink "Proxmox"<http://pve.proxmox.com/wiki/Main_Page> --></a> which you might think as web-based version of <a href="https://saturn.ffzg.hr/rot13/index.cgi?vz_tools" title="(227 months) Suite of perl scripts in spirit of xen-tools http www.xen-tools.org but for OpenVZ http openvz.org t...">vz-tools</a>.</p>
<h1 id="qucik_tips">Qucik tips</h1>
<h2 id="console_using_vncviewer">Console using vncviewer</h2>
<pre>
proxmox1:~# grep vnc /etc/inetd.conf
5901 stream tcp nowait root /usr/sbin/qm qm vncproxy 101 password-for-this-vnc-connection
</pre>
<br /><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#qucik_tips">Dobrica Pavlinušić's random unstructured stuff (Qucik tips)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Qucik tips} --></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#console_using_vncviewer">Dobrica Pavlinušić's random unstructured stuff (Console using vncviewer)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Console using vncviewer} --></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#lvm">Dobrica Pavlinušić's random unstructured stuff (lvm)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] lvm} --></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#create_file_systems">Dobrica Pavlinušić's random unstructured stuff (create file systems)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] create file systems} --></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_fs">Dobrica Pavlinušić's random unstructured stuff (mount fs)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] mount fs} --></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#unpack_installation">Dobrica Pavlinušić's random unstructured stuff (unpack installation)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] unpack installation} --></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#grub">Dobrica Pavlinušić's random unstructured stuff (grub)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] grub} --></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#preference_df">Dobrica Pavlinušić's random unstructured stuff (preference df)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] preference df} --></span></li>
</ul>
</div>

            
            
          </div>
        
      </div>
    </td>
  </tr>
</table>
<!-- wiki: {toc: }
--></div><br /><br /><p>
This is somewhat interesting story, because I ended up migrating PVE installation on internal laptop disk to enable dual boot. First, I installed PVE on external USB drive (which wiped out mbr on internal disk, sic!) and than archived all files from it to move it to internal disk.</p>
<p>
Installed system had following partitions:</p>
<pre>
/dev/mapper/pve-root on /mnt/pve type ext3 (rw)
/dev/sdb1 on /mnt/pve/boot type ext3 (rw)
/dev/mapper/pve-data on /mnt/pve/var/lib/vz type ext3 (rw)
</pre>
<br /><p>
So I re-created volume grup <tt>pve</tt> and logical volumes.</p>
<p>
I have following partitions on my laptop:</p>
<pre>
root@tab:~# fdisk -l /dev/hda

Disk /dev/hda: 100.0 GB, 100030242816 bytes
255 heads, 63 sectors/track, 12161 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x3b7f0ef5

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        1305    10482381   83  Linux
/dev/hda2            1306        1436     1052257+  83  Linux
/dev/hda3            1437        1567     1052257+  82  Linux swap / Solaris
/dev/hda4            1568       12161    85096305    5  Extended
/dev/hda5            1568        4178    20972826   8e  Linux LVM
/dev/hda6            4179        6789    20972826   83  Linux
/dev/hda7            6790        9400    20972826   83  Linux
/dev/hda8            9401       12161    22177701   83  Linux
</pre>
<br /><p>
and I wanted to use <tt>/dev/hda2</tt> as boot and <tt>/dev/hda5</tt> for lvm</p>
<h1 id="lvm">lvm</h1>
<pre>
root@tab:~# pvcreate /dev/hda5
  Physical volume &quot;/dev/hda5&quot; successfully created
root@tab:~# vgcreate pve /dev/hda5 
  Volume group &quot;pve&quot; successfully created
root@tab:~# lvcreate -L 1G -n root pve
  Logical volume &quot;root&quot; created
root@tab:~# lvcreate -L 10G -n data pve
  Logical volume &quot;data&quot; created
</pre>
<br /><h1 id="create_file_systems">create file systems</h1>
<pre>
root@tab:~# mke2fs -j -m 0 /dev/hda2
root@tab:~# mke2fs -j -m 0 /dev/pve/root
root@tab:~# mke2fs -j -m 0 /dev/pve/data
</pre>
<br /><h1 id="mount_fs">mount fs</h1>
<pre>
root@tab:~# mkdir /mnt/pve/
root@tab:~# mount /dev/pve/root /mnt/pve/
root@tab:~# mkdir /mnt/pve/boot
root@tab:~# mount /dev/hda2 /mnt/pve/boot/
root@tab:~# mkdir -p /mnt/pve/var/lib/vz
root@tab:~# mount /dev/pve/data /mnt/pve/var/lib/vz/

root@tab:~# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/pve-root   1032088     34104    997984   4% /mnt/pve
/dev/hda2              1035692     34108   1001584   4% /mnt/pve/boot
/dev/mapper/pve-data  10321208    154232  10166976   2% /mnt/pve/var/lib/vz
</pre>
<br /><h1 id="unpack_installation">unpack installation</h1>
<pre>
root@tab:~# cd /mnt/pve/
root@tab:/mnt/pve# tar xvfj /mnt/usb/proxmox-ve_1.1-3664.tar.bz2

root@tab:/mnt/pve# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/pve-root   1032088    521128    510960  51% /mnt/pve
/dev/hda2              1035692     50868    984824   5% /mnt/pve/boot
/dev/mapper/pve-data  10321208    154268  10166940   2% /mnt/pve/var/lib/vz
</pre>
<br /><h1 id="grub">grub</h1>
<p>
add Proxmox target into <tt>/boot/grub/menu.lst</tt> after <tt>END DEBIAN AUTOMAGIC KERNELS LIST</tt></p>
<pre>
root@tab:~# tail -10 /boot/grub/menu.lst
title           Debian GNU/Linux, kernel memtest86+
root            (hd0,0)
kernel          /boot/memtest86+.bin

### END DEBIAN AUTOMAGIC KERNELS LIST

title           Proxmox Virtual Environment, kernel 2.6.24-2-pve
root            (hd0,1)
kernel          /vmlinuz-2.6.24-2-pve root=/dev/mapper/pve-root ro 
initrd          /initrd.img-2.6.24-2-pve
</pre>
<br /><h1 id="preference_df">preference df</h1>
<pre>
proxmox:~# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/pve/root          2064208    556244   1507964  27% /
/dev/sda2              2063536     52640   1906072   3% /boot
/dev/mapper/pve-data  20642428    407420  20235008   2% /var/lib/vz
</pre>
</div>
]]></description>
<author>Dobrica Pavlinu&#x161;i&#x107;</author>
<category>KVM, OpenVZ, virtualization</category>
<guid isPermaLink="true">https://saturn.ffzg.hr/rot13/index.cgi?proxmox</guid>
<pubDate>Mon, 27 Feb 2017 12:10:42 -0000</pubDate>
</item>
</channel>
</rss>