Add explicit setting to VMware VM to allow device hot-plug

This commit is contained in:
Kelven Yang 2011-09-07 18:22:02 -07:00
parent 7ce4aa1d23
commit 36eb4651ce
1 changed files with 5 additions and 1 deletions

View File

@ -1295,11 +1295,15 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
vmConfigSpec.setDeviceChange(deviceConfigSpecArray);
// pass boot arguments through machine.id
OptionValue[] machineIdOptions = new OptionValue[1];
OptionValue[] machineIdOptions = new OptionValue[2];
machineIdOptions[0] = new OptionValue();
machineIdOptions[0].setKey("machine.id");
machineIdOptions[0].setValue(vmSpec.getBootArgs());
machineIdOptions[1] = new OptionValue();
machineIdOptions[1].setKey("devices.hotplug");
machineIdOptions[1].setValue("true");
String keyboardLayout = null;
if(vmSpec.getDetails() != null)
keyboardLayout = vmSpec.getDetails().get(VmDetailConstants.KEYBOARD);