Xen setup help

I was hoping one of you could walk me through on a xen setup with cloudmin on a existing system. I'm kinda lost here with all the settings and never have setup or even used xen.

Status: 
Active

Comments

So is this existing system already hosting Xen virtual machines, or is it a totally fresh system?

Or is it running Virtualmin?

It's a existing active server that was using VM Pro already which I installed CM on.

I have the xen kernel already installed but I am confused where to begin on the Xen setup in cloudmin.

I have done that. It's the setup in CM I get confused at.

LVM volume group for disk images
Add Xen systems to DNS domain
Driver type for file images
Destination for live migration

And the rest... It's just confusing and I certainly don't want to break his server.

The meanings of those fields are :

LVM volume group for disk images - if the system has LVM setup and has plenty of free space in the volume group, select it here. Otherwise, just use regular files.

Add Xen systems to DNS domain - select a locally hosted DNS domain to which an entry for each Xen instance will be added.

Driver type for file images - default is fine

Destination for live migration - irrelevant if you only have one host system

Ok what about...

Network options - specifically the Bridge
Virtual system resource limits
System image cache

Network options - unless the host has multiple network interfaces, you can leave the bridge set to the default. Just enter an IP range for virtual systems to allocate from.

Virtual system resource limits - this controls how much RAM and disk is reserved on the host system instead of being allocated for VMs.

System image cache - default is fine

Network options - unless the host has multiple network interfaces, you can leave the bridge set to the default. Just enter an IP range for virtual systems to allocate from.

Virtual system resource limits - this controls how much RAM and disk is reserved on the host system instead of being allocated for VMs.

System image cache - default is fine

Ok I got the host system added.

Now I don't see a link to create a new xen instance. I click on "Xen Host Systems" and I get "All possible systems have already been registered for Xen hosting"

Under "New System" I don't see a link there either.

Try refreshing the page.

There should be a "Create" category on the left menu.

Ok I got it now -- thanks. Next time this will be easier for me to do.

Cool .. please let us know if you run into any problems with creating xen instances.

Creating virtual system with Xen ..
.. creation failed : Kernel loading with PyGrub or Pv-Grub was requested, but neither were found on ns1.icgllc.us

Go to cloudmin settings -> module config -> Xen settings -> Default Xen kernel source and select "From host system"

ugg and another one

PTY PID: 8284
Using config file "/xen/asterisk.cfg".
Error: Device 0 (vif) could not be connected. Could not find bridge, and none was specified

and it looks like CM is just hanging there

Does your system have a xenbr0 network interface, as shown by the ifconfig -a command?

That's odd .. was the system rebooted since the xen kernel and xen tools were installed?

Yes -- I'll reboot it again

Well something has gone very wrong... when we did a reboot we got a error...

pxe-e53: no boot filename received. Dhcpd file?

oh nm this was a boot option he enabled LOL

Ok even after 3 reboots xenbr0 is not being created -- what is wrong ?

I can login and take a look if you like?

Alternately, try starting up the new Xen instance again, and see if xenbr0 comes up.

BTW, I presume this system has an eth0 interface?

Well I got it working but it doesnt have that interface name.

I edited /etc/xen/xend-config.sxp

and changed the briding from a dummy to

(network-script network-bridge)

ifconfig shows

eth0
peth0
veth0-3

BUt now I have another bug related to the setup..

Start at host boot time? is not saving as yes. It stays no after going back to it and checking

Something else I was wondering about...

Is there a way to automatically make partitions for xen instances ? From what I see so far it only creates / and puts everything under it, this isn't ideal for most systems.

So is networking OK now? It is odd that you don't have a xenbr0 interface .. unless you are running a really new Xen version, like 3.3.

Once a Xen instance has been created, you can create additional disks that you can mount elsewhere at Resources -> Manage Disks. There is no way to add these at install time though, as Cloudmin creates Xen instances from complete filesystem images.

Yes it seems to be working just fine now....

