diff --git a/include/LibVirtDriver.h b/include/LibVirtDriver.h
index 97945b6361..3970076ebd 100644
--- a/include/LibVirtDriver.h
+++ b/include/LibVirtDriver.h
@@ -41,16 +41,16 @@ public:
private:
static const char * vmware_vnm_name;
-
+
static const float CGROUP_BASE_CPU_SHARES;
-
+
int deployment_description(
const VirtualMachine * vm,
const string& file_name) const
{
int rc = -1;
- if (emulator == "kvm")
+ if (emulator == "kvm" || emulator == "qemu" )
{
rc = deployment_description_kvm(vm,file_name);
}
diff --git a/share/etc/oned.conf b/share/etc/oned.conf
index b1ebc2bee4..784d65b0ab 100644
--- a/share/etc/oned.conf
+++ b/share/etc/oned.conf
@@ -223,6 +223,9 @@ IM_MAD = [
# overridden for each action.
# Valid actions: deploy, shutdown, cancel, save, restore, migrate, poll
# An example: "-l migrate,poll=poll_ganglia,save"
+#
+# Note: You can use type = "qemu" to use qemu emulated guests, e.g. if your
+# CPU does not have virtualization extensions or use nested Qemu-KVM hosts
#-------------------------------------------------------------------------------
VM_MAD = [
name = "kvm",
diff --git a/src/vmm/LibVirtDriverKVM.cc b/src/vmm/LibVirtDriverKVM.cc
index 7debfb0af8..29bbf22927 100644
--- a/src/vmm/LibVirtDriverKVM.cc
+++ b/src/vmm/LibVirtDriverKVM.cc
@@ -196,10 +196,7 @@ int LibVirtDriver::deployment_description_kvm(
}
}
- if (emulator == "kvm")
- {
- file << "\t\thvm" << endl;
- }
+ file << "\t\thvm" << endl;
if ( kernel.empty() )
{
@@ -274,18 +271,15 @@ int LibVirtDriver::deployment_description_kvm(
// ------------------------------------------------------------------------
file << "\t" << endl;
- if (emulator == "kvm")
+ get_default("EMULATOR",emulator_path);
+
+ if(emulator_path.empty())
{
- get_default("EMULATOR",emulator_path);
-
- if(emulator_path.empty())
- {
- emulator_path = "/usr/bin/kvm";
- }
-
- file << "\t\t" << emulator_path << "" << endl;
+ emulator_path = "/usr/bin/kvm";
}
+ file << "\t\t" << emulator_path << "" << endl;
+
// ------------------------------------------------------------------------
// Disks
// ------------------------------------------------------------------------
diff --git a/src/vmm/VirtualMachineManager.cc b/src/vmm/VirtualMachineManager.cc
index 3ec43d92d1..fced901afa 100644
--- a/src/vmm/VirtualMachineManager.cc
+++ b/src/vmm/VirtualMachineManager.cc
@@ -2230,6 +2230,11 @@ void VirtualMachineManager::load_mads(int uid)
vmm_driver = new LibVirtDriver(uid, vattr->value(),
(uid != 0),vmpool,"kvm");
}
+ else if ( type == "QEMU" )
+ {
+ vmm_driver = new LibVirtDriver(uid, vattr->value(),
+ (uid != 0),vmpool,"qemu");
+ }
else if ( type == "VMWARE" )
{
vmm_driver = new LibVirtDriver(uid, vattr->value(),