mirror of https://github.com/BOINC/boinc.git
VBOX: Base the VM name off of the slot directory ID to prevent path length errors on Windows for projects with really long task names. Set the description of the VM to the task name.
This commit is contained in:
parent
f4a0fc8711
commit
2e701bafe6
|
@ -61,6 +61,7 @@ VBOX_VM::VBOX_VM() {
|
|||
virtualbox_version.clear();
|
||||
pFloppy = NULL;
|
||||
vm_master_name.clear();
|
||||
vm_master_description.clear();
|
||||
vm_name.clear();
|
||||
vm_cpu_count.clear();
|
||||
vm_disk_controller_type.clear();
|
||||
|
@ -748,6 +749,13 @@ int VBOX_VM::register_vm() {
|
|||
retval = vbm_popen(command, output, "register");
|
||||
if (retval) return retval;
|
||||
|
||||
// Tweak the VM's Description
|
||||
//
|
||||
command = "modifyvm \"" + vm_name + "\" ";
|
||||
command += "--description \"" + vm_master_description + "\" ";
|
||||
|
||||
vbm_popen(command, output, "modifydescription", false, false);
|
||||
|
||||
// Tweak the VM's CPU Count
|
||||
//
|
||||
fprintf(
|
||||
|
|
|
@ -35,8 +35,10 @@ struct VBOX_VM {
|
|||
// Floppy IO abstraction
|
||||
FloppyIO* pFloppy;
|
||||
|
||||
// unique master name for the VM
|
||||
// unique name for the VM
|
||||
std::string vm_master_name;
|
||||
// unique description for the VM
|
||||
std::string vm_master_description;
|
||||
// unique name for the VM or UUID of a stale VM if deregistering a stale VM
|
||||
std::string vm_name;
|
||||
// required CPU core count
|
||||
|
|
|
@ -576,12 +576,15 @@ int main(int argc, char** argv) {
|
|||
vm.image_filename = IMAGE_FILENAME_COMPLETE;
|
||||
if (boinc_is_standalone()) {
|
||||
vm.vm_master_name += "standalone";
|
||||
vm.vm_master_description = "standalone";
|
||||
if (vm.enable_floppyio) {
|
||||
sprintf(buf, "%s.%s", FLOPPY_IMAGE_FILENAME, FLOPPY_IMAGE_FILENAME_EXTENSION);
|
||||
vm.floppy_image_filename = buf;
|
||||
}
|
||||
} else {
|
||||
vm.vm_master_name += aid.result_name;
|
||||
sprintf(buf, "_slot_%d", aid.slot);
|
||||
vm.vm_master_name += buf;
|
||||
vm.vm_master_description = aid.result_name;
|
||||
if (vm.enable_floppyio) {
|
||||
sprintf(buf, "%s_%d.%s", FLOPPY_IMAGE_FILENAME, aid.slot, FLOPPY_IMAGE_FILENAME_EXTENSION);
|
||||
vm.floppy_image_filename = buf;
|
||||
|
|
Loading…
Reference in New Issue