New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLOUDSTACK-8854: Apple Mac OS/X VM get created without USB controller in ESXi hypervisors #828
Conversation
LGTM. |
@sateesh-chodapuneedi These changes were successfully tested on Apple hardware. When a VM is created with guest OS as Apple Mac OS, the USB controller (EHCI+UHCI) is added to the VM and enables the USB mouse and keyboard access. |
@sureshanaparti that sounds good. |
@@ -598,6 +601,19 @@ public static void setBasicVmConfig(VirtualMachineConfigSpec vmConfig, int cpuCo | |||
vmConfig.setGuestId(guestOsIdentifier); | |||
} | |||
|
|||
public static void addUSBController(VirtualMachineConfigSpec vmConfigSpec) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While it's alright, you can make this method addUSBController
return something rather than modify the passed in VirtualMachineConfigSpec, and add a small unit test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I'd second that idea.
let the method construct the spec of tyep VirtualDeviceConfigSpec for usb controller for us that could be added to vmConfig object at caller.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sateesh-chodapuneedi all the prepareXyzDevice() methods in VmwareHelper class returns VirtualDevice. So to be consistent, i think it is better to return a VirtualDevice when preparing USB controller and this device is added to the device config spec same as other devices.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sureshanaparti if other methods are like and you're simply follow those conventions, then it's fine though it becomes easier to test methods functionally if they return objects instead of modifying them. In either case, can you add a simple unit test for this. Thanks.
@bhaisaab @sateesh-chodapuneedi Update code as per the existing conventions. Please check. Working on the unit test. Thanks. |
cloudstack-pull-rats #651 SUCCESS |
cloudstack-pull-analysis #600 ABORTED |
@sureshanaparti LGTM, can you add a unit test for the new methods and rebase against latest master |
@sureshanaparti please rebase against latest master and push -f, update on status of your PR |
tag:vmware-pickup |
fd055b4
to
6929ac7
Compare
@rhtyd Rebased against latest master |
LGTM. This patch has been working well in production for over a year now. |
LGTM. |
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
LGTM. Verified manually in my VMware setup. |
@sureshanaparti @sateesh-chodapuneedi this looks like a useful patch, can you change the base branch of your PR to 4.9? |
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-292 |
… in ESXi hypervisors
6929ac7
to
309da6a
Compare
@rhtyd Changed base branch to 4.9. |
@blueorangutan help |
@karuturi I understand these words: "help", "hello", "thanks", "package", "test" Blessed contributors for kicking Trillian test jobs: ['rhtyd', 'jburwell', 'murali-reddy', 'abhinandanprateek', 'PaulAngus', 'borisstoyanov', 'karuturi'] |
@blueorangutan test centos6 vmware-55u3 |
@karuturi a Trillian-Jenkins test job (centos6 mgmt + vmware-55u3) has been kicked to run smoke tests |
Thanks @sureshanaparti |
Trillian test result (tid-520)
|
I looked at the failure, all of them are environment related or known intermittent failures. I'll proceed with merging this. LGTM. |
CLOUDSTACK-8854: Apple Mac OS/X VM get created without USB controller in ESXi hypervisorsCLOUDSTACK-8854: Apple Mac OS/X VM get created without USB controller in ESXi hypervisors Problem Description: CloudStack doesnt add a USB controller to the Apple Mac OS X VMs created in ESXi hypervisors. But, vSphere Client, by default, adds a USB Controller to the Mac OS VMs. Mac OS X machines require USB Controller for USB mouse and keyboard access. Root Cause: The Guest OS details are specified in the Virtual Machine Configuration Spec for creating the VM (using the SDK API) in the EXSi hypervisor. No USB Controller is added to the Virtual Machine Configuration Spec. As the guest OS Identification details are specified in the VM Configuration Spec, It is assumed that the Create VM SDK API would create the defaults in the VM same as vSphere Client. But, as per the observation, USB Controller is not added to the Guest OS - Mac OS VM created through the SDK API. Resolution: When the Guest OS is Apple Mac OS, Add the USB Controller (EHCI+UHCI - Mac supported) to the Virtual Machine Configuration Spec before Creating or Starting the VM. For any existing Mac OS VMs, Stop and Start to add the USB Controller. For new VMs with Mac OS, USB Controller is added automatically. * pr/828: CLOUDSTACK-8854: Apple Mac OS/X VM get created without USB controller in ESXi hypervisors Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
CLOUDSTACK-8854: Apple Mac OS/X VM get created without USB controller in ESXi hypervisors
Problem Description: CloudStack doesn’t add a USB controller to the Apple Mac OS X VMs created in ESXi hypervisors. But, vSphere Client, by default, adds a USB Controller to the Mac OS VMs. Mac OS X machines require USB Controller for USB mouse and keyboard access.
Root Cause: The Guest OS details are specified in the Virtual Machine Configuration Spec for creating the VM (using the SDK API) in the EXSi hypervisor. No USB Controller is added to the Virtual Machine Configuration Spec. As the guest OS Identification details are specified in the VM Configuration Spec, It is assumed that the Create VM SDK API would create the defaults in the VM same as vSphere Client. But, as per the observation, USB Controller is not added to the Guest OS - Mac OS VM created through the SDK API.
Resolution: When the Guest OS is Apple Mac OS, Add the USB Controller (EHCI+UHCI - Mac supported) to the Virtual Machine Configuration Spec before Creating or Starting the VM. For any existing Mac OS VMs, Stop and Start to add the USB Controller. For new VMs with Mac OS, USB Controller is added automatically.