}
public boolean isMemoryHotAddSupported(String guestOsId) throws Exception {
boolean guestOsSupportsMemoryHotAdd = false;
boolean virtualHardwareSupportsMemoryHotAdd = false;
GuestOsDescriptor guestOsDescriptor;
int virtualHardwareVersion;
guestOsDescriptor = getGuestOsDescriptor(guestOsId);
virtualHardwareVersion = getVirtualHardwareVersion();
// Check if guest operating system supports memory hotadd
if (guestOsDescriptor.isSupportsMemoryHotAdd()) {
guestOsSupportsMemoryHotAdd = true;
}
// Check if virtual machine is using hardware version 7 or later.
if (virtualHardwareVersion >= 7) {
virtualHardwareSupportsMemoryHotAdd = true;