[BugFix:
Set usbRedirect when build vm spec
Both new create or exists vm opeation spec should
process this system tag
@@ -6305,7 +6305,7 @@ public class VmInstanceBase extends AbstractVmInstance {
selectBootOrder(spec);
spec.setConsolePassword(VmSystemTags.CONSOLE_PASSWORD.
getTokenByResourceUuid(self.getUuid(), VmSystemTags.CONSOLE_PASSWORD_TOKEN));
- spec.setUsbRedirect(Boolean.valueOf(VmSystemTags.USB_REDIRECT.getTokenByResourceUuid(self.getUuid(), VmSystemTags.USB_REDIRECT_TOKEN)));
+ spec.setUsbRedirect(Boolean.parseBoolean(VmSystemTags.USB_REDIRECT.getTokenByResourceUuid(self.getUuid(), VmSystemTags.USB_REDIRECT_TOKEN)));
if (struct.getStrategy() == VmCreationStrategy.CreateStopped || struct.getStrategy() == VmCreationStrategy.CreatedPaused) {
spec.setCreatePaused(true);
}
@@ -6755,6 +6755,7 @@ public class VmInstanceBase extends AbstractVmInstance {
spec.setConsolePassword(VmSystemTags.CONSOLE_PASSWORD.
getTokenByResourceUuid(self.getUuid(), VmSystemTags.CONSOLE_PASSWORD_TOKEN));
spec.setVDIMonitorNumber(VmSystemTags.VDI_MONITOR_NUMBER.getTokenByResourceUuid(self.getUuid(), VmSystemTags.VDI_MONITOR_NUMBER_TOKEN));
+ spec.setUsbRedirect(Boolean.parseBoolean(VmSystemTags.USB_REDIRECT.getTokenByResourceUuid(self.getUuid(), VmSystemTags.USB_REDIRECT_TOKEN)));
for (BuildVmSpecExtensionPoint ext : pluginRgty.getExtensionList(BuildVmSpecExtensionPoint.class)) {
ext.afterBuildVmSpec(spec);
