mirror of https://github.com/BOINC/boinc.git
vboxwrapper: small code cleanup
This commit is contained in:
parent
355c911d9b
commit
e2e08e313d
|
@ -73,61 +73,56 @@ public:
|
||||||
VBOX_VM();
|
VBOX_VM();
|
||||||
~VBOX_VM();
|
~VBOX_VM();
|
||||||
|
|
||||||
// Virtualbox Home Directory
|
|
||||||
std::string virtualbox_home_directory;
|
std::string virtualbox_home_directory;
|
||||||
// Virtualbox Install Directory
|
|
||||||
std::string virtualbox_install_directory;
|
std::string virtualbox_install_directory;
|
||||||
// Virtualbox Guest Additions
|
|
||||||
std::string virtualbox_guest_additions;
|
std::string virtualbox_guest_additions;
|
||||||
// Virtualbox Version Information
|
|
||||||
std::string virtualbox_version;
|
std::string virtualbox_version;
|
||||||
|
|
||||||
// Floppy IO abstraction
|
|
||||||
FloppyIO* pFloppy;
|
FloppyIO* pFloppy;
|
||||||
|
|
||||||
// last polled copy of the log file
|
|
||||||
std::string vm_log;
|
std::string vm_log;
|
||||||
// last VM guest log entry detected
|
// last polled copy of the log file
|
||||||
VBOX_TIMESTAMP vm_log_timestamp;
|
VBOX_TIMESTAMP vm_log_timestamp;
|
||||||
// unique name for the VM
|
// last VM guest log entry detected
|
||||||
std::string vm_master_name;
|
std::string vm_master_name;
|
||||||
// unique description for the VM
|
// unique name for the VM
|
||||||
std::string vm_master_description;
|
std::string vm_master_description;
|
||||||
// unique name for the VM or UUID of a stale VM if deregistering a stale VM
|
// unique description for the VM
|
||||||
std::string vm_name;
|
std::string vm_name;
|
||||||
// required CPU core count
|
// unique name for the VM or UUID of a stale VM if deregistering it
|
||||||
std::string vm_cpu_count;
|
std::string vm_cpu_count;
|
||||||
|
// required CPU core count
|
||||||
std::string memory_size_mb;
|
std::string memory_size_mb;
|
||||||
// size of the memory allocation for the VM, in megabytes
|
// size of the memory allocation for the VM, in megabytes
|
||||||
// name of the virtual machine disk image file
|
|
||||||
std::string image_filename;
|
std::string image_filename;
|
||||||
// name of the virtual machine iso9660 disk image file
|
// name of the virtual machine disk image file
|
||||||
std::string iso_image_filename;
|
std::string iso_image_filename;
|
||||||
// name of the virtual machine cache disk image file
|
// name of the virtual machine iso9660 disk image file
|
||||||
std::string cache_disk_filename;
|
std::string cache_disk_filename;
|
||||||
// name of the virtual machine floppy disk image file
|
// name of the virtual machine cache disk image file
|
||||||
std::string floppy_image_filename;
|
std::string floppy_image_filename;
|
||||||
// amount of CPU time consumed by the VM (note: use get_vm_cpu_time())
|
// name of the virtual machine floppy disk image file
|
||||||
double current_cpu_time;
|
double current_cpu_time;
|
||||||
// is the VM suspended?
|
// amount of CPU time consumed by the VM (note: use get_vm_cpu_time())
|
||||||
bool suspended;
|
bool suspended;
|
||||||
// is network access temporarily suspended?
|
// is the VM suspended?
|
||||||
bool network_suspended;
|
bool network_suspended;
|
||||||
// is VM even online?
|
// is network access temporarily suspended?
|
||||||
bool online;
|
bool online;
|
||||||
// Is VM saving/restoring from checkpoint?
|
// is VM even online?
|
||||||
bool saving;
|
bool saving;
|
||||||
|
// Is VM saving from checkpoint?
|
||||||
bool restoring;
|
bool restoring;
|
||||||
// Has the VM crashed?
|
// Is VM restoring from checkpoint?
|
||||||
bool crashed;
|
bool crashed;
|
||||||
// whether to use CERN specific data structures
|
// Has the VM crashed?
|
||||||
bool enable_cern_dataformat;
|
bool enable_cern_dataformat;
|
||||||
// whether we were instructed to only register the VM.
|
// whether to use CERN specific data structures
|
||||||
// useful for debugging VMs.
|
|
||||||
bool register_only;
|
bool register_only;
|
||||||
// the following for optional remote desktop
|
// whether we were instructed to only register the VM.
|
||||||
|
// useful for debugging VMs.
|
||||||
int rd_host_port;
|
int rd_host_port;
|
||||||
// dynamically assigned
|
// for optional remote desktop; dynamically assigned
|
||||||
bool headless;
|
bool headless;
|
||||||
|
|
||||||
/////////// THE FOLLOWING SPECIFIED IN VBOX_JOB.XML //////////////
|
/////////// THE FOLLOWING SPECIFIED IN VBOX_JOB.XML //////////////
|
||||||
|
|
|
@ -829,12 +829,10 @@ int main(int argc, char** argv) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (vm.enable_cache_disk) {
|
if (vm.enable_cache_disk) {
|
||||||
sprintf(buf, "%s.%s", CACHE_DISK_FILENAME, CACHE_DISK_FILENAME_EXTENSION);
|
vm.cache_disk_filename = CACHE_DISK_FILENAME;
|
||||||
vm.cache_disk_filename = buf;
|
|
||||||
}
|
}
|
||||||
if (vm.enable_isocontextualization) {
|
if (vm.enable_isocontextualization) {
|
||||||
sprintf(buf, "%s.%s", ISO_IMAGE_FILENAME, ISO_IMAGE_FILENAME_EXTENSION);
|
vm.iso_image_filename = ISO_IMAGE_FILENAME;
|
||||||
vm.iso_image_filename = buf;
|
|
||||||
}
|
}
|
||||||
if (aid.ncpus > 1.0 || ncpus > 1.0) {
|
if (aid.ncpus > 1.0 || ncpus > 1.0) {
|
||||||
if (ncpus) {
|
if (ncpus) {
|
||||||
|
|
|
@ -26,10 +26,8 @@
|
||||||
#define IMAGE_FILENAME_EXTENSION "vdi"
|
#define IMAGE_FILENAME_EXTENSION "vdi"
|
||||||
#define FLOPPY_IMAGE_FILENAME "vm_floppy"
|
#define FLOPPY_IMAGE_FILENAME "vm_floppy"
|
||||||
#define FLOPPY_IMAGE_FILENAME_EXTENSION "img"
|
#define FLOPPY_IMAGE_FILENAME_EXTENSION "img"
|
||||||
#define CACHE_DISK_FILENAME "vm_cache"
|
#define CACHE_DISK_FILENAME "vm_cache.vdi"
|
||||||
#define CACHE_DISK_FILENAME_EXTENSION "vdi"
|
#define ISO_IMAGE_FILENAME "vm_isocontext.iso"
|
||||||
#define ISO_IMAGE_FILENAME "vm_isocontext"
|
|
||||||
#define ISO_IMAGE_FILENAME_EXTENSION "iso"
|
|
||||||
#define JOB_FILENAME "vbox_job.xml"
|
#define JOB_FILENAME "vbox_job.xml"
|
||||||
#define CHECKPOINT_FILENAME "vbox_checkpoint.txt"
|
#define CHECKPOINT_FILENAME "vbox_checkpoint.txt"
|
||||||
#define REMOTEDESKTOP_FILENAME "vbox_remote_desktop.xml"
|
#define REMOTEDESKTOP_FILENAME "vbox_remote_desktop.xml"
|
||||||
|
|
Loading…
Reference in New Issue