weizhouapache commented on a change in pull request #5513:
URL: https://github.com/apache/cloudstack/pull/5513#discussion_r719148587



##########
File path: 
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
##########
@@ -2490,16 +2490,18 @@ protected ConsoleDef createConsoleDef() {
 
     protected VideoDef createVideoDef(VirtualMachineTO vmTO) {
         Map<String, String> details = vmTO.getDetails();
+        String videoHw = _videoHw;
+        int videoRam = _videoRam;
         if (details != null) {
             if (details.containsKey(VideoDef.VIDEO_MODEL)) {
-                _videoHw = details.get(VideoDef.VIDEO_MODEL);
+                videoHw = details.get(VideoDef.VIDEO_MODEL);
             }
             if (details.containsKey(VideoDef.VIDEO_RAM)) {
                 String value = details.get(VideoDef.VIDEO_RAM);
-                _videoRam = NumbersUtil.parseInt(value, 0);
+                videoRam = NumbersUtil.parseInt(value, 0);

Review comment:
       @leolleeooleo 
   better to use
   ```
   videoRam = NumbersUtil.parseInt(value, videoRam);
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to