Submitted by sgrayban on Mon, 05/10/2010 - 23:38
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
Submitted by JamieCameron on Tue, 05/11/2010 - 00:14 Comment #1
So is this existing system already hosting Xen virtual machines, or is it a totally fresh system?
Or is it running Virtualmin?
Submitted by sgrayban on Tue, 05/11/2010 - 00:25 Comment #2
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.
Submitted by JamieCameron on Tue, 05/11/2010 - 01:38 Comment #3
The first place to look is http://www.virtualmin.com/documentation/cloudmin/virtualization/xen
Once this is done, you can install Cloudmin and go to Host Systems -> Xen Host Systems, and add the system as a Xen host.
Assuming that works OK, you should then be able to create a Xen instance.
Submitted by sgrayban on Tue, 05/11/2010 - 02:01 Comment #4
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.
Submitted by JamieCameron on Tue, 05/11/2010 - 02:13 Comment #5
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
Submitted by sgrayban on Tue, 05/11/2010 - 02:27 Comment #6
Ok what about...
Network options - specifically the Bridge
Virtual system resource limits
System image cache
Submitted by JamieCameron on Tue, 05/11/2010 - 02:31 Comment #7
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
Submitted by JamieCameron on Tue, 05/11/2010 - 02:32 Comment #8
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
Submitted by sgrayban on Tue, 05/11/2010 - 02:55 Comment #9
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.
Submitted by JamieCameron on Tue, 05/11/2010 - 03:05 Comment #10
Try refreshing the page.
There should be a "Create" category on the left menu.
Submitted by sgrayban on Tue, 05/11/2010 - 03:16 Comment #11
Ok I got it now -- thanks. Next time this will be easier for me to do.
Submitted by JamieCameron on Tue, 05/11/2010 - 11:17 Comment #12
Cool .. please let us know if you run into any problems with creating xen instances.
Submitted by sgrayban on Tue, 05/11/2010 - 11:24 Comment #13
Creating virtual system with Xen ..
.. creation failed : Kernel loading with PyGrub or Pv-Grub was requested, but neither were found on ns1.icgllc.us
Submitted by sgrayban on Tue, 05/11/2010 - 11:24 Comment #14
Submitted by JamieCameron on Tue, 05/11/2010 - 11:25 Comment #15
Go to cloudmin settings -> module config -> Xen settings -> Default Xen kernel source and select "From host system"
Submitted by sgrayban on Tue, 05/11/2010 - 11:36 Comment #16
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
Submitted by JamieCameron on Tue, 05/11/2010 - 12:26 Comment #17
Does your system have a
xenbr0
network interface, as shown by theifconfig -a
command?Submitted by sgrayban on Tue, 05/11/2010 - 12:50 Comment #18
No it doesn't
Submitted by JamieCameron on Tue, 05/11/2010 - 13:53 Comment #19
That's odd .. was the system rebooted since the xen kernel and xen tools were installed?
Submitted by sgrayban on Tue, 05/11/2010 - 16:43 Comment #20
Yes -- I'll reboot it again
Submitted by sgrayban on Tue, 05/11/2010 - 21:43 Comment #21
Well something has gone very wrong... when we did a reboot we got a error...
pxe-e53: no boot filename received. Dhcpd file?
Submitted by sgrayban on Tue, 05/11/2010 - 21:56 Comment #22
oh nm this was a boot option he enabled LOL
Submitted by sgrayban on Tue, 05/11/2010 - 22:21 Comment #23
Ok even after 3 reboots xenbr0 is not being created -- what is wrong ?
Submitted by JamieCameron on Tue, 05/11/2010 - 22:53 Comment #24
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?
Submitted by sgrayban on Tue, 05/11/2010 - 23:19 Comment #25
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
Submitted by sgrayban on Tue, 05/11/2010 - 23:27 Comment #26
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
Submitted by sgrayban on Wed, 05/12/2010 - 03:47 Comment #27
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.
Submitted by JamieCameron on Wed, 05/12/2010 - 12:50 Comment #28
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.
Submitted by sgrayban on Wed, 05/12/2010 - 15:54 Comment #29
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.
Submitted by JamieCameron on Wed, 05/12/2010 - 18:57 Comment #30
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.
Submitted by sgrayban on Wed, 05/12/2010 - 22:46 Comment #31
ls: cannot access /etc/xen/auto: No such file or directory
Submitted by JamieCameron on Thu, 05/13/2010 - 00:19 Comment #32
That's really odd .. is this a Debian Lenny system you are using Xen on?
Submitted by sgrayban on Thu, 05/13/2010 - 10:50 Comment #33
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
Submitted by JamieCameron on Thu, 05/13/2010 - 13:06 Comment #34
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.
Submitted by sgrayban on Thu, 05/13/2010 - 13:19 Comment #35
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.
Submitted by JamieCameron on Thu, 05/13/2010 - 13:30 Comment #36
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?
Submitted by sgrayban on Thu, 05/13/2010 - 14:04 Comment #37
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.
Submitted by JamieCameron on Thu, 05/13/2010 - 15:23 Comment #38
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.
Submitted by sgrayban on Thu, 05/13/2010 - 17:52 Comment #39
## 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.
Submitted by sgrayban on Thu, 05/13/2010 - 17:56 Comment #40
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.
Submitted by JamieCameron on Fri, 05/14/2010 - 01:36 Comment #41
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.
Submitted by sgrayban on Fri, 05/14/2010 - 08:18 Comment #42
very sure
delete /etc/xen/auto and all instances will auto boot
I have already tested this
Submitted by JamieCameron on Fri, 05/14/2010 - 13:56 Comment #43
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)
Submitted by sgrayban on Fri, 05/14/2010 - 23:44 Comment #44
ok