ubuntu 12.04 - Unbuntu, Hyper-V, and Remote Desktop: strange behavior

05
2014-04
  • Rob

    This question got kicked off of stackoverflow, and they suggested I might have better luck here.

    I'm trying to learn Ruby on Rails and fighting with the environment is proving to be a challenge.

    I’m running Ubuntu LTS on Windows 8.1 under Hyper-V, and I’m sort of confused about some of the things I’m seeing. I’m new to Ubuntu and Hyper-V, so understanding how they interact with each other has been interesting.

    When I fire up Hyper-V Manager and connect normally, everything works fine, though the window is small and I wanted better use of screen real estate. I did some hunting around and discovered I can connect via Remote Desktop. So I installed xrdp in Ubuntu, ran ifconfig to find out the IP address of the Ubuntu session, and was able to connect via mstsc and get a full screen desktop. Great.

    Except, the session I get via RDP (which I will refer to as the “RDP window”) is ‘different’ from the session I get when I connect from Hyper-V (which I will refer to as the “Connect window”).

    1) In the RDP window, after I log in, my full name does not appear on the top bar like it does in the Connect window, though when I type “whoami” into Terminal in both windows, I get the same response (“robert”).

    2) When I type ‘ifconfig’ in the Connect window, it works fine. When I type ‘ifconfig’ into Terminal in the RDP window, I get the following message:

    Command 'ifconfig' is available in '/sbin/ifconfig' The command could not be located because '/sbin' is not included in the PATH environment variable. This is most likely caused by the lack of administrative privileges associated with your user account.

    ifconfig: command not found

    So in the RDP window, I’m not an administrator, but in the Connect window, I am, despite being logged into the same account. I have to do 'sudo ifconfig' in the RDP window.

    3) I installed the Chrome browser, which works ok, except when I run Chrome in the RDP window, the Chrome browser window appears in the Connect window. Firefox does not exhibit this behavior, but if I run Firefox in the RDP window, I get an error when I try to run it in the Connect window. If I log out of the Connect window, I can get Chrome to start in the RDP window.

    4) I’m using Ubuntu One to back up my files. I have folder sync turned on. It doesn’t sync in the RDP window. I have to log into the Connect window in order to get the files to sync.

    5) I get popups in the RDP window about unlocking my key ring that do not appear in the Connect window.

    I can make some of these problems go away by simply not logging into the Connect window, though since I need Ubuntu’s IP address in order to connect via RDP when I’m dealing with a strange DHCP server, this isn’t always convenient. Chrome starts normally when it has no Connect window to start up in, though Ubuntu One still doesn’t sync. I’m sure there are other differences that I just haven’t noticed yet.

    Can someone explain what’s going on here? I’m sure this is pretty obvious, but I’m not sure how to describe this situation in such a way as to do a Google search to figure out the problem. Ideally, I'd like to RDP window to behave the same way as the Connect window, but I'm not sure how to get there from here.

    Thanks in advance.

    -Rob

  • Answers
    Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

    Related Question

    virtual machine - Is Hyper-V server suitable as a desktop testbench?
  • Thomas.Winsnes

    At the moment, we are running a test bench with several desktop computers that are reimaged every time we need to test on a different operation system. Also because different versions of our software is tested on each image, we have to install our software every time we want to test it.

    The problem we have had with going with a virtualization technology is that our software is depending on directx/opengl and 3D acceleration, and this has not been something that virtual machines have excelled at.

    With the release of SP1 for Windows 7 and Server 2008 R2 Hyper-V has gotten better 3D acceleration support, so we are looking into virtualizing our testbench using this.

    Our test scenario would most likely be something close to this:

    1. Remote into the hyper-V server and load the test VM needed for the current tests
    2. Remote into the VM and install the new version of the software
    3. Run the tests

    It would be nice, but not essential, if our support team could remote into the VMs to match the users OS+software combination when doing support.

    Does anyone have any experience with this kind of settup with hyper-v?

    Edit to clearify:

    • We were thinking of running a bunch of VMs of a single server, 20-30 (not all at once of course). They will be loaded/unloaded as needed, but there is a high posibility of 3-4 running at the same time.
    • They will be used to test our desktop applications, preferably remotely.
    • Our application will be installed/loaded into the VMs on a need basis. So a base image with snapshots or duplication would be nice way to do that.

  • Related Answers
  • surfasb

    I think this is one of those cases where, while the VM is faster, it will never completely replace testing the software on real hardware. The best bet IMO is to split up your testing. See what tests can be unquestionably tested on the VM and then test the software on dedicated hardware to check for driver compatibility issues.

  • Richard

    The ability to snapshot virtual machines and (maybe) roll back to an earlier configuration should massively reduce the need to image machines (and maintain those images). Hyper-V can handle many snapshots to the same VM.

    Unless your application has tight connection to hardware (eg. using specialist interface cards) you should be able to test everything in VM guests. With hardware assistance the small (1–2%) overhead of virtualisation is much smaller than the variation you'll find in customer hardware anyway. Just be aware that saturating the underlying hardware will impact performance tests (when required you might need to stop other guests for a period).