Start at host boot time? doesn't seem to be parsing right. The instance does boot but it doesn't show that in the settings.

I'm not sure what xen version I have.

For the "start at boot" option, if you change it to "yes" is there a link created in /etc/xen/auto for the Xen instance?

That link should go away when "no" is selected.

ls: cannot access /etc/xen/auto: No such file or directory

That's really odd .. is this a Debian Lenny system you are using Xen on?

Of course its debian lenny.

According to the docs I read someplace -- if that directory is not created xen will auto-start all instances. Probably why it wasn't there

In your /etc/default/xendomains file, does it have a line like :

XENDOMAINS_AUTO=/etc/xen/auto

I will have Cloudmin create that directory automatically if missing in future.

Type: string
Default: /etc/xen/auto

This variable sets the directory where domains configurations
are stored that should be started on system startup automatically.
Leave empty if you don't want to start domains automatically
(or just don't place any xen domain config files in that dir).
Note that the script tries to be clever if both RESTORE and AUTO are
set: It will first restore saved domains and then only start domains
in AUTO which are not running yet.
Note that the name matching is somewhat fuzzy.

XENDOMAINS_AUTO=/etc/xen/auto

It wont matter with the new xen...

Type: boolean
Default: false

If this variable is set to "true", only the domains started via config
files in XENDOMAINS_AUTO will be treated according to XENDOMAINS_SYSRQ,
XENDOMAINS_MIGRATE, XENDOMAINS_SAVE, XENDMAINS_SHUTDOWN; otherwise
all running domains will be.
Note that the name matching is somewhat fuzzy.

XENDOMAINS_AUTO_ONLY=false

This setting would have to be set as true then.

Ok, so it looks like the real issue is just that /etc/xen/auto is missing by default .. I will have cloudmin handle that.

If you create this dir, can you now enable Xen instances at boot time?

Umm I think you still didn't get it.

If

XENDOMAINS_AUTO_ONLY=false

is set to false then ALL instance is auto-started thus you really don't need XENDOMAINS_AUTO set unless you are going to only want certain instances started which I doubt would ever be the case.

Are you sure? On my system, the comment on that directive says :

# If this variable is set to "true", only the domains started via config

# files in XENDOMAINS_AUTO will be treated according to XENDOMAINS_SYSRQ,

# XENDOMAINS_MIGRATE, XENDOMAINS_SAVE, XENDMAINS_SHUTDOWN; otherwise

# all running domains will be.

which implies that only domains in /etc/xen/auto will be started at boot regardless.

This setting controls which domains are shut down when the host system is.

## Type: boolean
## Default: false
#
# If this variable is set to "true", only the domains started via config
# files in XENDOMAINS_AUTO will be treated according to XENDOMAINS_SYSRQ,
# XENDOMAINS_MIGRATE, XENDOMAINS_SAVE, XENDMAINS_SHUTDOWN; otherwise
# all running domains will be.
# Note that the name matching is somewhat fuzzy.
#
XENDOMAINS_AUTO_ONLY=false

That's what mine says -- so if XENDOMAINS_AUTO_ONLY is false then XENDOMAINS_AUTO is ignored.

If you want to use XENDOMAINS_AUTO then XENDOMAINS_AUTO_ONLY must be set true.

btw XENDOMAINS_AUTO_ONLY=false is the default on debian lenny.

Leaving it false will always boot ALL the instances at startup thus you don't need the auto path.

Are you sure? That doesn't match my reading of the init script. It looks to me like whatever domains are linked from /etc/xen/auto will be started at boot, as long as XENDOMAINS_AUTO is set to that directory.

I guess this would be pretty easy to test.

very sure

delete /etc/xen/auto and all instances will auto boot

I have already tested this

Ok, in that case as long as Cloudmin creates /etc/xen/auto , it will be able to control which instances are started at boot or not.

Starting at boot is the default for new instances Cloudmin creates, but in some cases you might want to disable it (such as for testing VMs that are usually down)