VirtualBox

Changeset 97536 in vbox


Ignore:
Timestamp:
Nov 14, 2022 5:52:27 PM (2 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
154565
Message:

Frontends/VBoxManage: The appliance import code populates the
IVirtualSystemDescription instance corresponding to the amount of guest
memory using two different allocation units: OVFValues[] in bytes and
VBoxValues[] in megabytes. The SDK documents the allocation unit as
being in bytes for both fields so update the code to consistently use
bytes for VBoxValues[] just as is done for OVFValues[]. Follow-up
changes to handle 'VBoxManage import --memory <>'. bugref:10314

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageAppliance.cpp

    r97533 r97536  
    754754                                if (VINF_SUCCESS == strOverride.toInt(ulMemMB))
    755755                                {
     756                                    /* 'VBoxManage import --memory' size is in megabytes */
     757                                    RTPrintf(Appliance::tr("%2u: Guest memory specified with --memory: %RU32 MB\n"),
     758                                             a, ulMemMB);
     759
     760                                    /* IVirtualSystemDescription guest memory size is in bytes */
     761                                    uint64_t ullMemBytes = (uint64_t)ulMemMB * _1M;
     762                                    strOverride = Utf8StrFmt("%RU64", ullMemBytes);
    756763                                    bstrFinalValue = strOverride;
    757                                     RTPrintf(Appliance::tr("%2u: Guest memory specified with --memory: %ls MB\n"),
    758                                              a, bstrFinalValue.raw());
    759764                                }
    760765                                else
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette