Festplatten
https://pve.proxmox.com/wiki/Storage
local -> /var/lib/vz
local-lvm -> /dev/pve
Import
qm importdisk <vmid> yourimage.qcow2 namestoragepool
Ein Beispiel aus der realen Welt könnte also sein wie ...
qm importdisk 101 fileserver.qcow2 local-lvm
UnZip:
apt-get install unzip
Konvertieren:
qemu-img convert -f vmdk openmanage_enterprise.x86_64-0.0.1-disk1.vmdk -O qcow2 OpenManageEntreprise-3-1.qcow2
Is the image a single .vmdk file? Generally, you can import .vmdk files directly into Proxmox VE virtual machine with a few steps.
- Create a virtual machine in Proxmox VE
- Remove the disk that the wizard creates. You should now have zero disks for the virtual machine.
- Use
qm importdisk <vmid> <your_vmdk_image> <a_pve_storage>to import the disk image. In the hardware view of your VM it should now show up as unassigned disk. - Double click the unassigned disk to make it usable. While SCSI is faster, try IDE or SATA if your image does not boot
ntfs Support
apt-get install ntfs-3g
mount -t ntfs-3g /dev/sdb1 /mnt/disk1
Festplatte einbinden
fdisk -l
mkdir /mnt/sdX
mkfs.ext4 /dev/sdX
mount /dev/sdX /mnt/sdX
pvesm add dir sdx1 --path /mnt/sdx1 --content rootdir
/etc/pve/storage.cfg
dir: sdc1
path /mnt/sdc1
content vztmpl,snippets,rootdir,iso,backup,images
shared 0
expand ext4 partition
It is very ease to expand ext4 partition with growpart.
- Backup current partition table
sfdisk -d /dev/sdb > sdb_partition_bak.dmp
- Execute dry-run to see what will be changed. If you don't have this tool. Run apt-get install cloud-utils
growpart -N /dev/sdb 1
- If everything is fine
growpart /dev/sdb 1
- Resize file system. It may take 10 seconds
resize2fs /dev/sdb1
- Check the new size
df -h
Festplatten verkleinern
Um die Größe eines LVM-Datenträgers zu ändern, können Sie zunächst die Datenträger mit dem folgenden Befehl auflisten:
lvdisplay
Sie sollten einen Auswurf ähnlich dem in der folgenden Abbildung gezeigten erhalten:
Was Sie beachten möchten, ist der LV-Pfad, da dieser im Befehl lvresize verwendet wird.
Um die Datenträgergröße zu erhöhen oder zu vergrößern, können Sie den folgenden Befehl ausführen:
lvresize --size +4T /dev/pve/vm-101-disk-1
Dadurch wird die Festplattengröße um 4 TB erhöht. Wenn Sie die Festplattengröße in GB erhöhen möchten, verwenden Sie einfach G anstelle von T.
Um die Datenträgergröße zu verringern oder zu verkleinern, können Sie den folgenden Befehl ausführen:
lvresize --size -4T /dev/pve/vm-101-disk-1