Windows Virtual PC and Screen Resizing

Windows Virtual PC and Screen Resizing

  • Comments 22


For as long as I can remember – Virtual PC has allowed you to resize the virtual machine window and have the guest operating system change its screen resolution automatically.  The way this is done is that once you finish resizing the virtual machine window, we send a message into an integration service inside the virtual machine that in turn requests a desktop resolution change, just like a user changing the desktop resolution manually.

This works because of the excellent support in Windows for changing screen resolutions on the fly*.

Unfortunately, Remote Desktop (which is used by Windows Virtual PC) does not support changing screen resolutions on the fly.  In order to maintain the same level of functionality in Windows Virtual PC as with earlier versions of Virtual PC a new approach had do be tried.

If you do not have integrated mode enabled we continue to change the guest operating system desktop resolution like we always have.  If you do have integrated mode enabled we will instead break the Remote Desktop connection and create a new one at the new window resolution.

The can be a bit disconcerting – as it is not uncommon to see a momentary login screen while the new connection is created.  But you can rest assured that there is no potential for data loss / application disruption.  An easy way to think of this is to imagine what happens if you are using Remote Desktop to connect to a physical computer and the network gets disconnected – forcing you to reconnect to the remote computer.  When this happens everything will be just as you left it – because Windows maintains your login session even though you are not connected.  The same thing happens with Windows Virtual PC.

The important thing here is that even though different methods are used, whether you have integrated mode enabled or not you can always easily resize the virtual machine window and have the guest operating system adapt to your new window size.

* A little side story here.  When I started working at Connectix as a tester on Virtual PC I remember seeing a number of interesting bugs with virtual machine screen resizing which were a result of the fact that support for changing screen resolutions without reboot was not very reliable in Windows 95.  Thankfully all of these issues were sorted out by Windows 98 and this has been rock solid for every Windows release since then.

Cheers,
Ben

Leave a Comment
  • Please add 1 and 2 and type the answer here:
  • Post
  • Could you describe how to run Virtual PC as a service?

  • Wow! You're old enough to remember Windows 95?

  • Yeah I remember during the Windows 95 days, Windows warned more aggressively that changing resolutions on the fly would potentially cause problems but with 98, the default became to change on the fly without restarting. Btw Auto Publish isn't working for me in XP Mode. Anything wrong with WMI on my comp? HELP.

  • Any chance of getting this level of support in Hyper-V too?

  • Just a quick note: If a file transfer between guest and host is in progress it will be aborted. Because technically the RDP-session is terminated and recreated also the mapped drives will be disconnected (meaning any file transfer process is disconnected to) and re-mapped, too.

    So remember: Do not resize when move data between guest and host (and vice versa).

  • Oh, and a quick tipp: When integration mode is enabled and you want to map a drive into the virtual machine, you can use the settings. But there will be a popup which says "restart vm to apply changes". Click ok and just resize the vm. The RDP session will be disconnected and re-connected, now with the mapped drive. Voila, dirve present, no reboot required.

    (of course you can map drives manually using \\tsclient\<drive> as described by Ben in another blog post.)

  • Is it only I who get _seriously_ degraded performance as soon as I enable integration features? Also irritating "flickering".

  • Honestly, Im still somewhat confused as to why MS chose to use RDP sessions to display VM's in Windows Virtual PC. In previous versions of Virtual PC incl those under Connectix' name, it used its own display method which was somewhat more flexible in terms of display options. For example you could not only do on-the-fly screen resizing without any disruption (such as to copy operations as mentioned above) but you could also go full screen not only for GUI's but for text modes as well. As a simple example, I used to regularly run an old Netware 3.11 server under VPC2007 at full-screen on one of my boxes, which displayed perfectly at its native text resolution. Thats no longer possible in WVPC. Is there any way round this or a way to install VPC2007 under Win7?

  • Does this explain the recent behavior I am seeing where, for as long as I can remember, full screen mode worked as expected, but a few days ago, all of a sudden it stopped working? Now I get the annoying message about checking that the resolution guest is not higher than that of the host.

    As a rule, I install all windows updates that come out ... might a recent update have caused this to stop working?

  • One other curious behavior that started recently. I have 2 monitors and I always put the virtual PC on the monitor on the right (screen 2). It remembers the guest window size, but it now comes up on the left monitor (screen 1).

    Any thoughts on why this is happening would be greatly appreciated. And if this it the wrong place for questions of this nature, would you mind pointing me to the right resource?

    Thanks!

  • GreenNet -

    Not really, why do you want to do this?

    kooperskorner -

    I do not know whether to take that as a compliment or not :-)

    Jonathan -

    I cannot comment on if / when this sort of functionality will come to Hyper-V

    MartinN -

    Good information!

    Martin -

    I have never seen this.  The first thing I would recommend is updating your video drivers (in the host).

    phobox -

    The key problem is that we were developing a bunch of technologies that were being replicated by the Remote Desktop team.  I understand that there are some things that are better with the old approach.  You can install VPC 2007 on Windows 7 - but you cannot have both VPC 2007 and Windows Virtual PC instaled at the same time.

    Chris Curl -

    Do you still see this after resizing the virtual machine window?  Is it possible that an updated video driver has been installed on your system that is causing problems?

    Cheers,

    Ben

  • As MartinN wrote, file transfer from/to a shared drive is interrupted after VPC screen resize. I suggest that VPC should check for any shared drive activity and require the user to confirm destroying/recreating the session, as current behavior may be very confusing.

    Look at my example:

    1. I wanted to install new app from a shared drive, so I switched to full-screen as it is more comfortable way to work with the virtualed OS (I had just a small/notebook display at the time).

    2. After configuring required install options and clicking all "Next"s, I switched back from full screen (to do other work in the meantime). To my surprize, there was then just an empty desktop in the VPC - there was even no error message from the installer!

    3. So, I started to test changing to and from full screen with an Explorer window open, getting cofusing results - sometimes the explorer window was percieved, sometimes it was lost... It took me quite a long time to find out that the window got lost when browsing a shared drive - and that it's caused by the use of TS.

    I'd like to point out that I'm used to work with TS and I'd never close a TS session while using a mapped drive. The troubleshooting took me so long because (A) I expected the Win7's VPC to work in a similar way as the VPC 2007 did and (B) the VPC's move to TS (and its consequences) was not accented in the technical documentation (it was hardly mentioned).

  • Unfortunately, the Nortel Networks Contivity VPN client doesn't like this approach and when the remote desktop disconnects/reconnects... the contivity client simply quits, causing a complete loss of the VPN session.  I know that the Contivity client is old and out of support, but it is still what my company uses as their VPN client so I have no choice but to use it.

  • This is causing me a major headache. I'm using XP mode for a development environment that is 16 bit (and therefore not Windows 7 compatible). The compiler produces 32 bit executables that can be used in Windows 7, but the IDE is stuck in XP mode since it is 16 bit. Upgrading to the newer version of the IDE would fix the problem, but is expensive (several thousand dollars) for a "hobby" and would also require a significant code upgrade and retest effort. I'm not going there.

    Any way, my source, test data, and even the IDE are installed on the D partition of the hard drive. This reconnect mechanism breaks that whenever I switch my KVM to another computer or minimize the VM for a while or when the host computer goes into screen saver mode.

    I need a way to access the host drive without this ridiculous disconnect/reconnect behavior.

  • could you describe how to resize or change the size of the virtual machine window?

Page 1 of 2 (22 items) 12