I was wondering if anyone could help me add a function to the GUI.
Right now I create linked clones by doing this: # qemu-img create -b /storage/vms/images/base_images/baseimg.qcow2 -f qcow2 /storage/vms/images/VMID/vm-VMID-disk-1.qcow2
I wanted to automate this process so that the linked clone would automatically get all the specified configuration options but be a linked clone of a specified base image.
I looked through the proxmox web code in /usr/share/pve-manager/root/ and found create.htm in /usr/share/pve-manager/root/vmlist/. It looks like I should be able to add something like this...
##
# custom code to enable the creatition of a linked clone
$grid->add_row (__("Linked Clone") . ':',
$form->create_element ('','bool',
defined ($fdat{}) ? fdat{} : 0));
$grid->add_row (__("Base Images") . ':',
$form-create_element ('','dropdown',
$fdat{}, $vartmp));
$out .= PVE::HTMLUtils::create_statusframe (undef, __("Linked Clones"), undef, $html);
$out .= "<br>";
##
...to the end of the file, just before the create button. However, I have no idea what $fdat does. Is it a function? All I really need to accomplish is to see if the checkbox is checked and run the qemu command listed above after the initial image is created. The linked clone would then override the virtual disk that was initially created.
Any help would be very much appreciated.
To the proxmox team: please add this in 2.0!!
Thank you in advance,
Phil
Right now I create linked clones by doing this: # qemu-img create -b /storage/vms/images/base_images/baseimg.qcow2 -f qcow2 /storage/vms/images/VMID/vm-VMID-disk-1.qcow2
I wanted to automate this process so that the linked clone would automatically get all the specified configuration options but be a linked clone of a specified base image.
I looked through the proxmox web code in /usr/share/pve-manager/root/ and found create.htm in /usr/share/pve-manager/root/vmlist/. It looks like I should be able to add something like this...
##
# custom code to enable the creatition of a linked clone
$grid->add_row (__("Linked Clone") . ':',
$form->create_element ('','bool',
defined ($fdat{}) ? fdat{} : 0));
$grid->add_row (__("Base Images") . ':',
$form-create_element ('','dropdown',
$fdat{}, $vartmp));
$out .= PVE::HTMLUtils::create_statusframe (undef, __("Linked Clones"), undef, $html);
$out .= "<br>";
##
...to the end of the file, just before the create button. However, I have no idea what $fdat does. Is it a function? All I really need to accomplish is to see if the checkbox is checked and run the qemu command listed above after the initial image is created. The linked clone would then override the virtual disk that was initially created.
Any help would be very much appreciated.
To the proxmox team: please add this in 2.0!!

Thank you in advance,
Phil
