<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:default="http://www.w3.org/1999/xhtml">
  <title xmlns="http://www.w3.org/2005/Atom">Dobrica Pavlinušić's random unstructured stuff: Proxmox</title>
  <id xmlns="http://www.w3.org/2005/Atom">https://saturn.ffzg.hr/rot13/</id>
  <link xmlns="http://www.w3.org/2005/Atom" type="text/html" rel="alternate" href="https://saturn.ffzg.hr/rot13/index.cgi?proxmox"/>
  <link xmlns="http://www.w3.org/2005/Atom" type="application/atom+xml" rel="self" href="https://saturn.ffzg.hr%2C%20saturn.ffzg.hr:443/feed/workspace/rot13?page=proxmox;type=Atom"/>
  <updated xmlns="http://www.w3.org/2005/Atom">2017-02-27T12:10:42Z</updated>
  <entry xmlns="http://www.w3.org/2005/Atom" xmlns:default="http://www.w3.org/1999/xhtml">
    <title xmlns="http://www.w3.org/2005/Atom">Proxmox</title>
    <link xmlns="http://www.w3.org/2005/Atom" type="text/html" rel="alternate" href="https://saturn.ffzg.hr/rot13/index.cgi?proxmox"/>
    <content xmlns="http://www.w3.org/2005/Atom" xmlns:default="http://www.w3.org/1999/xhtml" type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml"><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 "/dev/hda5" successfully created
root@tab:~# vgcreate pve /dev/hda5 
  Volume group "pve" successfully created
root@tab:~# lvcreate -L 1G -n root pve
  Logical volume "root" created
root@tab:~# lvcreate -L 10G -n data pve
  Logical volume "data" 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>
</div>
    </content>
    <id xmlns="http://www.w3.org/2005/Atom">https://saturn.ffzg.hr/rot13/index.cgi?proxmox</id>
    <author xmlns="http://www.w3.org/2005/Atom">
      <name xmlns="http://www.w3.org/2005/Atom">Dobrica Pavlinušić</name>
    </author>
    <updated xmlns="http://www.w3.org/2005/Atom">2017-02-27T12:10:42Z</updated>
    <category xmlns="http://www.w3.org/2005/Atom" term="KVM" label="KVM"/>
    <category xmlns="http://www.w3.org/2005/Atom" term="OpenVZ" label="OpenVZ"/>
    <category xmlns="http://www.w3.org/2005/Atom" term="virtualization" label="virtualization"/>
  </entry>
</feed>
