Hyper-V Festplatte zu Promox konvertieren

Oct 28, 2020
32
2
13
37
Bayreuth
Guten Tag,

ich habe heute einen .vhd in eine .vhdx mit Powershell konvertiert:

Code:
Convert-VHD -Path D:\Disk.vhd -DestinationPath C:\tmp\Disk.vhdx

Das wurde ohne Fehler abgeschlossen.
Nach dieser Maßnahme habe ich dann die .vhdx Datei auf den Proxmox Server geschoben.
Jetzt habe ich diesen Befehl ausgeführt:

Code:
qemu-img check -r all /tmp/Disk.vhdx

Da sehe ich dann ganzen viele Einträge dieser Art:
Bash:
qemu-img: VHDX BAT entry 4062 start offset 135262109696 points after end of file (75072614400). Image has probably been truncated.
qemu-img: VHDX BAT entry 4063 start offset 135295664128 points after end of file (75072614400). Image has probably been truncated.
qemu-img: VHDX BAT entry 4064 start offset 135329218560 points after end of file (75072614400). Image has probably been truncated.
qemu-img: VHDX BAT entry 4065 start offset 135362772992 points after end of file (75072614400). Image has probably been truncated.
qemu-img: VHDX BAT entry 4066 start offset 135396327424 points after end of file (75072614400). Image has probably been truncated.
qemu-img: VHDX BAT entry 4067 start offset 135429881856 points after end of file (75072614400). Image has probably been truncated.
qemu-img: VHDX BAT entry 4068 start offset 135463436288 points after end of file (75072614400). Image has probably been truncated.
qemu-img: VHDX BAT entry 4069 start offset 135496990720 points after end of file (75072614400). Image has probably been truncated.
qemu-img: VHDX BAT entry 4070 start offset 135530545152 points after end of file (75072614400). Image has probably been truncated.
qemu-img: VHDX BAT entry 4071 start offset 135564099584 points after end of file (75072614400). Image has probably been truncated.
qemu-img: VHDX BAT entry 4072 start offset 135597654016 points after end of file (75072614400). Image has probably been truncated.
qemu-img: VHDX BAT entry 4073 start offset 135631208448 points after end of file (75072614400). Image has probably been truncated.
qemu-img: VHDX BAT entry 4074 start offset 135664762880 points after end of file (75072614400). Image has probably been truncated.
qemu-img: VHDX BAT entry 4075 start offset 135698317312 points after end of file (75072614400). Image has probably been truncated.
qemu-img: VHDX BAT entry 4076 start offset 135731871744 points after end of file (75072614400). Image has probably been truncated.
qemu-img: VHDX BAT entry 4077 start offset 135765426176 points after end of file (75072614400). Image has probably been truncated.
qemu-img: VHDX BAT entry 4078 start offset 135798980608 points after end of file (75072614400). Image has probably been truncated.
qemu-img: VHDX BAT entry 4079 start offset 135832535040 points after end of file (75072614400). Image has probably been truncated.
qemu-img: VHDX BAT entry 4080 start offset 135866089472 points after end of file (75072614400). Image has probably been truncated.
qemu-img: VHDX BAT entry 4081 start offset 135899643904 points after end of file (75072614400). Image has probably been truncated.

Dann habe ich versucht diesen Befehl auszuführen:

Bash:
qemu-img convert -O qcow2 /tmp/Disk.vhdx /tmp/Disk

Da erhalte ich dann diese Fehlermeldung:

Bash:
qemu-img: VHDX BAT entry 2254 end offset 75099013119 points after end of file (75072614400). Image has probably been truncated.
qemu-img: Could not open '/tmp/Disk.vhdx': Could not open '/tmp/Disk.vhdx': Invalid argument

Jetzt bin ich leider überfragt, wie kann ich diesen Fehler beheben/umgehen?
 
hi,
Da sehe ich dann ganzen viele Einträge dieser Art:
hast du geschaut ob das file richtig uebertragen worden ist? checksums vergleichen sollte helfen:
Code:
sha256sum Disk.vhdx
und auch auf der windows machine schauen:
Code:
certutil -hashfile C:\Users\foo\Desktop\Disk.vhdx SHA256

wenn beide gleich sind dann liegt der fehler woanders (z.b. bei qemu-img oder die vdisk selber)
 
Umkonvertierung von vhd zu vhdx ist unnötig.
Einfach die vhd(x) mit qm importdisk importieren und zuweisen.

Code:
qm importdisk 1234 lalalaq.vhd ZIELSTORAGE --format raw

Code:
man qm
qm importdisk <vmid> <source> <storage> [OPTIONS]

       Import an external disk image as an unused disk in a VM. The image format has to be supported by qemu-img(1).

       <vmid>: <integer> (1 - N)
           The (unique) ID of the VM.

       <source>: <string>
           Path to the disk image to import

       <storage>: <string>
           Target storage ID

       --format <qcow2 | raw | vmdk>
           Target format
 
Last edited:
  • Like
Reactions: oguz and proxifoxi

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!