diff --git a/src/vmm/LibVirtDriverKVM.cc b/src/vmm/LibVirtDriverKVM.cc index 4fdd14a4c1..641617ed3f 100644 --- a/src/vmm/LibVirtDriverKVM.cc +++ b/src/vmm/LibVirtDriverKVM.cc @@ -41,6 +41,7 @@ int LibVirtDriver::deployment_description_kvm( string root = ""; string kernel_cmd = ""; string bootloader = ""; + string arch = ""; const VectorAttribute * disk; const VectorAttribute * context; @@ -142,11 +143,6 @@ int LibVirtDriver::deployment_description_kvm( file << "\t" << endl; - if (emulator == "kvm") - { - file << "\t\thvm" << endl; - } - num = vm->get_template_attribute("OS",attrs); // Get values & defaults @@ -165,9 +161,20 @@ int LibVirtDriver::deployment_description_kvm( root = os->vector_value("ROOT"); kernel_cmd = os->vector_value("KERNEL_CMD"); bootloader = os->vector_value("BOOTLOADER"); + arch = os->vector_value("ARCH"); } } + if ( arch.empty() ) + { + get_default("OS","ARCH",arch); + } + + if (emulator == "kvm") + { + file << "\t\thvm" << endl; + } + if ( kernel.empty() ) { get_default("OS","KERNEL",kernel); diff --git a/src/vmm_mad/ssh/vmm_ssh_kvm.conf b/src/vmm_mad/ssh/vmm_ssh_kvm.conf index 17b50215d5..fc11a10ca9 100644 --- a/src/vmm_mad/ssh/vmm_ssh_kvm.conf +++ b/src/vmm_mad/ssh/vmm_ssh_kvm.conf @@ -1,7 +1,7 @@ # Default configuration attributes for the KVM driver # (all domains will use these values as defaults) # Valid atributes are: -# - os [kernel,initrd,boot,root,kernel_cmd] +# - os [kernel,initrd,boot,root,kernel_cmd,arch] # - memory # - cpu # - vcpu @@ -10,7 +10,7 @@ #VCPU = 1 #MEMORY = 128 -OS = [ boot = "hd" ] +OS = [ boot = "hd", arch = "i686" ] FEATURES = [ PAE = "no", ACPI = "yes" ] DISK = [ driver = "raw" ]