mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-21 18:03:38 +03:00
feature qemu: Add support for qemu emulator in LibVirtDriver
This commit is contained in:
parent
8b84eb8fa2
commit
a59441392a
@ -50,7 +50,7 @@ private:
|
||||
{
|
||||
int rc = -1;
|
||||
|
||||
if (emulator == "kvm")
|
||||
if (emulator == "kvm" || emulator == "qemu" )
|
||||
{
|
||||
rc = deployment_description_kvm(vm,file_name);
|
||||
}
|
||||
|
@ -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",
|
||||
|
@ -196,10 +196,7 @@ int LibVirtDriver::deployment_description_kvm(
|
||||
}
|
||||
}
|
||||
|
||||
if (emulator == "kvm")
|
||||
{
|
||||
file << "\t\t<type arch='" << arch << "'>hvm</type>" << endl;
|
||||
}
|
||||
|
||||
if ( kernel.empty() )
|
||||
{
|
||||
@ -274,8 +271,6 @@ int LibVirtDriver::deployment_description_kvm(
|
||||
// ------------------------------------------------------------------------
|
||||
file << "\t<devices>" << endl;
|
||||
|
||||
if (emulator == "kvm")
|
||||
{
|
||||
get_default("EMULATOR",emulator_path);
|
||||
|
||||
if(emulator_path.empty())
|
||||
@ -284,7 +279,6 @@ int LibVirtDriver::deployment_description_kvm(
|
||||
}
|
||||
|
||||
file << "\t\t<emulator>" << emulator_path << "</emulator>" << endl;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Disks
|
||||
|
@ -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(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user