XEN on Centos 5.2 HOWTO problem

Discussion in 'HOWTO-Related Questions' started by bradley, Nov 16, 2008.

  1. bradley

    bradley New Member

    Hey, setting up a remote centos 5.2 server to run xen, I followed the How-To at:
    http://www.howtoforge.com/installing-xen-on-centos-5.2-i386

    and now am stuck after creating a new machine:

    [root@backupbox gimp]# virt-install
    Would you like a fully virtualized guest (yes or no)? This will allow you to run unmodified operating systems. yes
    What is the name of your virtual machine? orange
    How much RAM should be allocated (in megabytes)? 256
    What would you like to use as the disk (file path)? /data/orange.img
    How large would you like the disk (/data/orange.img) to be (in gigabytes)? 4
    Would you like to enable graphics support? (yes or no) no
    What is the virtual CD image, CD device or install location? ftp://10.6.1.45/pub/linux/centos/5.2/


    Starting install...
    Retrieving file CentOS... 292 kB 00:01
    Retrieving file boot.iso. 100% |=========================| 8.0 MB 00:08
    Creating storage file... 100% |=========================| 4.0 GB 00:00
    Creating domain... 0 B 00:00
    No console available for domain

    Domain installation still in progress. You can reconnect to
    the console to complete the installation process.
    [root@backupbox gimp]#xm list
    Name ID Mem(MiB) VCPUs State Time(s)
    Domain-0 0 1474 4 r----- 440.5
    orange 6 255 1 ------ 0.0
    [root@backupbox gimp]# xm console orange
    xenconsole: Could not read tty from store: No such file or directory
    [root@backupbox gimp]#

    Logs:

    [root@backupbox gimp]# tail -50 /var/log/xen/xend.log
    [2008-11-17 01:40:53 xend.XendDomainInfo 6754] DEBUG (XendDomainInfo:200) XendDomainInfo.create(['vm', ['name', 'orange'], ['memory', '256'], ['maxmem', '256'], ['vcpus', '1'], ['uuid', '3a410a4b-b57f-646c-9f49-dab3b6c1d701'], ['on_poweroff', 'destroy'], ['on_reboot', 'destroy'], ['on_crash', 'destroy'], ['image', ['hvm', ['kernel', '/usr/lib/xen/boot/hvmloader'], ['device_model', '/usr/lib64/xen/bin/qemu-dm'], ['vcpus', '1'], ['boot', 'd'], ['acpi', '1'], ['apic', '1'], ['pae', '1'], ['usb', '1'], ['serial', 'pty']]], ['device', ['vbd', ['dev', 'hda:disk'], ['uname', 'file:/data/orange.img'], ['mode', 'w']]], ['device', ['vbd', ['dev', 'hdc:cdrom'], ['uname', 'file:/var/lib/xen/virtinst-boot.iso.hU6Vfx'], ['mode', 'r']]], ['device', ['vif', ['mac', '00:16:3e:0a:a1:11'], ['bridge', 'xenbr0']]]])
    [2008-11-17 01:40:53 xend.XendDomainInfo 6754] DEBUG (XendDomainInfo:306) parseConfig: config is ['vm', ['name', 'orange'], ['memory', '256'], ['maxmem', '256'], ['vcpus', '1'], ['uuid', '3a410a4b-b57f-646c-9f49-dab3b6c1d701'], ['on_poweroff', 'destroy'], ['on_reboot', 'destroy'], ['on_crash', 'destroy'], ['image', ['hvm', ['kernel', '/usr/lib/xen/boot/hvmloader'], ['device_model', '/usr/lib64/xen/bin/qemu-dm'], ['vcpus', '1'], ['boot', 'd'], ['acpi', '1'], ['apic', '1'], ['pae', '1'], ['usb', '1'], ['serial', 'pty']]], ['device', ['vbd', ['dev', 'hda:disk'], ['uname', 'file:/data/orange.img'], ['mode', 'w']]], ['device', ['vbd', ['dev', 'hdc:cdrom'], ['uname', 'file:/var/lib/xen/virtinst-boot.iso.hU6Vfx'], ['mode', 'r']]], ['device', ['vif', ['mac', '00:16:3e:0a:a1:11'], ['bridge', 'xenbr0']]]]
    [2008-11-17 01:40:53 xend.XendDomainInfo 6754] DEBUG (XendDomainInfo:411) parseConfig: result is {'shadow_memory': None, 'start_time': None, 'uuid': '3a410a4b-b57f-646c-9f49-dab3b6c1d701', 'on_crash': 'destroy', 'on_reboot': 'destroy', 'localtime': None, 'image': ['hvm', ['kernel', '/usr/lib/xen/boot/hvmloader'], ['device_model', '/usr/lib64/xen/bin/qemu-dm'], ['vcpus', '1'], ['boot', 'd'], ['acpi', '1'], ['apic', '1'], ['pae', '1'], ['usb', '1'], ['serial', 'pty']], 'on_poweroff': 'destroy', 'bootloader_args': None, 'cpus': None, 'name': 'orange', 'backend': [], 'vcpus': 1, 'cpu_weight': None, 'features': None, 'vcpu_avail': None, 'memory': 256, 'device': [('vbd', ['vbd', ['dev', 'hda:disk'], ['uname', 'file:/data/orange.img'], ['mode', 'w']]), ('vbd', ['vbd', ['dev', 'hdc:cdrom'], ['uname', 'file:/var/lib/xen/virtinst-boot.iso.hU6Vfx'], ['mode', 'r']]), ('vif', ['vif', ['mac', '00:16:3e:0a:a1:11'], ['bridge', 'xenbr0']])], 'bootloader': None, 'cpu': None, 'maxmem': 256}
    [2008-11-17 01:40:53 xend.XendDomainInfo 6754] DEBUG (XendDomainInfo:1350) XendDomainInfo.construct: None
    [2008-11-17 01:40:53 xend 6754] DEBUG (balloon:127) Balloon: 542532 KiB free; need 2048; done.
    [2008-11-17 01:40:53 xend.XendDomainInfo 6754] DEBUG (XendDomainInfo:1398) XendDomainInfo.initDomain: 6 1.0
    [2008-11-17 01:40:53 xend 6754] DEBUG (image:324) args: boot, val: d
    [2008-11-17 01:40:53 xend 6754] DEBUG (image:324) args: fda, val: None
    [2008-11-17 01:40:53 xend 6754] DEBUG (image:324) args: fdb, val: None
    [2008-11-17 01:40:53 xend 6754] DEBUG (image:324) args: soundhw, val: None
    [2008-11-17 01:40:53 xend 6754] DEBUG (image:324) args: localtime, val: None
    [2008-11-17 01:40:53 xend 6754] DEBUG (image:324) args: serial, val: pty
    [2008-11-17 01:40:53 xend 6754] DEBUG (image:324) args: std-vga, val: None
    [2008-11-17 01:40:53 xend 6754] DEBUG (image:324) args: isa, val: None
    [2008-11-17 01:40:53 xend 6754] DEBUG (image:324) args: vcpus, val: 1
    [2008-11-17 01:40:53 xend 6754] DEBUG (image:324) args: acpi, val: 1
    [2008-11-17 01:40:53 xend 6754] DEBUG (image:324) args: usb, val: 1
    [2008-11-17 01:40:53 xend 6754] DEBUG (image:324) args: usbdevice, val: None
    [2008-11-17 01:40:53 xend 6754] DEBUG (image:324) args: k, val: None
    [2008-11-17 01:40:53 xend.XendDomainInfo 6754] DEBUG (XendDomainInfo:1437) _initDomain:shadow_memory=0x0, maxmem=0x100, memory=0x100.
    [2008-11-17 01:40:53 xend 6754] DEBUG (balloon:127) Balloon: 541496 KiB free; need 273408; done.
    [2008-11-17 01:40:53 xend 6754] INFO (image:137) buildDomain os=None dom=6 vcpus=1
    [2008-11-17 01:40:53 xend 6754] DEBUG (image:269) domid = 6
    [2008-11-17 01:40:53 xend 6754] DEBUG (image:270) image = /usr/lib/xen/boot/hvmloader
    [2008-11-17 01:40:53 xend 6754] DEBUG (image:271) store_evtchn = 2
    [2008-11-17 01:40:53 xend 6754] DEBUG (image:272) memsize = 256
    [2008-11-17 01:40:53 xend 6754] DEBUG (image:273) vcpus = 1
    [2008-11-17 01:40:53 xend 6754] DEBUG (image:274) pae = 1
    [2008-11-17 01:40:53 xend 6754] DEBUG (image:275) acpi = 1
    [2008-11-17 01:40:53 xend 6754] DEBUG (image:276) apic = 1
    [2008-11-17 01:40:53 xend 6754] DEBUG (blkif:24) exception looking up device number for hda: [Errno 2] No such file or directory: '/dev/hda'
    [2008-11-17 01:40:53 xend 6754] DEBUG (DevController:110) DevController: writing {'backend-id': '0', 'virtual-device': '768', 'device-type': 'disk', 'state': '1', 'backend': '/local/domain/0/backend/vbd/6/768'} to /local/domain/6/device/vbd/768.
    [2008-11-17 01:40:53 xend 6754] DEBUG (DevController:112) DevController: writing {'domain': 'orange', 'frontend': '/local/domain/6/device/vbd/768', 'format': 'raw', 'dev': 'hda', 'state': '1', 'params': '/data/orange.img', 'mode': 'w', 'online': '1', 'frontend-id': '6', 'type': 'file'} to /local/domain/0/backend/vbd/6/768.
    [2008-11-17 01:40:53 xend 6754] DEBUG (blkif:24) exception looking up device number for hdc: [Errno 2] No such file or directory: '/dev/hdc'
    [2008-11-17 01:40:53 xend 6754] DEBUG (DevController:110) DevController: writing {'backend-id': '0', 'virtual-device': '5632', 'device-type': 'cdrom', 'state': '1', 'backend': '/local/domain/0/backend/vbd/6/5632'} to /local/domain/6/device/vbd/5632.
    [2008-11-17 01:40:53 xend 6754] DEBUG (DevController:112) DevController: writing {'domain': 'orange', 'frontend': '/local/domain/6/device/vbd/5632', 'format': 'raw', 'dev': 'hdc', 'state': '1', 'params': '/var/lib/xen/virtinst-boot.iso.hU6Vfx', 'mode': 'r', 'online': '1', 'frontend-id': '6', 'type': 'file'} to /local/domain/0/backend/vbd/6/5632.
    [2008-11-17 01:40:53 xend 6754] DEBUG (DevController:110) DevController: writing {'backend-id': '0', 'mac': '00:16:3e:0a:a1:11', 'handle': '0', 'state': '1', 'backend': '/local/domain/0/backend/vif/6/0'} to /local/domain/6/device/vif/0.
    [2008-11-17 01:40:53 xend 6754] DEBUG (DevController:112) DevController: writing {'bridge': 'xenbr0', 'domain': 'orange', 'handle': '0', 'script': '/etc/xen/scripts/vif-bridge', 'state': '1', 'frontend': '/local/domain/6/device/vif/0', 'mac': '00:16:3e:0a:a1:11', 'online': '1', 'frontend-id': '6'} to /local/domain/0/backend/vif/6/0.
    [2008-11-17 01:40:53 xend 6754] INFO (image:428) spawning device models: /usr/lib64/xen/bin/qemu-dm ['/usr/lib64/xen/bin/qemu-dm', '-d', '6', '-m', '256', '-boot', 'd', '-serial', 'pty', '-vcpus', '1', '-acpi', '-usb', '-domain-name', 'orange', '-net', 'nic,vlan=1,macaddr=00:16:3e:0a:a1:11,model=rtl8139', '-net', 'tap,vlan=1,bridge=xenbr0']
    [2008-11-17 01:40:53 xend 6754] INFO (image:430) device model pid: 5962
    [2008-11-17 01:40:53 xend.XendDomainInfo 6754] DEBUG (XendDomainInfo:756) Storing VM details: {'shadow_memory': '3', 'uuid': '3a410a4b-b57f-646c-9f49-dab3b6c1d701', 'on_reboot': 'destroy', 'start_time': '1226904053.26', 'on_poweroff': 'destroy', 'name': 'orange', 'xend/restart_count': '0', 'vcpus': '1', 'vcpu_avail': '1', 'memory': '256', 'on_crash': 'destroy', 'image': '(hvm (kernel /usr/lib/xen/boot/hvmloader) (device_model /usr/lib64/xen/bin/qemu-dm) (vcpus 1) (boot d) (acpi 1) (apic 1) (pae 1) (usb 1) (serial pty))', 'maxmem': '256'}
    [2008-11-17 01:40:53 xend.XendDomainInfo 6754] DEBUG (XendDomainInfo:791) Storing domain details: {'console/port': '3', 'name': 'orange', 'console/limit': '1048576', 'vm': '/vm/3a410a4b-b57f-646c-9f49-dab3b6c1d701', 'domid': '6', 'cpu/0/availability': 'online', 'memory/target': '262144', 'store/ring-ref': '65534', 'store/port': '2'}
    [2008-11-17 01:40:53 xend.XendDomainInfo 6754] DEBUG (XendDomainInfo:989) XendDomainInfo.handleShutdownWatch
    [2008-11-17 01:40:53 xend 6754] DEBUG (DevController:143) Waiting for devices vif.
    [2008-11-17 01:40:53 xend 6754] DEBUG (DevController:149) Waiting for 0.
    [2008-11-17 01:40:53 xend 6754] DEBUG (DevController:476) hotplugStatusCallback /local/domain/0/backend/vif/6/0/hotplug-status.
    [2008-11-17 01:40:53 xend 6754] DEBUG (DevController:476) hotplugStatusCallback /local/domain/0/backend/vif/6/0/hotplug-status.
    [2008-11-17 01:40:53 xend 6754] DEBUG (DevController:490) hotplugStatusCallback 1.
    [2008-11-17 01:40:53 xend 6754] DEBUG (DevController:143) Waiting for devices usb.
    [2008-11-17 01:40:53 xend 6754] DEBUG (DevController:143) Waiting for devices vbd.
    [2008-11-17 01:40:53 xend 6754] DEBUG (DevController:149) Waiting for 768.
    [2008-11-17 01:40:53 xend 6754] DEBUG (DevController:476) hotplugStatusCallback /local/domain/0/backend/vbd/6/768/hotplug-status.
    [2008-11-17 01:40:53 xend 6754] DEBUG (DevController:490) hotplugStatusCallback 1.
    [2008-11-17 01:40:53 xend 6754] DEBUG (DevController:149) Waiting for 5632.
    [2008-11-17 01:40:53 xend 6754] DEBUG (DevController:476) hotplugStatusCallback /local/domain/0/backend/vbd/6/5632/hotplug-status.
    [2008-11-17 01:40:53 xend 6754] DEBUG (DevController:476) hotplugStatusCallback /local/domain/0/backend/vbd/6/5632/hotplug-status.
    [2008-11-17 01:40:53 xend 6754] DEBUG (DevController:490) hotplugStatusCallback 1.
    [2008-11-17 01:40:53 xend 6754] DEBUG (DevController:143) Waiting for devices irq.
    [2008-11-17 01:40:53 xend 6754] DEBUG (DevController:143) Waiting for devices vkbd.
    [2008-11-17 01:40:53 xend 6754] DEBUG (DevController:143) Waiting for devices vfb.
    [2008-11-17 01:40:53 xend 6754] DEBUG (DevController:143) Waiting for devices pci.
    [2008-11-17 01:40:53 xend 6754] DEBUG (DevController:143) Waiting for devices ioports.
    [2008-11-17 01:40:53 xend 6754] DEBUG (DevController:143) Waiting for devices tap.
    [2008-11-17 01:40:53 xend 6754] DEBUG (DevController:143) Waiting for devices vtpm.
    [2008-11-17 01:40:53 xend 6754] INFO (XendDomain:380) Domain orange (6) unpaused.

    [root@backupbox gimp]# tail /var/log/xen/qemu-dm.5962.log
    domid: 6
    qemu: the number of cpus is 1
    Watching /local/domain/6/logdirty/next-active
    Could not initialize SDL - exiting


    I've searched for some time about this and am having no luck. I suspect the last line here is the issue - can someone `xen smart` detail how this problem can be fixed?

    Thanks,
    ~Bradley
     
    Last edited: Nov 17, 2008
  2. falko

    falko Super Moderator Howtoforge Staff

    Can you try
    Code:
    yum install SDL
    ?
     
  3. bradley

    bradley New Member

    Installing SDL

    Great suggestion. Unfortunately, the error message is the same. :(

    However - I have had some success (it seems) -

    I've made an attempt to modify some config options to use VNC instead of SDL, and running
    xm create /data/orange.img now tells me:

    Error: No kernel specified

    Without making changes to the vm configuration, the previously mentioned behavior still persists :(

    Thanks a million for any ideas about this.


    ~Bradley
     
  4. bradley

    bradley New Member

    update...

    So, now, by choosing 'yes' for the graphical installer, it works with a VNC session.

    Installed centos on another box, xen works fine there.

    This box doesn't have a CDROM drive - wondering if that could be the root cause here.

    My xen powers are so weak today :(
     
  5. falko

    falko Super Moderator Howtoforge Staff

    Not sure. What's in the logs now?
     
  6. bradley

    bradley New Member

    Same

    I wish I could tell you the logs or the error message were any different than the ones above.

    Specifically, I was looking at this line:
    [2008-11-17 01:40:53 xend 6754] DEBUG (blkif:24) exception looking up device number for hdc: [Errno 2] No such file or directory: '/dev/hdc'

    Unfortunately, configuring the value has no effect on the SDL error.

    In the How-to... the domu configuration file example didn't specify if readers should alter any values generated by virt-install. My generated configuration file looks very different than the one presented.

    Code:
    name = "grape"
    uuid = "c3b505e0-b0fe-e8b5-03fb-093376019dbf"
    maxmem = 256
    memory = 256
    vcpus = 1
    builder = "hvm"
    kernel = "/usr/lib/xen/boot/hvmloader"
    boot = "c"
    pae = 1
    acpi = 1
    apic = 1
    localtime = 0
    on_poweroff = "destroy"
    on_reboot = "restart"
    on_crash = "restart"
    device_model = "/usr/lib64/xen/bin/qemu-dm"
    sdl = 0
    vnc = 0
    vncunused = 0
    vncdisplay = "-5900"
    disk = [ "file:/xen/grape.img,hda,w", ",hdc:cdrom,r" ]
    vif = [ "mac=00:16:3e:56:66:6b,bridge=xenbr0" ]
    serial = "pty"
    
    Altering the file to be closer to the HowTo example resulted in a new error... :)
    Code:
    name = "grape"
    uuid = "c3b505e0-b0fe-e8b5-03fb-093376019dbf"
    maxmem = 256
    memory = 256
    vcpus = 1
    bootloader = "/usr/bin/pygrub"
    on_poweroff = "destroy"
    on_reboot = "restart"
    on_crash = "restart"
    vfb = [  ]
    disk = [ "tap:aio:/xen/grape.img,xvda,w" ]
    vif = [ "mac=00:16:3e:56:66:6b,bridge=xenbr0" ]
    
    [root@boxbackup xen]# xm create -c /etc/xen/grape
    Using config file "/etc/xen/grape".
    Traceback (most recent call last):
    File "/usr/bin/pygrub", line 651, in ?
    fs = fsimage.open(file, get_fs_offset(file))
    IOError: [Errno 95] Operation not supported
    No handlers could be found for logger "xend"
    Error: Boot loader didn't return any data!

    Still so clueless here.

    Really, if I need to just RTFM, please let me know, maybe paste a link :) I'm reading up on the xen docs, they're useful in some ways, not so much in others.

    Thanks for any help.
     
  7. falko

    falko Super Moderator Howtoforge Staff

    Do you need a CD drive in your virtual machine? I'd just leave it out of the configuration:

    Code:
    name = "grape"
    uuid = "c3b505e0-b0fe-e8b5-03fb-093376019dbf"
    maxmem = 256
    memory = 256
    vcpus = 1
    builder = "hvm"
    kernel = "/usr/lib/xen/boot/hvmloader"
    boot = "c"
    pae = 1
    acpi = 1
    apic = 1
    localtime = 0
    on_poweroff = "destroy"
    on_reboot = "restart"
    on_crash = "restart"
    device_model = "/usr/lib64/xen/bin/qemu-dm"
    sdl = 0
    vnc = 0
    vncunused = 0
    vncdisplay = "-5900"
    disk = [ "file:/xen/grape.img,hda,w" ]
    vif = [ "mac=00:16:3e:56:66:6b,bridge=xenbr0" ]
    serial = "pty"
     
  8. bradley

    bradley New Member

    Vnc

    Ok, so, the only change that makes the difference between working and foobar is VNC.

    Activating VNC on the domu makes it work perfectly. Deactivate VNC, and the errors posted above occur. Basically, the machines cant be used without VNC.

    Any idea what that means? :)
     
  9. falko

    falko Super Moderator Howtoforge Staff

  10. bradley

    bradley New Member

    Fix

    Turns out.... there was never an error. :eek:

    Virtual machines running under the hypervisor do not have xenconsole support from the beginning. Paravirtualized machines have no problems with the console.

    Nice FAQ here, including how to enable the console support on an HVM.

    http://os-drive.com/files/docbook/xen-faq.html#serial_console_hvm

    Thanks for all the help falko :cool:
     

Share This Page