Index: /trunk/src/VBox/Main/ConsoleImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/ConsoleImpl.cpp	(revision 1720)
+++ /trunk/src/VBox/Main/ConsoleImpl.cpp	(revision 1721)
@@ -4337,4 +4337,5 @@
     BSTR            str = NULL;
     ULONG           cRamMBs;
+    ULONG           cMonitors;
     unsigned        i;
 
@@ -4737,4 +4738,6 @@
     hrc = pMachine->COMGETTER(VRAMSize)(&cRamMBs);                                  H();
     rc = CFGMR3InsertInteger(pCfg,  "VRamSize",             cRamMBs * _1M);         RC_CHECK();
+    hrc = pMachine->COMGETTER(MonitorCount)(&cMonitors);                            H();
+    rc = CFGMR3InsertInteger(pCfg,  "MonitorCount",         cMonitors);             RC_CHECK();
 
     /* Custom VESA mode list */
@@ -5335,5 +5338,5 @@
                 break;
             }
-#endif 
+#endif
         }
     }
Index: /trunk/src/VBox/Main/MachineImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/MachineImpl.cpp	(revision 1720)
+++ /trunk/src/VBox/Main/MachineImpl.cpp	(revision 1721)
@@ -162,4 +162,5 @@
     mMemorySize = 128;
     mVRAMSize = 8;
+    mMonitorCount = 1;
     mHWVirtExEnabled = TriStateBool_False;
 
@@ -185,4 +186,5 @@
     if (mMemorySize != that.mMemorySize ||
         mVRAMSize != that.mVRAMSize ||
+        mMonitorCount != that.mMonitorCount ||
         mHWVirtExEnabled != that.mHWVirtExEnabled ||
         mClipboardMode != that.mClipboardMode)
@@ -944,4 +946,40 @@
     mHWData.backup();
     mHWData->mVRAMSize = memorySize;
+
+    return S_OK;
+}
+
+STDMETHODIMP Machine::COMGETTER(MonitorCount) (ULONG *monitorCount)
+{
+    if (!monitorCount)
+        return E_POINTER;
+
+    AutoCaller autoCaller (this);
+    CheckComRCReturnRC (autoCaller.rc());
+
+    AutoReaderLock alock (this);
+
+    *monitorCount = mHWData->mMonitorCount;
+
+    return S_OK;
+}
+
+STDMETHODIMP Machine::COMSETTER(MonitorCount) (ULONG monitorCount)
+{
+    /* make sure monitor count is a sensible number */
+    if (monitorCount < 1 || monitorCount > SchemaDefs::MaxGuestMonitors)
+        return setError (E_INVALIDARG,
+            tr ("Invalid monitor count: %lu (must be in range [%lu, %lu])"),
+                monitorCount, 1, SchemaDefs::MaxGuestMonitors);
+
+    AutoCaller autoCaller (this);
+    CheckComRCReturnRC (autoCaller.rc());
+
+    AutoLock alock (this);
+
+    CHECK_SETTER();
+
+    mHWData.backup();
+    mHWData->mMonitorCount = monitorCount;
 
     return S_OK;
@@ -3544,4 +3582,9 @@
         CFGLDRQueryUInt32 (displayNode, "VRAMSize", &VRAMSize);
         mHWData->mVRAMSize = VRAMSize;
+
+        uint32_t MonitorCount;
+        CFGLDRQueryUInt32 (displayNode, "MonitorCount", &MonitorCount);
+        mHWData->mMonitorCount = MonitorCount;
+
         CFGLDRReleaseNode (displayNode);
     }
@@ -3952,5 +3995,5 @@
         else if (driver == L"coreaudio")
             audioDriver = AudioDriverType_CoreAudioDriver;
-#endif 
+#endif
         else
             AssertMsgFailed (("Invalid driver: %ls\n", driver.raw()));
@@ -5402,4 +5445,5 @@
         CFGLDRCreateChildNode (aNode, "Display", &displayNode);
         CFGLDRSetUInt32 (displayNode, "VRAMSize", mHWData->mVRAMSize);
+        CFGLDRSetUInt32 (displayNode, "MonitorCount", mHWData->mMonitorCount);
         CFGLDRReleaseNode (displayNode);
     }
@@ -5751,5 +5795,5 @@
                 break;
             }
