mirror of
https://github.com/RGBCube/vmware-to-proxmox-migration-script
synced 2025-07-26 07:57:46 +00:00
separated discard setting
This commit is contained in:
parent
edaa2a6fd3
commit
e2d6dcd57e
1 changed files with 5 additions and 1 deletions
|
@ -130,7 +130,7 @@ function create_proxmox_vm() {
|
||||||
|
|
||||||
# Create the VM with the correct BIOS type
|
# Create the VM with the correct BIOS type
|
||||||
echo "Creating VM in Proxmox with $FIRMWARE_TYPE firmware, VLAN tag, and SCSI hardware..."
|
echo "Creating VM in Proxmox with $FIRMWARE_TYPE firmware, VLAN tag, and SCSI hardware..."
|
||||||
qm create $VM_ID --name $VM_NAME --memory 2048 --cores 2 --net0 virtio,bridge=vmbr0,tag=$VLAN_TAG --bios $FIRMWARE_TYPE --scsihw virtio-scsi-pci --scsi0 local-lvm:vm-$VM_ID-disk-0,discard=on
|
qm create $VM_ID --name $VM_NAME --memory 2048 --cores 2 --net0 virtio,bridge=vmbr69,tag=$VLAN_TAG --bios $FIRMWARE_TYPE --scsihw virtio-scsi-pci
|
||||||
|
|
||||||
echo "Enabling QEMU Guest Agent..."
|
echo "Enabling QEMU Guest Agent..."
|
||||||
qm set $VM_ID --agent 1
|
qm set $VM_ID --agent 1
|
||||||
|
@ -143,6 +143,10 @@ function create_proxmox_vm() {
|
||||||
local disk_name="vm-$VM_ID-disk-0"
|
local disk_name="vm-$VM_ID-disk-0"
|
||||||
echo "Attaching disk to VM and setting it as the first boot device..."
|
echo "Attaching disk to VM and setting it as the first boot device..."
|
||||||
qm set $VM_ID --scsi0 $STORAGE_TYPE:$disk_name --boot c --bootdisk scsi0
|
qm set $VM_ID --scsi0 $STORAGE_TYPE:$disk_name --boot c --bootdisk scsi0
|
||||||
|
|
||||||
|
# Enable discard functionality for the disk
|
||||||
|
echo "Enabling discard functionality"
|
||||||
|
qm set $VM_ID --scsi0 $STORAGE_TYPE:$disk_name,discard=on
|
||||||
}
|
}
|
||||||
|
|
||||||
# Clear out temp files from /var/vm-migrations
|
# Clear out temp files from /var/vm-migrations
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue