[PVE-User] Migrating a vmdk from NAS to LVM

Alexandre DERUMIER aderumier at odiso.com
Mon Sep 12 08:36:18 CEST 2016


Indeed,

the value take from file_size_info is "virtual size:10K"

I'll try to look for a workaround


----- Mail original -----
De: "Dhaussy Alexandre" <ADhaussy at voyages-sncf.com>
À: "proxmoxve" <pve-user at pve.proxmox.com>
Envoyé: Vendredi 9 Septembre 2016 17:06:23
Objet: Re: [PVE-User] Migrating a vmdk from NAS to LVM

Hello Alexandre, 

I can't check the size because the LVM volume is auto-removed after the 
failure. 
But i'm guessing the LV is created with the size of the vmdk descriptor 
file. 

Because if i'm right, it seems to get the file size from the file name : 

######### Storage/Plugin.pm:volume_size_info() 

sub volume_size_info { 
my ($class, $scfg, $storeid, $volname, $timeout) = @_; 
my $path = $class->filesystem_path($scfg, $volname); 
return file_size_info($path, $timeout); 

} 

################################ 

# qm config 410 | sed -ne 's/^\(virtio.*\)/\1/p' 
virtio0: isilon:410/vm-410-disk-2.vmdk,size=41G 

# qemu-img info /nas/proxmox/testmox2/testmox2.vmdk 
image: /nas/proxmox/testmox2/testmox2.vmdk 
file format: raw 
virtual size: 10K (10240 bytes) 
disk size: 50K 

# qemu-img info /nas/proxmox/testmox2/testmox2-flat.vmdk 
image: /nas/proxmox/testmox2/testmox2-flat.vmdk 
file format: raw 
virtual size: 41G (44023414784 bytes) 
disk size: 2.8G 



Le 09/09/2016 à 16:54, Alexandre DERUMIER a écrit : 
> Hi, 
> 
> Seem to be a proxmox bug. 
> What is the size of lvm volume generated by proxmox ? 
> 
> ----- Mail original ----- 
> De: "Dhaussy Alexandre" <ADhaussy at voyages-sncf.com> 
> À: "proxmoxve" <pve-user at pve.proxmox.com> 
> Envoyé: Vendredi 9 Septembre 2016 14:38:49 
> Objet: [PVE-User] Migrating a vmdk from NAS to LVM 
> 
> Hello, 
> 
> I'm trying to "storage move" disks from NFS/vmdk to LVM/raw. 
> But it doesn't seems to work within proxmox GUI. 
> 
> Here's the error message: 
> 
> ########################## 
> 
> Task viewer: VM 410 - Move disk 
> 
> create full clone of drive virtio0 (isilon:410/vm-410-disk-1.vmdk) 
> Rounding up size to full physical extent 4.00 MiB 
> Logical volume "vm-410-disk-1" created. 
> transferred: 0 bytes remaining: 10240 bytes total: 10240 bytes 
> progression: 0.00 % 
> qemu-img: output file is smaller than input file 
> Logical volume "vm-410-disk-1" successfully removed 
> TASK ERROR: storage migration failed: copy failed: command 
> '/usr/bin/qemu-img convert -t writeback -p -n -f vmdk -O raw 
> /nas/proxmox/images/410/vm-410-disk-1.vmdk 
> /dev/T_proxmox_1/vm-410-disk-1' failed: exit code 1 
> 
> ########################### 
> 
> Is seems qemu complains about "output file is smaller than input file". 
> 
> Anyway i tried to add a new LVM disk from the GUI (41Gb: same size as 
> the original.) 
> After that i was able to convert the disk succesfully ! 
> 
> root at proxmox:# /usr/bin/qemu-img convert -t writeback -p -n -f vmdk -O 
> raw /nas/proxmox/images/410/vm-410-disk-1.vmdk 
> /dev/T_proxmox_1/vm-410-disk-1 
> (100.00/100%) 
> 
> Cheers, 
> Alexandre. 
_______________________________________________ 
pve-user mailing list 
pve-user at pve.proxmox.com 
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user 




More information about the pve-user mailing list