Convert raw to vmdk problem

mamatov

Member
Jan 16, 2015
35
0
6
Hi,

I need to convert a disk from raw to vmdk.

The VM operating system is a Centos 5

So I tried :

1 - to clone the VM and change the disk to "vmdk"

2 - to clone the disk using qemu-img :

qemu-img convert -f raw -O vmdk vm-204-disk-1.raw vm-2044-disk1.vmdk

My problem is my system file is corrupt. The partition /dev/vda6 is missing.

  • See below the result of the fdisk (disk raw) :
Disque /dev/vda: 36.5 Go, 36507222016 octets
255 heads, 63 sectors/track, 4438 cylinders
Unités = cylindres de 16065 * 512 = 8225280 octets

Périphérique Amorce Début Fin Blocs Id Système
/dev/vda1 * 1 13 104391 83 Linux
/dev/vda2 14 1230 9775552+ 83 Linux
/dev/vda3 1231 1853 5004247+ 83 Linux
/dev/vda4 1854 4439 20767361+ 5 Extended
/dev/vda5 1854 3159 10485346 82 Linux swap / Solaris
/dev/vda6 3159 4439 10279936 83 Linux
abal-proxmox(root):/root>

  • After convertion to vmdk, the VM boot failed with this message :

fsck.ext3 : unable to resolve 'LABEL=/home'

I log in maintenance mode and list my system files using fdisk :

Disque /dev/vda: 36.5 Go, 36507222016 octets
255 heads, 63 sectors/track, 4438 cylinders
Unités = cylindres de 16065 * 512 = 8225280 octets

Périphérique Amorce Début Fin Blocs Id Système
/dev/vda1 * 1 13 104391 83 Linux
/dev/vda2 14 1230 9775552+ 83 Linux
/dev/vda3 1231 1853 5004247+ 83 Linux
/dev/vda4 1854 4439 20767361+ 5 Extended
/dev/vda5 1854 3159 10485346 82 Linux swap / Solaris

/dev/vda6 is missing !

any idea ? thanks in advance
 
I tried to clone the VM with the same disk (raw), same issue (no more /dev/vda6

But if I backup the VM and restore, no problem.
 
maybe the issue is related to vda devices?

if you were on vmware, you got /dev/sda devices.

to keep sda, use virtio-scsi instead of virtio on proxmox ve.