From e5d79176d55e1b3d06f714a6ab8bc8e905a9ec1b Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Wed, 5 Feb 2014 17:07:45 +0100 Subject: [PATCH 01/13] feature #1762: add pae, acpi, apic options to xen --- src/vmm/XenDriver.cc | 69 +++++++++++++++++++++++++++++ src/vmm_mad/exec/vmm_exec_xen4.conf | 2 + 2 files changed, 71 insertions(+) diff --git a/src/vmm/XenDriver.cc b/src/vmm/XenDriver.cc index c93104ed0d..5b0617f7c0 100644 --- a/src/vmm/XenDriver.cc +++ b/src/vmm/XenDriver.cc @@ -21,6 +21,12 @@ #include #include + +string on_off_string(bool value) +{ + return value? "1" : "0"; +} + int XenDriver::deployment_description( const VirtualMachine * vm, const string& file_name) const @@ -76,6 +82,16 @@ int XenDriver::deployment_description( string passwd = ""; string keymap = ""; + const VectorAttribute * features; + + bool pae = false; + bool acpi = false; + bool apic = false; + + int pae_found = -1; + int acpi_found = -1; + int apic_found = -1; + const VectorAttribute * raw; string data; string default_raw; @@ -577,6 +593,59 @@ int XenDriver::deployment_description( attrs.clear(); + // ------------------------------------------------------------------------ + // Features (only for HVM) + // ------------------------------------------------------------------------ + + if ( is_hvm ) + { + num = vm->get_template_attribute("FEATURES",attrs); + + if ( num > 0 ) + { + features = dynamic_cast(attrs[0]); + + if ( features != 0 ) + { + pae_found = features->vector_value("PAE", pae); + acpi_found = features->vector_value("ACPI", acpi); + apic_found = features->vector_value("APIC", apic); + } + } + + if ( pae_found != 0 && get_default("FEATURES", "PAE", pae) ) + { + pae_found = 0; + } + + if ( acpi_found != 0 && get_default("FEATURES", "ACPI", acpi) ) + { + acpi_found = 0; + } + + if ( apic_found != 0 && get_default("FEATURES", "APIC", apic) ) + { + apic_found = 0; + } + + if ( pae_found == 0) + { + file << "pae = " << on_off_string(pae) << endl; + } + + if ( acpi_found == 0) + { + file << "acpi = " << on_off_string(acpi) << endl; + } + + if ( apic_found == 0) + { + file << "apic = " << on_off_string(apic) << endl; + } + + attrs.clear(); + } + // ------------------------------------------------------------------------ // Raw XEN attributes // ------------------------------------------------------------------------ diff --git a/src/vmm_mad/exec/vmm_exec_xen4.conf b/src/vmm_mad/exec/vmm_exec_xen4.conf index 77fd4624a0..3b10fc961d 100644 --- a/src/vmm_mad/exec/vmm_exec_xen4.conf +++ b/src/vmm_mad/exec/vmm_exec_xen4.conf @@ -20,12 +20,14 @@ # - credit # - os [kernel,initrd,root,kernel_cmd,hvm] # - vcpu +# - features [acpi, pae, apic] # - disk[driver] # - nic[model] # - raw #VCPU = 1 #OS = [ kernel="/vmlinuz", initrd="/initrd.img", root="sda1", kernel_cmd="ro", hvm="yes" ] +#FEATURES = [ PAE = "no", ACPI = "yes", APIC = "yes" ] CREDIT = 256 DISK = [ driver = "raw:" ] From 6494e8086bd9281bd6c1a3b74ccae66357aee394 Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Wed, 5 Feb 2014 17:17:08 +0100 Subject: [PATCH 02/13] feature #1762: add apic feature to kvm --- src/vmm/LibVirtDriverKVM.cc | 15 ++++++++++++++- src/vmm_mad/exec/vmm_exec_kvm.conf | 4 ++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/vmm/LibVirtDriverKVM.cc b/src/vmm/LibVirtDriverKVM.cc index 93e01caa85..fb64704792 100644 --- a/src/vmm/LibVirtDriverKVM.cc +++ b/src/vmm/LibVirtDriverKVM.cc @@ -96,9 +96,11 @@ int LibVirtDriver::deployment_description_kvm( bool pae = false; bool acpi = false; + bool apic = false; int pae_found = -1; int acpi_found = -1; + int apic_found = -1; const VectorAttribute * raw; string default_raw; @@ -720,6 +722,7 @@ int LibVirtDriver::deployment_description_kvm( { pae_found = features->vector_value("PAE", pae); acpi_found = features->vector_value("ACPI", acpi); + apic_found = features->vector_value("APIC", apic); } } @@ -733,7 +736,12 @@ int LibVirtDriver::deployment_description_kvm( get_default("FEATURES", "ACPI", acpi); } - if( acpi || pae ) + if ( apic_found != 0 ) + { + get_default("FEATURES", "APIC", apic); + } + + if( acpi || pae || apic ) { file << "\t" << endl; @@ -747,6 +755,11 @@ int LibVirtDriver::deployment_description_kvm( file << "\t\t" << endl; } + if ( apic ) + { + file << "\t\t" << endl; + } + file << "\t" << endl; } diff --git a/src/vmm_mad/exec/vmm_exec_kvm.conf b/src/vmm_mad/exec/vmm_exec_kvm.conf index 4f3bb432da..07764bd559 100644 --- a/src/vmm_mad/exec/vmm_exec_kvm.conf +++ b/src/vmm_mad/exec/vmm_exec_kvm.conf @@ -20,7 +20,7 @@ # - emulator # - os [kernel,initrd,boot,root,kernel_cmd,arch] # - vcpu -# - features [acpi, pae] +# - features [acpi, pae, apic] # - disk [driver, cache, io] # - nic [filter, model] # - raw @@ -31,7 +31,7 @@ #VCPU = 1 OS = [ boot = "hd", arch = "i686" ] -FEATURES = [ PAE = "no", ACPI = "yes" ] +FEATURES = [ PAE = "no", ACPI = "yes", APIC = "no" ] DISK = [ driver = "raw" , cache = "none"] From 91dcb0648406cf8197788434d0048eb0cac785b7 Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Wed, 5 Feb 2014 18:18:44 +0100 Subject: [PATCH 03/13] feature #1762: add tablet usb input to xen --- src/vmm/XenDriver.cc | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/vmm/XenDriver.cc b/src/vmm/XenDriver.cc index 5b0617f7c0..3c29866dc9 100644 --- a/src/vmm/XenDriver.cc +++ b/src/vmm/XenDriver.cc @@ -82,6 +82,10 @@ int XenDriver::deployment_description( string passwd = ""; string keymap = ""; + const VectorAttribute * input; + + string bus = ""; + const VectorAttribute * features; bool pae = false; @@ -593,6 +597,34 @@ int XenDriver::deployment_description( attrs.clear(); + // ------------------------------------------------------------------------ + // Input (only usb tablet) + // ------------------------------------------------------------------------ + + if ( vm->get_template_attribute("INPUT",attrs) > 0 ) + { + input = dynamic_cast(attrs[0]); + + if ( input != 0 ) + { + type = input->vector_value("TYPE"); + bus = input->vector_value("BUS"); + + if ( type == "tablet" && bus == "usb" ) + { + file << "usb = 1" << endl; + file << "usbdevice = 'tablet'" << endl; + } + else + { + vm->log("VMM", Log::WARNING, + "Not supported input, only usb tablet, ignored."); + } + } + } + + attrs.clear(); + // ------------------------------------------------------------------------ // Features (only for HVM) // ------------------------------------------------------------------------ From 869b6d5ddd2606851c9792b44c15adfbff9c5e68 Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Thu, 6 Feb 2014 11:43:33 +0100 Subject: [PATCH 04/13] feature #1762: add device_model to xen features --- src/vmm/XenDriver.cc | 22 ++++++++++++++++++++++ src/vmm_mad/exec/vmm_exec_xen4.conf | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/vmm/XenDriver.cc b/src/vmm/XenDriver.cc index 3c29866dc9..35ff90b7ed 100644 --- a/src/vmm/XenDriver.cc +++ b/src/vmm/XenDriver.cc @@ -91,10 +91,12 @@ int XenDriver::deployment_description( bool pae = false; bool acpi = false; bool apic = false; + string device_model = ""; int pae_found = -1; int acpi_found = -1; int apic_found = -1; + int device_model_found = -1; const VectorAttribute * raw; string data; @@ -642,6 +644,12 @@ int XenDriver::deployment_description( pae_found = features->vector_value("PAE", pae); acpi_found = features->vector_value("ACPI", acpi); apic_found = features->vector_value("APIC", apic); + + device_model = features->vector_value("DEVICE_MODEL"); + if ( device_model != "" ) + { + device_model_found = 0; + } } } @@ -660,6 +668,15 @@ int XenDriver::deployment_description( apic_found = 0; } + if ( device_model_found != 0 ) + { + get_default("FEATURES", "DEVICE_MODEL", device_model); + if ( device_model != "" ) + { + device_model_found = 0; + } + } + if ( pae_found == 0) { file << "pae = " << on_off_string(pae) << endl; @@ -675,6 +692,11 @@ int XenDriver::deployment_description( file << "apic = " << on_off_string(apic) << endl; } + if ( device_model_found == 0) + { + file << "device_model = '" << device_model << "'" << endl; + } + attrs.clear(); } diff --git a/src/vmm_mad/exec/vmm_exec_xen4.conf b/src/vmm_mad/exec/vmm_exec_xen4.conf index 3b10fc961d..534612fa46 100644 --- a/src/vmm_mad/exec/vmm_exec_xen4.conf +++ b/src/vmm_mad/exec/vmm_exec_xen4.conf @@ -20,7 +20,7 @@ # - credit # - os [kernel,initrd,root,kernel_cmd,hvm] # - vcpu -# - features [acpi, pae, apic] +# - features [acpi, pae, apic, device_model] # - disk[driver] # - nic[model] # - raw From b2332e1250283158fdb49e8150f07733dcd31c76 Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Thu, 6 Feb 2014 15:29:43 +0100 Subject: [PATCH 05/13] feature #2143: add machine type to KVM deployment file Based on a patch submited by Vladislav Gorbunov in http://dev.opennebula.org/issues/2143#note-2 --- src/vmm/LibVirtDriverKVM.cc | 16 +++++++++++++++- src/vmm_mad/exec/vmm_exec_kvm.conf | 2 +- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/vmm/LibVirtDriverKVM.cc b/src/vmm/LibVirtDriverKVM.cc index fb64704792..d404e8e8dd 100644 --- a/src/vmm/LibVirtDriverKVM.cc +++ b/src/vmm/LibVirtDriverKVM.cc @@ -46,6 +46,7 @@ int LibVirtDriver::deployment_description_kvm( string kernel_cmd = ""; string bootloader = ""; string arch = ""; + string machine = ""; vector boots; @@ -190,6 +191,7 @@ int LibVirtDriver::deployment_description_kvm( kernel_cmd = os->vector_value("KERNEL_CMD"); bootloader = os->vector_value("BOOTLOADER"); arch = os->vector_value("ARCH"); + machine = os->vector_value("MACHINE"); } } @@ -203,7 +205,19 @@ int LibVirtDriver::deployment_description_kvm( } } - file << "\t\thvm" << endl; + if ( machine.empty() ) + { + get_default("OS", "MACHINE", machine); + } + + file << "\t\thvm" << endl; if ( kernel.empty() ) { diff --git a/src/vmm_mad/exec/vmm_exec_kvm.conf b/src/vmm_mad/exec/vmm_exec_kvm.conf index 07764bd559..c3c1961498 100644 --- a/src/vmm_mad/exec/vmm_exec_kvm.conf +++ b/src/vmm_mad/exec/vmm_exec_kvm.conf @@ -18,7 +18,7 @@ # (all domains will use these values as defaults). These values can # be overridden in each VM template. Valid atributes are: # - emulator -# - os [kernel,initrd,boot,root,kernel_cmd,arch] +# - os [kernel,initrd,boot,root,kernel_cmd,arch,machine] # - vcpu # - features [acpi, pae, apic] # - disk [driver, cache, io] From 965ec46234729a8b6a0fc4becc50c79149dc937b Mon Sep 17 00:00:00 2001 From: Michael Kutzner Date: Fri, 7 Feb 2014 16:37:40 +0100 Subject: [PATCH 06/13] feature #2567: add KVM hyperv feature Signed-off-by: Javi Fontan --- src/sunstone/public/js/plugins/templates-tab.js | 15 +++++++++++++++ src/vmm/LibVirtDriverKVM.cc | 15 ++++++++++++++- src/vmm_mad/exec/vmm_exec_kvm.conf | 2 +- 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/src/sunstone/public/js/plugins/templates-tab.js b/src/sunstone/public/js/plugins/templates-tab.js index cfd8296740..b42fe88b5b 100644 --- a/src/sunstone/public/js/plugins/templates-tab.js +++ b/src/sunstone/public/js/plugins/templates-tab.js @@ -2655,6 +2655,21 @@ function add_osTab(dialog) { '
'+tr("Add support in the VM for Physical Address Extension (PAE)")+'
'+ ''+ ''+ + '
'+ + '
'+ + ''+ + '
'+ + '
'+ + ''+ + '
'+ + '
'+ + '
'+tr("Add support in the VM for hyper-v features (HYPERV)")+'
'+ + '
'+ + '
'+ ''+ '
'+ '
'+ diff --git a/src/vmm/LibVirtDriverKVM.cc b/src/vmm/LibVirtDriverKVM.cc index d404e8e8dd..c8083b22f8 100644 --- a/src/vmm/LibVirtDriverKVM.cc +++ b/src/vmm/LibVirtDriverKVM.cc @@ -98,10 +98,12 @@ int LibVirtDriver::deployment_description_kvm( bool pae = false; bool acpi = false; bool apic = false; + bool hyperv = false; int pae_found = -1; int acpi_found = -1; int apic_found = -1; + int hyperv_found = -1; const VectorAttribute * raw; string default_raw; @@ -737,6 +739,7 @@ int LibVirtDriver::deployment_description_kvm( pae_found = features->vector_value("PAE", pae); acpi_found = features->vector_value("ACPI", acpi); apic_found = features->vector_value("APIC", apic); + hyperv_found = features->vector_value("HYPERV", hyperv); } } @@ -755,7 +758,12 @@ int LibVirtDriver::deployment_description_kvm( get_default("FEATURES", "APIC", apic); } - if( acpi || pae || apic ) + if ( hyperv_found != 0 ) + { + get_default("FEATURES", "HYPERV", hyperv); + } + + if( acpi || pae || apic || hyperv ) { file << "\t" << endl; @@ -774,6 +782,11 @@ int LibVirtDriver::deployment_description_kvm( file << "\t\t" << endl; } + if ( hyperv ) + { + file << "\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t" << endl; + } + file << "\t" << endl; } diff --git a/src/vmm_mad/exec/vmm_exec_kvm.conf b/src/vmm_mad/exec/vmm_exec_kvm.conf index c3c1961498..dc762a2e9c 100644 --- a/src/vmm_mad/exec/vmm_exec_kvm.conf +++ b/src/vmm_mad/exec/vmm_exec_kvm.conf @@ -31,7 +31,7 @@ #VCPU = 1 OS = [ boot = "hd", arch = "i686" ] -FEATURES = [ PAE = "no", ACPI = "yes", APIC = "no" ] +FEATURES = [ PAE = "no", ACPI = "yes", APIC = "no", HYPERV="no" ] DISK = [ driver = "raw" , cache = "none"] From 1c5111e0ed94c89f678c3671b554b2bea41294b4 Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Fri, 7 Feb 2014 17:26:43 +0100 Subject: [PATCH 07/13] feature #2567: move hyperv options to kvm config file --- src/vmm/LibVirtDriverKVM.cc | 30 ++++++++++++++++++------------ src/vmm_mad/exec/vmm_exec_kvm.conf | 7 +++++-- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/src/vmm/LibVirtDriverKVM.cc b/src/vmm/LibVirtDriverKVM.cc index c8083b22f8..6f5c476e92 100644 --- a/src/vmm/LibVirtDriverKVM.cc +++ b/src/vmm/LibVirtDriverKVM.cc @@ -95,15 +95,17 @@ int LibVirtDriver::deployment_description_kvm( const VectorAttribute * features; - bool pae = false; - bool acpi = false; - bool apic = false; + bool pae = false; + bool acpi = false; + bool apic = false; bool hyperv = false; - int pae_found = -1; - int acpi_found = -1; - int apic_found = -1; - int hyperv_found = -1; + int pae_found = -1; + int acpi_found = -1; + int apic_found = -1; + int hyperv_found = -1; + + string hyperv_options = ""; const VectorAttribute * raw; string default_raw; @@ -736,10 +738,10 @@ int LibVirtDriver::deployment_description_kvm( if ( features != 0 ) { - pae_found = features->vector_value("PAE", pae); - acpi_found = features->vector_value("ACPI", acpi); - apic_found = features->vector_value("APIC", apic); - hyperv_found = features->vector_value("HYPERV", hyperv); + pae_found = features->vector_value("PAE", pae); + acpi_found = features->vector_value("ACPI", acpi); + apic_found = features->vector_value("APIC", apic); + hyperv_found= features->vector_value("HYPERV", hyperv); } } @@ -784,7 +786,11 @@ int LibVirtDriver::deployment_description_kvm( if ( hyperv ) { - file << "\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t" << endl; + get_default("HYPERV_OPTIONS", hyperv_options); + + file << "\t\t" << endl; + file << hyperv_options << endl; + file << "\t\t" << endl; } file << "\t" << endl; diff --git a/src/vmm_mad/exec/vmm_exec_kvm.conf b/src/vmm_mad/exec/vmm_exec_kvm.conf index dc762a2e9c..e78ab9957e 100644 --- a/src/vmm_mad/exec/vmm_exec_kvm.conf +++ b/src/vmm_mad/exec/vmm_exec_kvm.conf @@ -20,10 +20,11 @@ # - emulator # - os [kernel,initrd,boot,root,kernel_cmd,arch,machine] # - vcpu -# - features [acpi, pae, apic] +# - features [acpi, pae, apic, hyperv] # - disk [driver, cache, io] # - nic [filter, model] # - raw +# - hyperv_options: options used for FEATURES = [ HYPERV = yes ] # NOTE: raw attribute value is appended to that on the VM template #EMULATOR = /usr/libexec/qemu-kvm @@ -31,9 +32,11 @@ #VCPU = 1 OS = [ boot = "hd", arch = "i686" ] -FEATURES = [ PAE = "no", ACPI = "yes", APIC = "no", HYPERV="no" ] +FEATURES = [ PAE = "no", ACPI = "yes", APIC = "no", HYPERV = "no" ] DISK = [ driver = "raw" , cache = "none"] #NIC = [ filter = "clean-traffic", model="virtio" ] #RAW = [ type = "kvm", data = "" ] + +HYPERV_OPTIONS="" From f9c6ac386e63543e6987c57e1bcf431c24544c30 Mon Sep 17 00:00:00 2001 From: Vladislav Gorbunov Date: Fri, 7 Feb 2014 18:58:11 +0100 Subject: [PATCH 08/13] feature #2547: add localtime feature to kvm Signed-off-by: Javi Fontan --- src/vmm/LibVirtDriverKVM.cc | 31 +++++++++++++++++++++--------- src/vmm_mad/exec/vmm_exec_kvm.conf | 2 +- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/src/vmm/LibVirtDriverKVM.cc b/src/vmm/LibVirtDriverKVM.cc index 6f5c476e92..587462147c 100644 --- a/src/vmm/LibVirtDriverKVM.cc +++ b/src/vmm/LibVirtDriverKVM.cc @@ -95,15 +95,17 @@ int LibVirtDriver::deployment_description_kvm( const VectorAttribute * features; - bool pae = false; - bool acpi = false; - bool apic = false; - bool hyperv = false; + bool pae = false; + bool acpi = false; + bool apic = false; + bool hyperv = false; + bool localtime = false; int pae_found = -1; int acpi_found = -1; int apic_found = -1; int hyperv_found = -1; + int localtime_found = -1; string hyperv_options = ""; @@ -738,10 +740,11 @@ int LibVirtDriver::deployment_description_kvm( if ( features != 0 ) { - pae_found = features->vector_value("PAE", pae); - acpi_found = features->vector_value("ACPI", acpi); - apic_found = features->vector_value("APIC", apic); - hyperv_found= features->vector_value("HYPERV", hyperv); + pae_found = features->vector_value("PAE", pae); + acpi_found = features->vector_value("ACPI", acpi); + apic_found = features->vector_value("APIC", apic); + hyperv_found = features->vector_value("HYPERV", hyperv); + localtime_found = features->vector_value("LOCALTIME", localtime); } } @@ -765,7 +768,12 @@ int LibVirtDriver::deployment_description_kvm( get_default("FEATURES", "HYPERV", hyperv); } - if( acpi || pae || apic || hyperv ) + if ( localtime_found != 0 ) + { + get_default("FEATURES", "LOCALTIME", localtime); + } + + if ( acpi || pae || apic || hyperv ) { file << "\t" << endl; @@ -796,6 +804,11 @@ int LibVirtDriver::deployment_description_kvm( file << "\t" << endl; } + if ( localtime ) + { + file << "\t" << endl; + } + attrs.clear(); // ------------------------------------------------------------------------ diff --git a/src/vmm_mad/exec/vmm_exec_kvm.conf b/src/vmm_mad/exec/vmm_exec_kvm.conf index e78ab9957e..1a6f4e9e3c 100644 --- a/src/vmm_mad/exec/vmm_exec_kvm.conf +++ b/src/vmm_mad/exec/vmm_exec_kvm.conf @@ -20,7 +20,7 @@ # - emulator # - os [kernel,initrd,boot,root,kernel_cmd,arch,machine] # - vcpu -# - features [acpi, pae, apic, hyperv] +# - features [acpi, pae, apic, hyperv, localtime] # - disk [driver, cache, io] # - nic [filter, model] # - raw From e95fa8fb7eb2b7e1d5e49da146ecb5eb1589f55b Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Mon, 10 Feb 2014 16:56:04 +0100 Subject: [PATCH 09/13] feature #2485: add extra spice options to KVM --- src/vmm/LibVirtDriverKVM.cc | 19 +++++++++++++++---- src/vmm_mad/exec/vmm_exec_kvm.conf | 13 +++++++++++++ 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/src/vmm/LibVirtDriverKVM.cc b/src/vmm/LibVirtDriverKVM.cc index 587462147c..d3821d180d 100644 --- a/src/vmm/LibVirtDriverKVM.cc +++ b/src/vmm/LibVirtDriverKVM.cc @@ -86,10 +86,11 @@ int LibVirtDriver::deployment_description_kvm( const VectorAttribute * graphics; - string listen = ""; - string port = ""; - string passwd = ""; - string keymap = ""; + string listen = ""; + string port = ""; + string passwd = ""; + string keymap = ""; + string spice_options = ""; const VectorAttribute * input; @@ -686,6 +687,16 @@ int LibVirtDriver::deployment_description_kvm( } file << "/>" << endl; + + if ( type == "spice" ) + { + get_default("SPICE_OPTIONS", spice_options); + + if ( spice_options != "" ) + { + file << "\t\t" << spice_options << endl; + } + } } else { diff --git a/src/vmm_mad/exec/vmm_exec_kvm.conf b/src/vmm_mad/exec/vmm_exec_kvm.conf index 1a6f4e9e3c..8e068e40f7 100644 --- a/src/vmm_mad/exec/vmm_exec_kvm.conf +++ b/src/vmm_mad/exec/vmm_exec_kvm.conf @@ -40,3 +40,16 @@ DISK = [ driver = "raw" , cache = "none"] #RAW = [ type = "kvm", data = "" ] HYPERV_OPTIONS="" + +SPICE_OPTIONS=" + + + + + + + + " + From 859a85905d5c8950562d6dcb0c9814fd7c645f10 Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Mon, 17 Feb 2014 16:25:46 +0100 Subject: [PATCH 10/13] feature #2547: add localtime feature to Xen --- src/vmm/XenDriver.cc | 28 +++++++++++++++++++++------- src/vmm_mad/exec/vmm_exec_xen4.conf | 2 +- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/src/vmm/XenDriver.cc b/src/vmm/XenDriver.cc index 35ff90b7ed..3d1828dcc7 100644 --- a/src/vmm/XenDriver.cc +++ b/src/vmm/XenDriver.cc @@ -88,15 +88,17 @@ int XenDriver::deployment_description( const VectorAttribute * features; - bool pae = false; - bool acpi = false; - bool apic = false; + bool pae = false; + bool acpi = false; + bool apic = false; string device_model = ""; + bool localtime = false; - int pae_found = -1; - int acpi_found = -1; - int apic_found = -1; - int device_model_found = -1; + int pae_found = -1; + int acpi_found = -1; + int apic_found = -1; + int device_model_found = -1; + int localtime_found = -1; const VectorAttribute * raw; string data; @@ -644,6 +646,8 @@ int XenDriver::deployment_description( pae_found = features->vector_value("PAE", pae); acpi_found = features->vector_value("ACPI", acpi); apic_found = features->vector_value("APIC", apic); + localtime_found = + features->vector_value("LOCALTIME", localtime); device_model = features->vector_value("DEVICE_MODEL"); if ( device_model != "" ) @@ -677,6 +681,11 @@ int XenDriver::deployment_description( } } + if ( localtime_found != 0 ) + { + get_default("FEATURES", "LOCALTIME", localtime); + } + if ( pae_found == 0) { file << "pae = " << on_off_string(pae) << endl; @@ -697,6 +706,11 @@ int XenDriver::deployment_description( file << "device_model = '" << device_model << "'" << endl; } + if ( localtime ) + { + file << "localtime = 'yes'" << endl; + } + attrs.clear(); } diff --git a/src/vmm_mad/exec/vmm_exec_xen4.conf b/src/vmm_mad/exec/vmm_exec_xen4.conf index 534612fa46..eabf2dbc30 100644 --- a/src/vmm_mad/exec/vmm_exec_xen4.conf +++ b/src/vmm_mad/exec/vmm_exec_xen4.conf @@ -20,7 +20,7 @@ # - credit # - os [kernel,initrd,root,kernel_cmd,hvm] # - vcpu -# - features [acpi, pae, apic, device_model] +# - features [acpi, pae, apic, device_model, localtime] # - disk[driver] # - nic[model] # - raw From f31c6a7c146a7b7440ccc1e471db768c132537b6 Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Mon, 17 Feb 2014 19:27:58 +0100 Subject: [PATCH 11/13] feature #1762: add APIC option to sunstone --- src/sunstone/public/js/plugins/templates-tab.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/sunstone/public/js/plugins/templates-tab.js b/src/sunstone/public/js/plugins/templates-tab.js index b42fe88b5b..20496b9b54 100644 --- a/src/sunstone/public/js/plugins/templates-tab.js +++ b/src/sunstone/public/js/plugins/templates-tab.js @@ -2655,6 +2655,21 @@ function add_osTab(dialog) { '
'+tr("Add support in the VM for Physical Address Extension (PAE)")+'
'+ '
'+ '
'+ + '
'+ + '
'+ + ''+ + '
'+ + '
'+ + ''+ + '
'+ + '
'+ + '
'+tr("Enables the advanced programmable IRQ management.")+'
'+ + '
'+ + '
'+ '
'+ '
'+ ''+ From 2e1aba520aff2e3e1114199588838a2a36d0b9b0 Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Tue, 18 Feb 2014 10:34:33 +0100 Subject: [PATCH 12/13] feature #2547: add localtime to the template wizard --- src/sunstone/public/js/plugins/templates-tab.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/sunstone/public/js/plugins/templates-tab.js b/src/sunstone/public/js/plugins/templates-tab.js index 20496b9b54..0a70117b12 100644 --- a/src/sunstone/public/js/plugins/templates-tab.js +++ b/src/sunstone/public/js/plugins/templates-tab.js @@ -2685,6 +2685,21 @@ function add_osTab(dialog) { '
'+tr("Add support in the VM for hyper-v features (HYPERV)")+'
'+ '
'+ '
'+ + '
'+ + '
'+ + ''+ + '
'+ + '
'+ + ''+ + '
'+ + '
'+ + '
'+tr("The guest clock will be synchronized to the host's configured timezone when booted.")+'
'+ + '
'+ + '
'+ ''+ '
'+ '
'+ From dbc6120c1d61620aa074381f56bf17d244a88eab Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Tue, 18 Feb 2014 10:49:23 +0100 Subject: [PATCH 13/13] feature #1762: add device_model to template wizard --- src/sunstone/public/js/plugins/templates-tab.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/sunstone/public/js/plugins/templates-tab.js b/src/sunstone/public/js/plugins/templates-tab.js index 0a70117b12..0217de66c8 100644 --- a/src/sunstone/public/js/plugins/templates-tab.js +++ b/src/sunstone/public/js/plugins/templates-tab.js @@ -2700,6 +2700,17 @@ function add_osTab(dialog) { '
'+tr("The guest clock will be synchronized to the host's configured timezone when booted.")+'
'+ '
'+ '
'+ + '
'+ + '
'+ + ''+ + '
'+ + '
'+ + ''+ + '
'+ + '
'+ + '
'+tr("Used to change the IO emulator in Xen HVM. Only XEN.")+'
'+ + '
'+ + '
'+ ''+ '
'+ '
'+