Help needed converting a VM to ESXI vmare

rudiduarterodrigues

New Member
Sep 28, 2021
12
0
1
44
Hi guys

im new to this proxmox, however i need to send a VM away for someone to recover some data off and i am following this guide
https://edywerder.ch/proxmox-to-vmware/

Here is my VM disk : local-lvm:vm-111-disk-1,size=256g

but the command below does not work ? even if i change rbd:pool to lvm:pool still nothing

qemu-img convert -f raw rbd:Pool/vm-121-disk-9 -O vmdk zappix-neu.vmdk

Is there an easier way to do this ?

Many Thanks
Rudi
 
Well, just copy and pasting that command won't work as you are using a totally different underlying storage.

Since your storage is named "local-lvm", I assume it is the default storage that the installer creates. In that case, the disk image should be available at /dev/mapper/pve-vm--<VMID>--disk--X which you can use to tell qemu-img convert to use as source.
 
  • Like
Reactions: rudiduarterodrigues
Well, just copy and pasting that command won't work as you are using a totally different underlying storage.

Since your storage is named "local-lvm", I assume it is the default storage that the installer creates. In that case, the disk image should be available at /dev/mapper/pve-vm--<VMID>--disk--X which you can use to tell qemu-img convert to use as source.s
so i would have to modify my command to the above ? sorry im pretty useless at this but i need to do it urgently :( So it would be something like

qemu-img convert -f raw lvm:raw/vm-114-disk-1 -O vmdk zappix-neu.vmdk
 
qemu-img needs a path where it can access the source data, so no "lvm:raw/vm-114-disk-1" but the /dev/mapper/... as I explained it above. You can see what is there by running ls /dev/mapper
 
qemu-img needs a path where it can access the source data, so no "lvm:raw/vm-114-disk-1" but the /dev/mapper/... as I explained it above. You can see what is there by running ls /dev/mapper

root@covenant:~# ls /dev/mapper
control pve-swap pve-vm--104--disk--0
pve-data pve-vm--100--disk--0 pve-vm--105--disk--0
pve-data_tdata pve-vm--101--disk--0 pve-vm--111--disk--0
pve-data_tmeta pve-vm--101--disk--1 pve-vm--111--disk--1
pve-data-tpool pve-vm--101--disk--2
pve-root pve-vm--101--disk--3
 
Okay, looks like the volume for the vm disk isn't activated.

Run lvs and check if it is shown, it will most likely look something like this:
Code:
lvs
  LV            VG  Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  data          pve twi-aotz-- 31.37g             0.00   1.58                           
  root          pve -wi-ao---- 14.75g                                                   
  swap          pve -wi-ao----  4.00g                                                   
  vm-100-disk-0 pve Vwi---tz--  1.00g data
                    ^^^^^^^^^^
Missing an "a".

By running lvchange -ay pve/vm-114-disk-1 it will get the "a" attribute, and it should show up in /dev/mapper/
 
Okay, looks like the volume for the vm disk isn't activated.

Run lvs and check if it is shown, it will most likely look something like this:
Code:
lvs
  LV            VG  Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  data          pve twi-aotz-- 31.37g             0.00   1.58                          
  root          pve -wi-ao---- 14.75g                                                  
  swap          pve -wi-ao----  4.00g                                                  
  vm-100-disk-0 pve Vwi---tz--  1.00g data
                    ^^^^^^^^^^
Missing an "a".

By running lvchange -ay pve/vm-114-disk-1 it will get the "a" attribute, and it should show up in /dev/mapper/
nah looks like its there ?

data pve twi-aotz-- <5.31t 5.90 1.22
root pve -wi-ao---- 96.00g
swap pve -wi-ao---- 8.00g
vm-100-disk-0 pve Vwi-aotz-- 128.00g data 35.83
vm-101-disk-0 pve Vwi-a-tz-- 1.00t data 0.00
vm-101-disk-1 pve Vwi-a-tz-- 1.00t data 2.96
vm-101-disk-2 pve Vwi-a-tz-- 256.00g data 8.29
vm-101-disk-3 pve Vwi-aotz-- 256.00g data 4.29
vm-104-disk-0 pve Vwi-aotz-- 1.00t data 14.11
vm-105-disk-0 pve Vwi-a-tz-- 200.00g data 0.00
vm-111-disk-0 pve Vwi-a-tz-- 256.00g data 0.00
vm-111-disk-1 pve Vwi-a-tz-- 256.00g data 22.47
 
First, please put any console output in [code][/code] blocks so the formatting stays intact which makes it much easier to read.

Well, you want to export VM 114 right? There does not seem to be a disk image for that VM in your local-lvm storage.
Can you show the config of the VM? qm config 114
It might be using a different storage that you have configured.
 
First, please put any console output in [code][/code] blocks so the formatting stays intact which makes it much easier to read.

Well, you want to export VM 114 right? There does not seem to be a disk image for that VM in your local-lvm storage.
Can you show the config of the VM? qm config 114
It might be using a different storage that you have configured.
Sorry its my bad i need VM 111 not 114 below is vm config 111, sorry about the [] have fixed it


[root@covenant:~# qm config 111
agent: 1
bootdisk: virtio0
cores: 4
cpu: host
description: 172.19.181.27
ide2: Unraid:iso/virtio-win-0.1.141.iso,media=cdrom,size=309208K
memory: 4096
name: S08PSPASTEL01
net0: virtio=CA:24:7D:86:FD:9C,bridge=vmbr0
numa: 0
onboot: 1
ostype: win7
scsihw: virtio-scsi-pci
smbios1: uuid=1f3309b1-a679-4797-bb17-c2e7ce15f6bc
sockets: 1
virtio0: local-lvm:vm-111-disk-1,size=256G]
 
Sorry its my bad i need VM 111 not 114 below is vm config 111, sorry about the [] have fixed it
Ah okay :)

Well then you can use qemu-img convert -f raw /dev/mapper/pve-vm--VMID--disk--X -O vmdk /path/to/the/vmdk/file
Replace the VMID with 111 and X with 1 and adjust the path where you want the vmdk file to be placed and it should work.
 
Ah okay :)

Well then you can use qemu-img convert -f raw /dev/mapper/pve-vm--VMID--disk--X -O vmdk /path/to/the/vmdk/file
Replace the VMID with 111 and X with 1 and adjust the path where you want the vmdk file to be placed and it should work.
Thank you so much aaron !! amazing...... ok let me give this a try quick :)
 
[root@covenant:~# qemu-img convert -f raw /dev/mapper/pve-vm--111--disk--1 -O vmdk /var/backups/
qemu-img: /var/backups/: error while converting vmdk: Could not create '/var/backups/': Is a directory
root@covenant:~#]

Am i doing something wrong ? it wont copy anywhere ?