PDA

View Full Version : Installing Xen On CentOS 5.0 (i386) - can't create vm01, using CentOS5.0 64bit


SoftDux
26th February 2008, 11:39
I'm following this howto: http://www.howtoforge.com/centos_5.0_xen - but I'm getting stuck at creating the vm01 domU virtual machine. I followed the suggested HOWTO, with a few minor changes (like more RAM & HDD space, and used /dev/hdc as install location



What is the name of your virtual machine? <-- vm01
How much RAM should be allocated (in megabytes)? <-- 512
What would you like to use as the disk (path)? <-- /vm/vm01.img
How large would you like the disk (/vm/vm01.img) to be (in gigabytes)? <-- 10
Would you like to enable graphics support? (yes or no) <-- no
What is the install location? <-- /dev/hdc


And then I get this:




Starting install...
Domain installation does not appear to have been
successful. If it was, you can restart your domain
by running 'xm create -c vm01'; otherwise, please
restart your installation.



Funny enough, the vm is created, but I don't think it's done properly, as I didn't get the setup screen


[root@server01 ~]# xm list
Name ID Mem(MiB) VCPUs State Time(s)
Domain-0 0 947 2 r----- 400.6
vm01 12 517 1 ------ 0.0

topdog
26th February 2008, 11:53
You need the "--cdrom" switch if installing from cdrom.

SoftDux
26th February 2008, 12:03
ok, that makes sence, but how exactly do I use it?

I've tried various ways:


What would you like to use for the virtual CD image? --cdrom /dev/hdc
ERROR: CD device must exist!
What would you like to use for the virtual CD image? --cdrom:/dev/hdc
ERROR: CD device must exist!
What would you like to use for the virtual CD image? /dev/hdc --cdrom
ERROR: CD device must exist!
What would you like to use for the virtual CD image? --cdrom
ERROR: CD device must exist!
What would you like to use for the virtual CD image? --cdrom:/mnt/dvd
ERROR: CD device must exist!
What would you like to use for the virtual CD image? --cdrom:/mnt/dvd
ERROR: CD device must exist!
What would you like to use for the virtual CD image? /dev/hdc --cdrom
ERROR: CD device must exist!
What would you like to use for the virtual CD image?

topdog
26th February 2008, 12:08
You need

--cdrom /dev/hdc


Take a look at the examples in the man page
http://linux.die.net/man/1/virt-install

SoftDux
26th February 2008, 12:24
thanx, I thnk I found the problem. My system / kernel / something doesn't see all the RAM in the PC. I have 2GB installed, but virt-install doesn't see it?


libvir: Xen Daemon error : POST operation failed: (xend.err 'Error creating domain: I need 278120 KiB, but dom0_min_mem is 262144 and shrinking to 262144 KiB would leave only 182984 KiB free.')
Failed to create domain vm06
Traceback (most recent call last):
File "/usr/sbin/virt-install", line 447, in ?
main()
File "/usr/sbin/virt-install", line 411, in main
dom = guest.start_install(conscb)
File "/usr/lib/python2.4/site-packages/virtinst/XenGuest.py", line 367, in start_install
self.domain = self.conn.createLinux(cxml, 0)
File "/usr/lib64/python2.4/site-packages/libvirt.py", line 249, in createLinux
if ret is None:raise libvirtError('virDomainCreateLinux() failed')
libvirt.libvirtError: virDomainCreateLinux() failed
[root@server01 ~]# free -m
total used free shared buffers cached
Mem: 426 400 25 0 7 66
-/+ buffers/cache: 327 98
Swap: 6431 0 6431


This is rather interesting:

[root@server01 ~]# cat /proc/meminfo
MemTotal: 436224 kB
MemFree: 26096 kB
Buffers: 7572 kB
Cached: 67668 kB
SwapCached: 168 kB
Active: 259948 kB
Inactive: 35956 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 436224 kB
LowFree: 26096 kB
SwapTotal: 6586360 kB
SwapFree: 6586192 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 220612 kB
Mapped: 15584 kB
Slab: 33460 kB
PageTables: 8308 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
CommitLimit: 6804472 kB
Committed_AS: 430116 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 3936 kB
VmallocChunk: 34359733387 kB


Yet, dmesg sees the 2GB


Xen reported: 2666.762 MHz processor.
Console: colour VGA+ 80x25
Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
Software IO TLB enabled:
Aperture: 2 megabytes
Kernel range: 0xffff880000ab6000 - 0xffff880000cb6000
PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
Memory: 1869056k/1926216k available (2321k kernel code, 48376k reserved, 1312k data, 168k init)
Calibrating delay using timer specific routine.. 6669.19 BogoMIPS (lpj=13338382)

topdog
26th February 2008, 12:29
There is a kernel option you need to append at the boot loader prompt to get it to see all the memory, i had a similar problem, but i have forgotten what the option is, it on my dev system at home.

SoftDux
26th February 2008, 12:35
I figured as much, since the normal kernel detects the full 2GB RAM. I would have thought it could be a PAE problem, but I don't have 4GB RAM (yet), so it's not that. thanx for the pointer, I'll see what I can get.

P.S. I would have thought that you'd put it on your website? :)

SoftDux
26th February 2008, 13:46
ok, I found the patch to fit it: https://bugzilla.redhat.com/show_bug.cgi?id=250299

But I still can't create the domU's, how do I debug it?

tail -f /var/log/xen/xend.log shows this:


[2008-02-26 13:38:41 xend.XendDomainInfo 2880] DEBUG (XendDomainInfo:190) XendDomainInfo.create(['vm', ['name', 'vm04'], ['memory', '256'], ['maxmem', '256'], ['vcpus', '1'], ['uuid', 'e6a5f315-3fa9-85ca-298c-95ec5ad84d2b'], ['on_poweroff', 'destroy'], ['on_reboot', 'destroy'], ['on_crash', 'destroy'], ['image', ['linux', ['kernel', '/var/lib/xen/vmlinuz.EVM4GG'], ['ramdisk', '/var/lib/xen/initrd.img.mxVTDL'], ['args', ' method=nfs:localhost:/mnt/dvd ']]], ['device', ['tap', ['dev', 'xvda'], ['uname', 'tap:aio:/vm/vm04.img'], ['mode', 'w']]], ['device', ['vif', ['mac', '00:16:3e:61:e5:6b'], ['bridge', 'xenbr0'], ['script', '/etc/xen/scripts/vif-bridge']]]])
[2008-02-26 13:38:41 xend.XendDomainInfo 2880] DEBUG (XendDomainInfo:296) parseConfig: config is ['vm', ['name', 'vm04'], ['memory', '256'], ['maxmem', '256'], ['vcpus', '1'], ['uuid', 'e6a5f315-3fa9-85ca-298c-95ec5ad84d2b'], ['on_poweroff', 'destroy'], ['on_reboot', 'destroy'], ['on_crash', 'destroy'], ['image', ['linux', ['kernel', '/var/lib/xen/vmlinuz.EVM4GG'], ['ramdisk', '/var/lib/xen/initrd.img.mxVTDL'], ['args', ' method=nfs:localhost:/mnt/dvd ']]], ['device', ['tap', ['dev', 'xvda'], ['uname', 'tap:aio:/vm/vm04.img'], ['mode', 'w']]], ['device', ['vif', ['mac', '00:16:3e:61:e5:6b'], ['bridge', 'xenbr0'], ['script', '/etc/xen/scripts/vif-bridge']]]]
[2008-02-26 13:38:41 xend.XendDomainInfo 2880] DEBUG (XendDomainInfo:397) parseConfig: result is {'shadow_memory': None, 'start_time': None, 'uuid': 'e6a5f315-3fa9-85ca-298c-95ec5ad84d2b', 'on_crash': 'destroy', 'on_reboot': 'destroy', 'localtime': None, 'image': ['linux', ['kernel', '/var/lib/xen/vmlinuz.EVM4GG'], ['ramdisk', '/var/lib/xen/initrd.img.mxVTDL'], ['args', ' method=nfs:localhost:/mnt/dvd ']], 'on_poweroff': 'destroy', 'bootloader_args': None, 'cpus': None, 'name': 'vm04', 'backend': [], 'vcpus': 1, 'cpu_weight': None, 'features': None, 'vcpu_avail': None, 'memory': 256, 'device': [('tap', ['tap', ['dev', 'xvda'], ['uname', 'tap:aio:/vm/vm04.img'], ['mode', 'w']]), ('vif', ['vif', ['mac', '00:16:3e:61:e5:6b'], ['bridge', 'xenbr0'], ['script', '/etc/xen/scripts/vif-bridge']])], 'bootloader': None, 'cpu': None, 'maxmem': 256}
[2008-02-26 13:38:41 xend.XendDomainInfo 2880] DEBUG (XendDomainInfo:1264) XendDomainInfo.construct: None
[2008-02-26 13:38:41 xend.XendDomainInfo 2880] DEBUG (XendDomainInfo:1296) XendDomainInfo.initDomain: 4 1.0
[2008-02-26 13:38:41 xend 2880] DEBUG (balloon:133) Balloon: 8580 KiB free; 0 to scrub; need 262144; retries: 20.
[2008-02-26 13:38:41 xend 2880] DEBUG (balloon:148) Balloon: setting dom0 target to 957 MiB.
[2008-02-26 13:38:41 xend.XendDomainInfo 2880] DEBUG (XendDomainInfo:1021) Setting memory target of domain Domain-0 (0) to 957 MiB.
[2008-02-26 13:38:41 xend 2880] DEBUG (balloon:127) Balloon: 262532 KiB free; need 262144; done.
[2008-02-26 13:38:41 xend 2880] INFO (image:136) buildDomain os=linux dom=4 vcpus=1
[2008-02-26 13:38:41 xend 2880] DEBUG (image:199) dom = 4
[2008-02-26 13:38:41 xend 2880] DEBUG (image:200) image = /var/lib/xen/vmlinuz.EVM4GG
[2008-02-26 13:38:41 xend 2880] DEBUG (image:201) store_evtchn = 1
[2008-02-26 13:38:41 xend 2880] DEBUG (image:202) console_evtchn = 2
[2008-02-26 13:38:41 xend 2880] DEBUG (image:203) cmdline = method=nfs:localhost:/mnt/dvd
[2008-02-26 13:38:41 xend 2880] DEBUG (image:204) ramdisk = /var/lib/xen/initrd.img.mxVTDL
[2008-02-26 13:38:41 xend 2880] DEBUG (image:205) vcpus = 1
[2008-02-26 13:38:41 xend 2880] DEBUG (image:206) features =
[2008-02-26 13:38:41 xend.XendDomainInfo 2880] ERROR (XendDomainInfo:202) Domain construction failed
Traceback (most recent call last):
File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py", line 195, in create
vm.initDomain()
File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py", line 1377, in initDomain
raise VmError(str(exn))
VmError: (22, 'Invalid argument')
[2008-02-26 13:38:41 xend.XendDomainInfo 2880] DEBUG (XendDomainInfo:1463) XendDomainInfo.destroy: domid=4
[2008-02-26 13:38:41 xend.XendDomainInfo 2880] DEBUG (XendDomainInfo:1471) XendDomainInfo.destroyDomain(4)
[2008-02-26 13:38:41 xend 2880] ERROR (SrvBase:88) Request create failed.
Traceback (most recent call last):
File "/usr/lib64/python2.4/site-packages/xen/web/SrvBase.py", line 85, in perform
return op_method(op, req)
File "/usr/lib64/python2.4/site-packages/xen/xend/server/SrvDomainDir.py", line 82, in op_create
raise XendError("Error creating domain: " + str(ex))
XendError: Error creating domain: (22, 'Invalid argument')



Any suggestions for this?

falko
27th February 2008, 13:19
What does the Xen configuration file for that vm look like?