Fixed template tag, and make ignore change file modes
This commit is contained in:
parent
e21df4e0f5
commit
0748b2aaf6
@ -25,7 +25,7 @@ def importTemplate(name, storage, id):
|
|||||||
file = f"/tmp/{file}"
|
file = f"/tmp/{file}"
|
||||||
print(f"Importing {file} to {storage} with id {id}")
|
print(f"Importing {file} to {storage} with id {id}")
|
||||||
templateName = os.path.basename(file).split(".")[0]
|
templateName = os.path.basename(file).split(".")[0]
|
||||||
os.popen(f'qm create {id} --memory 2048 --net0 virtio,bridge=vmbr0 --scsihw virtio-scsi-pci --name "{templateName}" --tag temlate').read()
|
os.popen(f'qm create {id} --memory 2048 --net0 virtio,bridge=vmbr0 --scsihw virtio-scsi-pci --name "{templateName}" --tag template').read()
|
||||||
os.popen(f'qm set {id} --scsi0 {storage}:0,import-from={file}').read()
|
os.popen(f'qm set {id} --scsi0 {storage}:0,import-from={file}').read()
|
||||||
os.popen(f'qm set {id} --ide2 {storage}:cloudinit').read()
|
os.popen(f'qm set {id} --ide2 {storage}:cloudinit').read()
|
||||||
os.popen(f'qm set {id} --boot order=scsi0').read()
|
os.popen(f'qm set {id} --boot order=scsi0').read()
|
||||||
|
|||||||
@ -22,7 +22,8 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Downloading importer... \n\n"
|
echo "Downloading importer... \n\n"
|
||||||
git clone https://github.com/ggMartinez/Proxmox-Cloud-Image-Importer $outputDirectory && cd $outputDirectory
|
git clone https://github.com/ggMartinez/Proxmox-Cloud-Image-Importer $outputDirectory && cd $outputDirectory && git config core.fileMode false
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo "Installing requirements\n\n"
|
echo "Installing requirements\n\n"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user