Background:

BootArgs, aka bootArgs, aka bootargs,  are an optional property of a virtual machine. If there are boot args in a VirtualMachineProfile, a hypervisor plugin will do it's best to pass these arguments to the VM being created at boot time.

Whether BootArgs are present in a VirtualMachineProfile depends on the VirtualMachineGuru handling the virtual machine type. E.g. VMs of type VirtualMachine.Type.SecondaryStorageVm have bootArgs. These are defined by the SecondaryStorageManagerImpl class, which provides VirtualMachineGuru methods for this VM type. On the other hand, no bootArgs are added VMs of type VirtualMachine.Type.User by their VirtualMachineGuru (see UserVmManager.finalizeVirtualMachineProfile).

The mechanism used to pass bootArgs is hypervisor-specific.

Feature:

BootArgs Support for Hyper-V with KVP Data Exchange

Spec:

Use the Hyper-V KVP (Key Value Pair) Data Exchange mechanism to pass up a UTF-8 encoded string of up to 2048 bytes to a guest VM.

Guest VMs must have Hyper-V integration services installed in order to receive this data. These services are available in Windows and Linux.

Implementation:

Use the KVP Exchange Mechanism to transport bootArg to the guest VM. For details, see this technical summary.

For consistency with KVM's KVP data exchange, use the same key for bootArgs data.

Add KVP Exchange to deployVirtualMachine command's implementation.

Development environment

Use the minimal Hyper-V plugin identified in https://reviews.apache.org/r/13922/

Develop feature in https://github.com/lafferty/cloudstack/tree/hyperv_plugin, migrate to Hyper-V Plugin branch of ASF source tree.

Test environment

Provide automated KVP Data Exchange in unit tests. Java version required, C# version desirable.

Integration test by creating a VM with guest services installed, verify that bootArgs was passed correctly.

  • No labels