From 1766ef02365f12e095dfbabe05a05cd87f75f560 Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Thu, 11 Oct 2012 23:00:36 +0200 Subject: [PATCH] bug #1550:Use system datastore ID from the host instead of that in the vmm_exec.vmware.conf --- src/vmm/LibVirtDriverVMware.cc | 32 +++++++++++---------------- src/vmm_mad/exec/vmm_exec_vmware.conf | 6 ----- 2 files changed, 13 insertions(+), 25 deletions(-) diff --git a/src/vmm/LibVirtDriverVMware.cc b/src/vmm/LibVirtDriverVMware.cc index 277c752008..37191fd749 100644 --- a/src/vmm/LibVirtDriverVMware.cc +++ b/src/vmm/LibVirtDriverVMware.cc @@ -52,7 +52,6 @@ int LibVirtDriver::deployment_description_vmware( string target = ""; string ro = ""; string source = ""; - string datastore = ""; string driver = ""; int disk_id; string default_driver = ""; @@ -67,7 +66,7 @@ int LibVirtDriver::deployment_description_vmware( string model = ""; const VectorAttribute * graphics; - + string listen = ""; string port = ""; string passwd = ""; @@ -179,11 +178,6 @@ int LibVirtDriver::deployment_description_vmware( num = vm->get_template_attribute("DISK",attrs); - if (num!=0) - { - get_default("DATASTORE", datastore); - } - for (int i=0; i < num ;i++) { disk = dynamic_cast(attrs[i]); @@ -227,26 +221,26 @@ int LibVirtDriver::deployment_description_vmware( if ( type == "BLOCK" ) { file << "\t\t" << endl; - file << "\t\t\tget_oid() + file << "\t\t\tget_ds_id() << "] " << vm->get_oid() << "/disk." << disk_id << "'/>" << endl; } else if ( type == "CDROM" ) { file << "\t\t" << endl; - file << "\t\t\tget_oid() + file << "\t\t\tget_ds_id() << "] " << vm->get_oid() << "/disk." << disk_id << ".iso'/>" << endl; } else { file << "\t\t" << endl - << "\t\t\tget_ds_id() <<"] " << vm->get_oid() << "/disk." << disk_id << "/disk.vmdk'/>" << endl; } // ---- target device to map the disk ---- file << "\t\t\t" << endl; - + // ---- Image Format using qemu driver ---- if ( !driver.empty() ) @@ -366,11 +360,11 @@ int LibVirtDriver::deployment_description_vmware( // ------------------------------------------------------------------------ if ( vm->get_template_attribute("GRAPHICS",attrs) > 0 ) - { + { graphics = dynamic_cast(attrs[0]); if ( graphics != 0 ) - { + { type = graphics->vector_value("TYPE"); listen = graphics->vector_value("LISTEN"); port = graphics->vector_value("PORT"); @@ -378,33 +372,33 @@ int LibVirtDriver::deployment_description_vmware( keymap = graphics->vector_value("KEYMAP"); if ( type == "vnc" || type == "VNC" ) - { + { file << "\t\t" << endl; } else - { + { vm->log("VMM", Log::WARNING, "Not supported graphics type, ignored."); } diff --git a/src/vmm_mad/exec/vmm_exec_vmware.conf b/src/vmm_mad/exec/vmm_exec_vmware.conf index 809c4ae1b5..a3b5e2a5b4 100644 --- a/src/vmm_mad/exec/vmm_exec_vmware.conf +++ b/src/vmm_mad/exec/vmm_exec_vmware.conf @@ -27,9 +27,3 @@ OS = [ ARCH = i686 ] #DISK = [ DRIVER = file ] -# Name of the system datastore in the remote VMware hypervisors -# mounting DATASTORE_LOCATION/var/datastore/0 exported as a nfs share -# by the OpenNebula front-end. This would need to be changed -# *only* with custom TM drivers - -DATASTORE = 0