-#endif 
+#endif
             default:
                 ComAssertMsgFailedBreak (("Wrong audio driver type! driver = %d\n",
Index: /trunk/src/VBox/Main/SystemPropertiesImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/SystemPropertiesImpl.cpp	(revision 1720)
+++ /trunk/src/VBox/Main/SystemPropertiesImpl.cpp	(revision 1721)
@@ -145,4 +145,16 @@
 }
 
+STDMETHODIMP SystemProperties::COMGETTER(MaxGuestMonitors)(ULONG *maxMonitors)
+{
+    if (!maxMonitors)
+        return E_POINTER;
+    AutoLock lock(this);
+    CHECK_READY();
+
+    *maxMonitors = SchemaDefs::MaxGuestMonitors;
+
+    return S_OK;
+}
+
 STDMETHODIMP SystemProperties::COMGETTER(MaxVDISize)(ULONG64 *maxVDISize)
 {
Index: /trunk/src/VBox/Main/idl/VirtualBox.xidl
===================================================================
--- /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 1720)
+++ /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 1721)
@@ -1936,4 +1936,14 @@
         </attribute>
 
+        <attribute name="MonitorCount" type="unsigned long">
+            <desc>
+                Number of virtual monitors.
+                <note>
+                    Only effective on Windows XP and later guests with
+                    Guest Additions installed.
+                </note>
+            </desc>
+        </attribute>
+
         <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
             <desc>Object containing all BIOS settings.</desc>
Index: /trunk/src/VBox/Main/include/GuestOSTypeImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/GuestOSTypeImpl.h	(revision 1720)
+++ /trunk/src/VBox/Main/include/GuestOSTypeImpl.h	(revision 1721)
@@ -75,4 +75,5 @@
     uint32_t mVRAMSize;
     uint32_t mHDDSize;
+    uint32_t mMonitorCount;
 };
 
Index: /trunk/src/VBox/Main/include/MachineImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/MachineImpl.h	(revision 1720)
+++ /trunk/src/VBox/Main/include/MachineImpl.h	(revision 1721)
@@ -243,4 +243,5 @@
         ULONG          mMemorySize;
         ULONG          mVRAMSize;
+        ULONG          mMonitorCount;
         TriStateBool_T mHWVirtExEnabled;
 
@@ -319,4 +320,6 @@
     STDMETHOD(COMGETTER(VRAMSize))(ULONG *memorySize);
     STDMETHOD(COMSETTER(VRAMSize))(ULONG memorySize);
+    STDMETHOD(COMGETTER(MonitorCount))(ULONG *monitorCount);
+    STDMETHOD(COMSETTER(MonitorCount))(ULONG monitorCount);
     STDMETHOD(COMGETTER(BIOSSettings))(IBIOSSettings **biosSettings);
     STDMETHOD(COMGETTER(HWVirtExEnabled))(TriStateBool_T *enabled);
Index: /trunk/src/VBox/Main/include/SystemPropertiesImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/SystemPropertiesImpl.h	(revision 1720)
+++ /trunk/src/VBox/Main/include/SystemPropertiesImpl.h	(revision 1721)
@@ -60,4 +60,5 @@
     STDMETHOD(COMGETTER(MinGuestVRAM)(ULONG *minVRAM));
     STDMETHOD(COMGETTER(MaxGuestVRAM)(ULONG *maxVRAM));
+    STDMETHOD(COMGETTER(MaxGuestMonitors)(ULONG *maxMonitors));
     STDMETHOD(COMGETTER(MaxVDISize)(ULONG64 *maxVDISize));
     STDMETHOD(COMGETTER(NetworkAdapterCount)(ULONG *count));
Index: /trunk/src/VBox/Main/xml/SchemaDefs.xsl
===================================================================
--- /trunk/src/VBox/Main/xml/SchemaDefs.xsl	(revision 1720)
+++ /trunk/src/VBox/Main/xml/SchemaDefs.xsl	(revision 1721)
@@ -125,4 +125,10 @@
   </xsl:call-template>
   <xsl:call-template name="defineEnumMember">
+      <xsl:with-param name="member" select="'        MaxGuestMonitors'"/>
+      <xsl:with-param name="select" select="
+        xsd:complexType[@name='TDisplay']/xsd:attribute[@name='MonitorCount']//xsd:maxInclusive/@value
+      "/>
+  </xsl:call-template>
+  <xsl:call-template name="defineEnumMember">
       <xsl:with-param name="member" select="'        NetworkAdapterCount'"/>
       <xsl:with-param name="select" select="
Index: /trunk/src/VBox/Main/xml/VirtualBox-settings-common.xsd
===================================================================
--- /trunk/src/VBox/Main/xml/VirtualBox-settings-common.xsd	(revision 1720)
+++ /trunk/src/VBox/Main/xml/VirtualBox-settings-common.xsd	(revision 1721)
@@ -378,4 +378,11 @@
     </xsd:simpleType>
   </xsd:attribute>
+  <xsd:attribute name="MonitorCount" default="1">
+    <xsd:simpleType>
+      <xsd:restriction base="xsd:unsignedInt">
+        <xsd:maxInclusive value="8"/>
+      </xsd:restriction>
+    </xsd:simpleType>
+  </xsd:attribute>
 </xsd:complexType>
 
