[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] How was CoW implemented on the Demo LiveCD (3.0) ??


  • To: Tim Deegan <Tim.Deegan@xxxxxxxxxxxx>
  • From: Anand <xen.mails@xxxxxxxxx>
  • Date: Wed, 25 Jan 2006 17:44:09 +0530
  • Cc: xen-users@xxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 25 Jan 2006 12:23:01 +0000
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=E5i7pvlmxNUn+mD887R7wpx+MheZHp4qDG9nM9hokwjcQkkl7hzE466N/7h6blPNs1KFdWyw9PV3kOCQcsu0EP6FOeLS2S7cj2oa6NpiB3fzer7RMxfMfwEYK7NsMLwxbQReODuoJnAkgieqgs+hpwoTQIkc0g0G/Dyi2SPfi6w=
  • List-id: Xen user discussion <xen-users.lists.xensource.com>

I copied the /etc/xen/scripts/block-cow, /usr/sbin/create_cow, /usr/sbin/destroy_cow files from the demo cd onto the testing machine.

When i try to use the same line as in the centos config file in the demo cd, i get the following:

[2006-01-25 17:35:30 xend.XendDomainInfo] DEBUG (XendDomainInfo:177) XendDomainInfo.create(['vm', ['name', 'vm01'], ['memory', '32'], ['image', ['linux', ['kernel', '/boot/vmlinuz-2.6.12.6-xen'], ['ramdisk', '/boot/initrd- 2.6.12.6-xen.img'], ['root', '/dev/sda1 ro'], ['args', 'selinux=0 elevator=cfq'], ['vcpus', '1'], ['vcpus', '1'], ['boot', 'c'], ['nics', '1']]], ['device', ['vbd', ['uname', 'cow:/root/xen/centos.4-2.img 50'], ['dev', 'sda1'], ['mode', 'w']]], ['device', ['vbd', ['uname', 'file:/root/xen/centos.swap'], ['dev', 'sda2'], ['mode', 'w']]], ['device', ['vif', ['mac', 'AA:00:00:18:98:FB'], ['vifname', 'vm01'], ['bridge', 'xenbr0']]]])
[2006-01-25 17:35:30 xend.XendDomainInfo] DEBUG (XendDomainInfo:282) parseConfig: config is ['vm', ['name', 'vm01'], ['memory', '32'], ['image', ['linux', ['kernel', '/boot/vmlinuz-2.6.12.6-xen'], ['ramdisk', '/boot/initrd- 2.6.12.6-xen.img'], ['root', '/dev/sda1 ro'], ['args', 'selinux=0 elevator=cfq'], ['vcpus', '1'], ['vcpus', '1'], ['boot', 'c'], ['nics', '1']]], ['device', ['vbd', ['uname', 'cow:/root/xen/centos.4-2.img 50'], ['dev', 'sda1'], ['mode', 'w']]], ['device', ['vbd', ['uname', 'file:/root/xen/centos.swap'], ['dev', 'sda2'], ['mode', 'w']]], ['device', ['vif', ['mac', 'AA:00:00:18:98:FB'], ['vifname', 'vm01'], ['bridge', 'xenbr0']]]]
[2006-01-25 17:35:30 xend.XendDomainInfo] DEBUG (XendDomainInfo:374) parseConfig: result is {'ssidref': None, 'uuid': None, 'on_crash': None, 'on_reboot': None, 'image': ['linux', ['kernel', '/boot/vmlinuz-2.6.12.6-xen '], ['ramdisk', '/boot/initrd-2.6.12.6-xen.img'], ['root', '/dev/sda1 ro'], ['args', 'selinux=0 elevator=cfq'], ['vcpus', '1'], ['vcpus', '1'], ['boot', 'c'], ['nics', '1']], 'on_poweroff': None, 'cpus': None, 'name': 'vm01', 'backend': [], 'vcpus': 1, 'cpu_weight': None, 'vcpu_avail': None, 'memory': 32, 'device': [('vbd', ['vbd', ['uname', 'cow:/root/xen/centos.4- 2.img 50'], ['dev', 'sda1'], ['mode', 'w']]), ('vbd', ['vbd', ['uname', 'file:/root/xen/centos.swap'], ['dev', 'sda2'], ['mode', 'w']]), ('vif', ['vif', ['mac', 'AA:00:00:18:98:FB'], ['vifname', 'vm01'], ['bridge', 'xenbr0']])], 'bootloader': None, 'cpu': None, 'maxmem': None}
[2006-01-25 17:35:30 xend.XendDomainInfo] DEBUG (XendDomainInfo:1129) XendDomainInfo.construct: None 0
[2006-01-25 17:35:30 xend.XendDomainInfo] DEBUG (XendDomainInfo:1161) XendDomainInfo.initDomain: 50 1.0
[2006-01-25 17:35:30 xend] DEBUG (balloon:84) Balloon: free 746; need 33; done.
[2006-01-25 17:35:30 xend] INFO (image:132) buildDomain os=linux dom=50 vcpus=1
[2006-01-25 17:35:30 xend] DEBUG (image:170) dom            = 50
[2006-01-25 17:35:30 xend] DEBUG (image:171) image          = /boot/vmlinuz- 2.6.12.6-xen
[2006-01-25 17:35:30 xend] DEBUG (image:172) store_evtchn   = 1
[2006-01-25 17:35:30 xend] DEBUG (image:173) console_evtchn = 2
[2006-01-25 17:35:30 xend] DEBUG (image:174) cmdline        =  root=/dev/sda1 ro selinux=0 elevator=cfq
[2006-01-25 17:35:30 xend] DEBUG (image:175) ramdisk        = /boot/initrd-2.6.12.6-xen.img
[2006-01-25 17:35:30 xend] DEBUG (image:176) vcpus          = 1
[2006-01-25 17:35:30 xend] DEBUG (blkif:24) exception looking up device number for sda1: [Errno 2] No such file or directory: '/dev/sda1'
[2006-01-25 17:35:30 xend] DEBUG (DevController:104) DevController: writing {'virtual-device': '2049', 'backend-id': '0', 'state': '1', 'backend': '/local/domain/0/backend/vbd/50/2049'} to /local/domain/50/device/vbd/2049.
[2006-01-25 17:35:30 xend] DEBUG (DevController:106) DevController: writing {'domain': 'vm01', 'frontend': '/local/domain/50/device/vbd/2049', 'dev': 'sda1', 'state': '1', 'params': '/root/xen/centos.4-2.img 50', 'mode': 'w', 'frontend-id': '50', 'type': 'cow'} to /local/domain/0/backend/vbd/50/2049.
[2006-01-25 17:35:30 xend] DEBUG (blkif:24) exception looking up device number for sda2: [Errno 2] No such file or directory: '/dev/sda2'
[2006-01-25 17:35:30 xend] DEBUG (DevController:104) DevController: writing {'virtual-device': '2050', 'backend-id': '0', 'state': '1', 'backend': '/local/domain/0/backend/vbd/50/2050'} to /local/domain/50/device/vbd/2050.
[2006-01-25 17:35:30 xend] DEBUG (DevController:106) DevController: writing {'domain': 'vm01', 'frontend': '/local/domain/50/device/vbd/2050', 'dev': 'sda2', 'state': '1', 'params': '/root/xen/centos.swap', 'mode': 'w', 'frontend-id': '50', 'type': 'file'} to /local/domain/0/backend/vbd/50/2050.
[2006-01-25 17:35:30 xend] DEBUG (DevController:104) DevController: writing {'backend-id': '0', 'mac': 'AA:00:00:18:98:FB', 'handle': '0', 'state': '1', 'backend': '/local/domain/0/backend/vif/50/0'} to /local/domain/50/device/vif/0.
[2006-01-25 17:35:30 xend] DEBUG (DevController:106) DevController: writing {'bridge': 'xenbr0', 'domain': 'vm01', 'handle': '0', 'script': '/etc/xen/scripts/vif-bridge', 'state': '1', 'frontend': '/local/domain/50/device/vif/0', 'mac': 'AA:00:00:18:98:FB', 'vifname': 'vm01', 'frontend-id': '50'} to /local/domain/0/backend/vif/50/0.
[2006-01-25 17:35:30 xend.XendDomainInfo] DEBUG (XendDomainInfo:661) Storing VM details: {'ssidref': '0', 'uuid': 'c0cc9a09-8da6a9f9-b6c7a099-b87607ad', 'on_reboot': 'restart', 'start_time': '1138190730.29', 'on_poweroff': 'destroy', 'name': 'vm01', 'vcpus': '1', 'vcpu_avail': '1', 'memory': '32', 'on_crash': 'restart', 'image': "(linux (kernel /boot/vmlinuz- 2.6.12.6-xen) (ramdisk /boot/initrd-2.6.12.6-xen.img) (root '/dev/sda1 ro') (args 'selinux=0 elevator=cfq') (vcpus 1) (vcpus 1) (boot c) (nics 1))", 'maxmem': '32'}
[2006-01-25 17:35:30 xend.XendDomainInfo] DEBUG (XendDomainInfo:686) Storing domain details: {'console/ring-ref': '49179', 'console/port': '2', 'name': 'vm01', 'console/limit': '1048576', 'vm': '/vm/c0cc9a09-8da6a9f9-b6c7a099-b87607ad', 'domid': '50', 'cpu/0/availability': 'online', 'memory/target': '32768', 'store/ring-ref': '58180', 'store/port': '1'}
[2006-01-25 17:35:30 xend] DEBUG (DevController:133) Waiting for devices vif.
[2006-01-25 17:35:30 xend] DEBUG (DevController:139) Waiting for 0.
[2006-01-25 17:35:30 xend] DEBUG (DevController:409) hotplugStatusCallback /local/domain/0/backend/vif/50/0/hotplug-status.
[2006-01-25 17:35:30 xend] DEBUG (DevController:409) hotplugStatusCallback /local/domain/0/backend/vif/50/0/hotplug-status.
[2006-01-25 17:35:30 xend] DEBUG (DevController:426) hotplugStatusCallback 1.
[2006-01-25 17:35:30 xend] DEBUG (DevController:133) Waiting for devices usb.
[2006-01-25 17:35:30 xend] DEBUG (DevController:133) Waiting for devices vbd.
[2006-01-25 17:35:30 xend] DEBUG (DevController:139) Waiting for 2049.
[2006-01-25 17:35:30 xend] DEBUG (DevController:409) hotplugStatusCallback /local/domain/0/backend/vbd/50/2049/hotplug-status.
[2006-01-25 17:35:30 xend] DEBUG (DevController:426) hotplugStatusCallback 3.
[2006-01-25 17:35:30 xend] ERROR (SrvBase:87) Request wait_for_devices failed.
Traceback (most recent call last):
  File "/home1/xen- 3.0-testing.hg/dist/install/usr/lib/python/xen/web/SrvBase.py", line 85, in perform
    return op_method(op, req)
  File "/home1/xen-3.0-testing.hg/dist/install/usr/lib/python/xen/xend/server/SrvDomain.py", line 72, in op_wait_for_devices
    return self.dom.waitForDevices()
  File "/home1/xen-3.0-testing.hg/dist/install/usr/lib/python/xen/xend/XendDomainInfo.py", line 1349, in waitForDevices
    self.waitForDevices_(c)
  File "/home1/xen- 3.0-testing.hg/dist/install/usr/lib/python/xen/xend/XendDomainInfo.py", line 977, in waitForDevices_
    return self.getDeviceController(deviceClass).waitForDevices()
  File "/home1/xen-3.0-testing.hg/dist/install/usr/lib/python/xen/xend/server/DevController.py", line 135, in waitForDevices
    return map(self.waitForDevice, self.deviceIDs())
  File "/home1/xen-3.0-testing.hg/dist/install/usr/lib/python/xen/xend/server/DevController.py", line 151, in waitForDevice
    raise VmError("Device %s (%s) could not be connected. "
VmError: Device 2049 (vbd) could not be connected. Backend device not found.

The last line is the same error as what Rickard got. Taking his tip, i started to explore the command line options of create_cow to see if something was missing on my machine or not.

Now guessing from the parameter options taken by create_cow and what is written in the block-cow file, i tried to execute this

create_cow -i /root/xen/centos.4-2.img -n cent01 -s 50

Putting /root/xen/centos.4-2.img onto loopback device /dev/loop100
Creating a device mapper device for /dev/loop100
Creating backing file
1+0 records in
1+0 records out
Creating snapshot
device-mapper ioctl cmd 9 failed: Invalid argument
Command failed

failed :( Also i see hanged up processed in memory of my attempts of cow usage

root      3364     5  0 17:33 ?        00:00:00 /bin/sh /sbin/hotplug xen-backend
root      3382  3364  0 17:33 ?        00:00:00 /bin/sh /etc/hotplug/xen- backend.agent
root      3386  3382  0 17:33 ?        00:00:00 /bin/sh /etc/xen/scripts/block add
root      3437  3386  0 17:33 ?        00:00:00 /bin/sh /etc/xen/scripts/block-cow add
root      3497     1  0 17:33 ?        00:00:00 dmsetup create vm01sda1-master

Any ideas on how to proceed now ?

Thanks for all the help.
--

regards,

Anand
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.