Import two wmdk files to proxmox

Hi, i have a VMware image with two partition (2 .vmdk files), i started this machine with a .vmx file. It's possibile import this VM to proxmox?
I have read thid guide http://pve.proxmox.com/wiki/Migration_of_servers_to_Proxmox_VE, but i don't know which method to follow (clonezilla or import vmdk directly)

hi,
stop the vmware machine, then convert (directly through network or a local copy) the vmdk (the "full" one) to whatever format you need on proxmox ve.
remember to use mergeide.reg in vmware before, if converting a windows machine.

Marco
 
hi,
stop the vmware machine, then convert (directly through network or a local copy) the vmdk (the "full" one) to whatever format you need on proxmox ve.
remember to use mergeide.reg in vmware before, if converting a windows machine.

Marco

I have to use clonezilla?
 
I have to use clonezilla?

all you need is to have vmdk on the proxmox node (or wherever qemu-img is)

so, if you can access the vmware vmdk in other ways (eg: network) from your proxmox node, no, you don't need to use clonezilla

just copy the vmdk to your proxmox node, in any way. then, use qemu-img to convert them to other formats usable by proxmox (btw proxmox can also use vmdk copied files directly, although is not the best format usable)

Marco
 
all you need is to have vmdk on the proxmox node (or wherever qemu-img is)

so, if you can access the vmware vmdk in other ways (eg: network) from your proxmox node, no, you don't need to use clonezilla

just copy the vmdk to your proxmox node, in any way. then, use qemu-img to convert them to other formats usable by proxmox (btw proxmox can also use vmdk copied files directly, although is not the best format usable)

Marco

I have tried to copy and convert in .qcow2 with qemu-image a .vmdk file, but i have 2 file .vmdk, it's possible to have one sigle kvm with 2 vmdk files?

Thanks
Stefano
 
I have tried to copy and convert in .qcow2 with qemu-image a .vmdk file, but i have 2 file .vmdk, it's possible to have one sigle kvm with 2 vmdk files?

of course.

in proxmox vm (kvm) you can add several disks, in three formats, but you choice depends also on what type of "pve storage" you choose to host them on (eg: storage could be nfs, or iscsi/lvm, local and so on)

see http://pve.proxmox.com/wiki/Storage_Model

if your storage is lvm/iscsi, you can only choose raw, since lvm can host only filesystems, not files
if your storage can host files, you must use a a file, so you can choose between qcow2, vmdk, raw (each one have pros/cons)

for each disk you also have to choose a bus/deice type: vitrio, ide, scsi, sata (each one have pros/cons)

see http://pve.proxmox.com/wiki/Installation#Hard_disk

when you create a new vm (kvm) you *must* create at least an empty disk following infos above. You can add more, of course.

Once the vm is "saved" you will find all its info, including all hardware, in its .conf file, under /etc/pve/qemu-server/

like /etc/pve/qemu-server/100.conf, if your vm as VMID = "100"

if you look in the file, you will see that for each disk "created" there's a line like

ide0: pve_lvm_storage:vm-100-disk-1,size=32G

this means i'm using a 32GB disk on lvm storage "pve_lvm_storage", and disk data is on lv name "vm-100-disk-1", using bus "ide", and ide0 means is the first of the 4 (in this case, since is ide) channels allowed on this bus type

if you use a file, instead it will be like
virtio0: pve_nfs_storage:100/vm-100-disk-1.qcow,size=32G
or
virtio0: pve_nfs_storage:100/vm-100-disk-1.vmdk,size=32G
or
virtio0: pve_nfs_storage:100/vm-100-disk-1.RAW,size=32G

so if you have 2 .vmdk files, create the vm with a 1GB vmdk disk, then add another empty 1GB one, so your 100.conf will have lines like

ide0: pve_nfs_storage:100/vm-100-disk-1.vmdk,size=1G
ide1: pve_nfs_storage:100/vm-100-disk-2.vmdk,size=1G

To use your .vmdk you have to replace the above 1GB files with yours, renaming yours or adapting the .conf file to your names, if you get what I mean: you can't do this through the web gui, sadly, you must use the pve command line on a node.

Then, just check that boot order is right, so that your vm will boot from the right .vmdk

It should work, if you have windows on them you should have followed all notes about windows vms and mergeide

Marco
 
Thanks Marco,
i have another idea, if i create image with clonezilla, i can restore this image with clonezilla live cd in proxmox? Where do i put the clonezilla img files in proxmox server?
 
hi, sure.
the img file is the RAW file proxmox expects, when vm is configured to use it.

so, in the 100.conf file you will need a line like (eg)
ide0: pve_nfs_storage:100/vm-100-disk-1.RAW

you can use that filename (like created by pve) or another, at your taste.

Marco
 
hi, sure.
the img file is the RAW file proxmox expects, when vm is configured to use it.

so, in the 100.conf file you will need a line like (eg)
ide0: pve_nfs_storage:100/vm-100-disk-1.RAW

you can use that filename (like created by pve) or another, at your taste.

Marco

OK but clonezilla has created one folder with a lot of files inside....
 
...afaik, an "image" is a single file...
what you did exactly with clonezilla, and what you got from it?

Marco

I have chose device / image and has create a folder with these files:

