import existing virtual disks, lvm

lievenva

New Member
Dec 26, 2009
13
0
1
Hi,

I have installed proxmox on a system where I used to run libvirt + kvm.

Code:
server1:/etc# pveversion -v
pve-manager: 1.5-1 (pve-manager/1.5/4561)
running kernel: 2.6.32-1-pve
proxmox-ve-2.6.32: 1.5-2
pve-kernel-2.6.32-1-pve: 2.6.32-2
pve-kernel-2.6.24-9-pve: 2.6.24-18
qemu-server: 1.1-10
pve-firmware: 1.0-3
libpve-storage-perl: 1.0-6
vncterm: 0.9-2
vzctl: 3.0.23-1pve3
vzdump: 1.2-5
vzprocps: 2.0.11-1dso2
vzquota: 3.0.11-1
pve-qemu-kvm: 0.11.1-1
ksm-control-daemon: 1.0-2
I want to import existing lvm-disks of my vm's into proxmox. I added this file to /etc/qemu-server/:

Code:
server1:/etc# cat qemu-server/102.conf
name: LTSP
bootdisk: virtio0
virtio0: SAS:ltspsys
virtio1: SAS:ltspswap
virtio2: SAS:ltspvar
virtio3: SATA1:ltspdata
ostype: l26
memory: 2048
onboot: 1
sockets: 1
cores: 1
boot: cd
freeze: 0
cpuunits: 1000
acpi: 1
kvm: 1
vlan0: e1000=52:54:00:F9:31:E6
Proxmox interface seems to recognise this machine, but the virtual disks are given with a size of 0GB.

When I try to start this vm, the task-log of the start-task gives:

Code:
unable to parse lvm volume name 'ltspdata'
Any way to make proxmox recognise the virtual disks? Maybe rename, but then I should know what's the naming scheme....

Thanks a lot,

Lieven
 
Hi,
that sounds like that you don't define the storage (SAS and SATA1).

What is the output of
Code:
vgdisplay
lvdisplay
cat /etc/pve/storage.cfg

You should see a logical volume named ltspsys and so on.

Udo
 
Hi Udo,

I did define the volume-groups:

Code:
server1:/etc/pve# cat storage.cfg
dir: local
        path /var/lib/vz
        content images,iso,vztmpl,rootdir

lvm: SAS
        vgname SAS
        content images

lvm: SATA1
        vgname SATA1
        content images

lvm: SATA2
        vgname SATA2
        content images

dir: PVEISOS
        path /var/lib/pveisos
        content iso

dir: PVEBACKUP
        path /var/lib/pvebackup
        content images

What I did was rename the volumes:

Code:
lvrename SAS ltspsys vm-102-disk-1
lvrename SAS ltspdata vm-102-disk-2
lvrename SAS ltspvar vm-102-disk-3
lvrename SATA1 ltspdata vm-102-disk-1

what did the trick.... (The machine now boots)

The size indication in the hardware device list is still 0GB. See attach....
 

Attachments

  • Capture.PNG
    Capture.PNG
    18.6 KB · Views: 71
Re: [solved] import existing virtual disks, lvm

Hi,

for the sake of completeness, this is what I did to solve the problem:

Code:
  512  lvchange --addtag pve-vm-102 /dev/SAS/vm-102-disk-1
  513  lvchange --addtag pve-vm-102 /dev/SAS/vm-102-disk-2
  514  lvchange --addtag pve-vm-102 /dev/SAS/vm-102-disk-3
  515  lvchange --addtag pve-vm-102 /dev/SATA1/vm-102-disk-1
  516  /etc/init.d/pvedaemon restart

Regards,

Lieven