Hi everyone,
I wrote some code to run a VM on a IBM POWER host, but I stumbled in some
issues that will need a little bit of refactoring in the current code and I
would like some feedback.
The first issue is that KVM on POWER requires a special SCSI interface (called
SPAPR), which is not available in x86-64. Currently I'm solving this problem by
using (in the VmInfoBuilder class):
if (vm.getArchitecture().equals(ArchitectureType.ppc64)) {
Map<String, Object> struct = new HashMap<String, Object>();
struct.put(VdsProperties.Type, VmDeviceType.CONTROLLER.getName());
struct.put(VdsProperties.Device, VdsProperties.Scsi);
// Create a controller in the index 1, the VirtIO_SCSI interface is
in index 0
struct.put(VdsProperties.Index, "1");
Map<String, String> spaprAddress = new HashMap<String, String>();
spaprAddress.put("type", "spapr-vio");
struct.put(VdsProperties.Address, spaprAddress);
devices.add(struct);
}
But this is a poor solution, because this class would be polluted by
architectural differences. Another thing to notice is that since in IBM POWER
there are two SCSI controllers, all the SCSI devices must have their SCSI
address explicitly defined (it was not needed before, since there was just one
controller before). It was proposed that a "strategy" class could solve the
problem, but I would like to have some feedback on which package it should be,
since it will also be used in the bll package to validate other stuff.
The second issue is that the CD-ROM interface is SCSI on POWER guests (and must
be attached to the SPAPR interface) and IDE on the x86_64, this information
could be retrieved from the osinfo (by creating a property there) or It could
be hard-coded in the strategy class.
Which would be the best way to handle this difference?
The third and final issue is that when the VNC protocol is used in a VM, by
default a Cirrus Logic VGA device is created. This device is not supported on
POWER guests, but the standard VGA device is. I made a workaround, but the
issue is where to put this association between the device type and the display
protocol.
Should it also be a property in the osinfo? Or it should be handled in the
strategy class?
_______________________________________________
Engine-devel mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-devel