Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a big old rack server that I want to load multiple desktop style OSs and then remote into them to test my application. I decided to try Xen and am using CentOS 5.4 as my dom0. Dom0 works perfectly so I loaded a copy of Windows XP to be my first virtual machine. Currently it is dom1.

When I use the graphical Virtual Machine tool that shipped with CentOS I can open up Windows XP, use IE, and view any sites I want to. I can also ping sites on my local network.

I now want to talk to my XP virtual machine from other computers on the network through RDP. I turned on Remote Desktop access and made sure the Windows Firewall exception for Remote Desktop was checked on my XP virtual machine.

First off I am a little confused what IP Address I should use to connect to XP. I have the big mess of network interfaces all the documentation has talked about. Only two have IP Addresses: virbr0 and eth1. The machine has 3 network interfaces as a typical HP server does. They are labeled 1, 2, and Mgmt and only one physical cable is attached to 2. I have tried to use the Terminal Services Client on dom0 to connect to both addresses but neither one works. The network interface vif1.0 does not have an IP address.

After reading documentation it seems there should be some file in /etc/xen/auto with an ip address in it. I created one called vm01.cfg and put:

vif = [ '192.168.0.xxx' ]

but it didn't seem to do any good.

Any suggestions?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

You are going to want to reach the IP Address that is on the Windows XP box.

The simplest thing to do would be check the output of ipconfig in the Windows XP box.

Take that IP and see if you can ping it from dom0, then from another client on your network.

If you can't ping it from both, try RDP to that address.

If you can ping it from dom0 but not another client, see below.

If the IP Address that it has is different than your lan, your VMs may be behind a NAT on dom0.

My experience comes from VMWare so I can't tell you what settings to change, but my understanding is Xen has similar networking options.

The two common modes that you have are NAT and Bridged.

In the case of NAT, dom0 is acting as a router for your dom1-n (basically acting the same way that a home linksys router does). They are going to receive IP addresses assigned from dom0 and dom0 will be their default gateway. From dom1-n you should be able to communicate to devices on your main LAN, but the opposite direction won't work. Similar to how your PC can get out on the internet but devices on the internet cannot reach your PC behind your router/firewall.

In the case of Bridged mode, dom0 creates a virtual network switch and it is as if dom1-n are plugged into the same network as dom0 is. They will get their IP addresses from the same DHCP server as everyone else in your network and will be able to communicate with all devices on your LAN.

You probably want to be in the bridged mode as you are wanting to access the guest machines from other clients on your network.

share|improve this answer
    
That did it! Thanks! When I first added the virtual machine the CentOS Virtual Machine Manager gave me two options on the Network screen: The first was Virtual network and the second was shared physical device. In ignorance I picked Virtual network when I should have picked Shared physical device (which uses xenbrX). To fix I shut down my guest, went to the Hardware tab. I deleted my NIC and clicked Add Hardware. I chose Shared physical device this time. –  rancidfishbreath Jan 18 '10 at 15:55
    
Part 2 - I then went into XP made sure obtain address automatically was selected and was able to get an IP address from DHCP. I then tried to ping but got a bunch of dropped packets. Next I opened Terminal Server Client on Dom0 and was able to log in. I then pulled up Remote Desktop Connection on a Mac on the network and was able to pull up XP perfectly. –  rancidfishbreath Jan 18 '10 at 16:03
    
The easiest way to think of your virtualized XP box is that it is not virtualized. When working with Xen, you need to know about virtualization. But when working with the XP instance, you do not. You do everything exactly as if it was a physical box without a monitor attached. –  Scott Alan Miller Jan 21 '10 at 17:56
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.