drwx------ 2 stefano stefano 4096 nov 20 13:16 .
drwxr-xr-x 32 stefano stefano 4096 nov 20 17:25 ..
-rw------- 1 stefano stefano 879 nov 20 12:45 blkdev.list
-rw------- 1 stefano stefano 366 nov 20 12:45 blkid.list
-rw------- 1 stefano stefano 8106 nov 20 13:16 clonezilla-img
-rw------- 1 stefano stefano 8 nov 20 13:05 disk
-rw------- 1 stefano stefano 145821 nov 20 13:05 Info-dmi.txt
-rw------- 1 stefano stefano 63117 nov 20 13:05 Info-lshw.txt
-rw------- 1 stefano stefano 1772 nov 20 13:05 Info-lspci.txt
-rw------- 1 stefano stefano 172 nov 20 13:05 Info-packages.txt
-rw------- 1 stefano stefano 99 nov 20 13:16 Info-saved-by-cmd.txt
-rw------- 1 stefano stefano 288 nov 20 12:46 lvm_logv.list
-rw------- 1 stefano stefano 116 nov 20 12:46 lvm_vg_dev.list
-rw------- 1 stefano stefano 2124 nov 20 12:46 lvm_VolGroup.conf
-rw------- 1 stefano stefano 15 nov 20 13:05 parts
-rw------- 1 stefano stefano 55771453 nov 20 12:46 sda1.ext4-ptcl-img.gz.aa
-rw------- 1 stefano stefano 36 nov 20 12:45 sda-chs.sf
-rw------- 1 stefano stefano 1048064 nov 20 12:46 sda-hidden-data-after-mbr
-rw------- 1 stefano stefano 512 nov 20 12:46 sda-mbr
-rw------- 1 stefano stefano 341 nov 20 12:45 sda-pt.parted
-rw------- 1 stefano stefano 314 nov 20 12:45 sda-pt.parted.compact
-rw------- 1 stefano stefano 259 nov 20 12:45 sda-pt.sf
-rw------- 1 stefano stefano 37 nov 20 12:46 sdb-chs.sf
-rw------- 1 stefano stefano 1048064 nov 20 12:46 sdb-hidden-data-after-mbr
-rw------- 1 stefano stefano 512 nov 20 12:46 sdb-mbr
-rw------- 1 stefano stefano 277 nov 20 12:46 sdb-pt.parted
-rw------- 1 stefano stefano 259 nov 20 12:46 sdb-pt.parted.compact
-rw------- 1 stefano stefano 249 nov 20 12:46 sdb-pt.sf
-rw------- 1 stefano stefano 53 nov 20 13:05 swappt-VolGroup-lv_swap.in
 
-rw------- 1 stefano stefano 55771453 nov 20 12:46 sda1.ext4-ptcl-img.gz.aa
-rw------- 1 stefano stefano 1048064 nov 20 12:46 sda-hidden-data-after-mbr
-rw------- 1 stefano stefano 1048064 nov 20 12:46 sdb-hidden-data-after-mbr

those seems to have something to do with sda and sdb partitions... I guess the first is what you want, but I've never seen an output like that (what's .aa ?)

afaik, you should select an option to have a disk image, and get a single .img file.

tbh, i rarely use clonezilla, i prefer fsarchiver but it should work too. see this advice here, or let's hear from other forum members...
http://pve.proxmox.com/wiki/Migrati...roxmox_VE_.28KVM.29_using_Clonezilla_Live_CDs

sorry, can't help more...

Marco
 
of course.

in proxmox vm (kvm) you can add several disks, in three formats, but you choice depends also on what type of "pve storage" you choose to host them on (eg: storage could be nfs, or iscsi/lvm, local and so on)

see http://pve.proxmox.com/wiki/Storage_Model

if your storage is lvm/iscsi, you can only choose raw, since lvm can host only filesystems, not files
if your storage can host files, you must use a a file, so you can choose between qcow2, vmdk, raw (each one have pros/cons)

for each disk you also have to choose a bus/deice type: vitrio, ide, scsi, sata (each one have pros/cons)

see http://pve.proxmox.com/wiki/Installation#Hard_disk

when you create a new vm (kvm) you *must* create at least an empty disk following infos above. You can add more, of course.

Once the vm is "saved" you will find all its info, including all hardware, in its .conf file, under /etc/pve/qemu-server/

like /etc/pve/qemu-server/100.conf, if your vm as VMID = "100"

if you look in the file, you will see that for each disk "created" there's a line like

ide0: pve_lvm_storage:vm-100-disk-1,size=32G

this means i'm using a 32GB disk on lvm storage "pve_lvm_storage", and disk data is on lv name "vm-100-disk-1", using bus "ide", and ide0 means is the first of the 4 (in this case, since is ide) channels allowed on this bus type

if you use a file, instead it will be like
virtio0: pve_nfs_storage:100/vm-100-disk-1.qcow,size=32G
or
virtio0: pve_nfs_storage:100/vm-100-disk-1.vmdk,size=32G
or
virtio0: pve_nfs_storage:100/vm-100-disk-1.RAW,size=32G

so if you have 2 .vmdk files, create the vm with a 1GB vmdk disk, then add another empty 1GB one, so your 100.conf will have lines like

ide0: pve_nfs_storage:100/vm-100-disk-1.vmdk,size=1G
ide1: pve_nfs_storage:100/vm-100-disk-2.vmdk,size=1G

To use your .vmdk you have to replace the above 1GB files with yours, renaming yours or adapting the .conf file to your names, if you get what I mean: you can't do this through the web gui, sadly, you must use the pve command line on a node.

Then, just check that boot order is right, so that your vm will boot from the right .vmdk

It should work, if you have windows on them you should have followed all notes about windows vms and mergeide

Marco
Hi Marco,
I have also two vmdk disks to import. I did it using the command:
qm disk import 1XX *disk001.vdmk- local-lvm --format raw
qm disk import 1XX *disk002.vdmk- local-lvm --format raw
both disk show up as unused disk in the VM hardware panel. I attached the disks image to a bus.
to "then, just check that boot order is right, so that your vm will boot from the right .vmdk". How can I find out which disk from both is the boot disk?