Re: Issue with creating domains that use pygrub

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

 



NM - found it.  The grub.conf in the image was configured with
'root=LABEL=/' and the label on the disk image didn't match.  Works now...

Thanks,

C. Halstead <chris@xxxxxxxxxxxxxx>
SourceLabs - http://www.sourcelabs.com
Dependable Open Source Systems


On 1/30/07 10:51 AM, "Daniel P. Berrange" <berrange@xxxxxxxxxx> wrote:

> On Tue, Jan 30, 2007 at 10:39:05AM -0800, Chris Halstead wrote:
>> I'm stumped.  I'm trying to automate creation of domains through libvirt and
>> the Python bindings, but I'm having trouble getting things to work when
>> using pygrub.
>> 
>> If I define an XML-described domain and use
>> <bootloader>/usr/bin/pygrub</bootloader> the domain tries to start and then
>> immediately crashes.  Using explicit local-pathed vmlinuz/initrd without the
>> bootloader element works just fine.  Am I missing something?
> 
> Not sure - which bit crashes ? Pygrub, or XenD, or the guest kernel ? If
> there's any interesting looking stuff in xend.log or xend-debug.log please
> post it to the list.
> 
> Oh also, what version of xen & python are you using - there's crash with
> Xen 3.0.4 or later when using with python 2.5
> 
> Regards,
> Dan.

[2007-01-30 10:51:01 xend.XendDomainInfo 2664] DEBUG (XendDomainInfo:190) XendDomainInfo.create(['vm', ['name', 'test-scripting'], ['memory', '256'], ['maxmem', '256'], ['vcpus', '2'], ['uuid', 'aba3ea8c35bf46b56f70ea18f91cf007'], ['bootloader', '/usr/bin/pygrub'], ['on_poweroff', 'destroy'], ['on_reboot', 'restart'], ['on_crash', 'destroy'], ['device', ['vbd', ['dev', 'xvda1'], ['uname', 'file:/var/xen/test/root.img'], ['mode', 'w']]], ['device', ['vbd', ['dev', 'xvdb1'], ['uname', 'file:/var/xen/test/swap.img'], ['mode', 'w']]], ['device', ['vif', ['mac', '00:16:3e:5d:3d:28'], ['script', 'vif-bridge']]]])
[2007-01-30 10:51:01 xend.XendDomainInfo 2664] DEBUG (XendDomainInfo:296) parseConfig: config is ['vm', ['name', 'test-scripting'], ['memory', '256'], ['maxmem', '256'], ['vcpus', '2'], ['uuid', 'aba3ea8c35bf46b56f70ea18f91cf007'], ['bootloader', '/usr/bin/pygrub'], ['on_poweroff', 'destroy'], ['on_reboot', 'restart'], ['on_crash', 'destroy'], ['device', ['vbd', ['dev', 'xvda1'], ['uname', 'file:/var/xen/test/root.img'], ['mode', 'w']]], ['device', ['vbd', ['dev', 'xvdb1'], ['uname', 'file:/var/xen/test/swap.img'], ['mode', 'w']]], ['device', ['vif', ['mac', '00:16:3e:5d:3d:28'], ['script', 'vif-bridge']]]]
[2007-01-30 10:51:01 xend.XendDomainInfo 2664] DEBUG (XendDomainInfo:395) parseConfig: result is {'shadow_memory': None, 'uuid': 'aba3ea8c35bf46b56f70ea18f91cf007', 'on_crash': 'destroy', 'on_reboot': 'restart', 'localtime': None, 'image': None, 'on_poweroff': 'destroy', 'bootloader_args': None, 'cpus': None, 'name': 'test-scripting', 'backend': [], 'vcpus': 2, 'cpu_weight': None, 'features': None, 'vcpu_avail': None, 'memory': 256, 'device': [('vbd', ['vbd', ['dev', 'xvda1'], ['uname', 'file:/var/xen/test/root.img'], ['mode', 'w']]), ('vbd', ['vbd', ['dev', 'xvdb1'], ['uname', 'file:/var/xen/test/swap.img'], ['mode', 'w']]), ('vif', ['vif', ['mac', '00:16:3e:5d:3d:28'], ['script', 'vif-bridge']])], 'bootloader': '/usr/bin/pygrub', 'cpu': None, 'maxmem': 256}
[2007-01-30 10:51:01 xend.XendDomainInfo 2664] DEBUG (XendDomainInfo:1253) XendDomainInfo.construct: None
[2007-01-30 10:51:01 xend.XendDomainInfo 2664] DEBUG (XendDomainInfo:1285) XendDomainInfo.initDomain: 38 1.0
[2007-01-30 10:51:01 xend 2664] INFO (image:214) configuring linux guest
[2007-01-30 10:51:01 xend 2664] DEBUG (balloon:127) Balloon: 655352 KiB free; need 262144; done.
[2007-01-30 10:51:01 xend 2664] INFO (image:138) buildDomain os=linux dom=38 vcpus=2
[2007-01-30 10:51:01 xend 2664] DEBUG (image:193) dom            = 38
[2007-01-30 10:51:01 xend 2664] DEBUG (image:194) image          = /var/lib/xen/vmlinuz.ZxFySv
[2007-01-30 10:51:01 xend 2664] DEBUG (image:195) store_evtchn   = 1
[2007-01-30 10:51:01 xend 2664] DEBUG (image:196) console_evtchn = 2
[2007-01-30 10:51:01 xend 2664] DEBUG (image:197) cmdline        =  ro root=LABEL=/
[2007-01-30 10:51:01 xend 2664] DEBUG (image:198) ramdisk        = /var/lib/xen/initrd.cqjEQg
[2007-01-30 10:51:01 xend 2664] DEBUG (image:199) vcpus          = 2
[2007-01-30 10:51:01 xend 2664] DEBUG (image:200) features       = 
[2007-01-30 10:51:01 xend 2664] DEBUG (blkif:24) exception looking up device number for xvda1: [Errno 2] No such file or directory: '/dev/xvda1'
[2007-01-30 10:51:01 xend 2664] DEBUG (DevController:110) DevController: writing {'backend-id': '0', 'virtual-device': '51713', 'device-type': 'disk', 'state': '1', 'backend': '/local/domain/0/backend/vbd/38/51713'} to /local/domain/38/device/vbd/51713.
[2007-01-30 10:51:01 xend 2664] DEBUG (DevController:112) DevController: writing {'domain': 'test-scripting', 'frontend': '/local/domain/38/device/vbd/51713', 'dev': 'xvda1', 'state': '1', 'params': '/var/xen/test/root.img', 'mode': 'w', 'online': '1', 'frontend-id': '38', 'type': 'file'} to /local/domain/0/backend/vbd/38/51713.
[2007-01-30 10:51:01 xend 2664] DEBUG (blkif:24) exception looking up device number for xvdb1: [Errno 2] No such file or directory: '/dev/xvdb1'
[2007-01-30 10:51:01 xend 2664] DEBUG (DevController:110) DevController: writing {'backend-id': '0', 'virtual-device': '51729', 'device-type': 'disk', 'state': '1', 'backend': '/local/domain/0/backend/vbd/38/51729'} to /local/domain/38/device/vbd/51729.
[2007-01-30 10:51:01 xend 2664] DEBUG (DevController:112) DevController: writing {'domain': 'test-scripting', 'frontend': '/local/domain/38/device/vbd/51729', 'dev': 'xvdb1', 'state': '1', 'params': '/var/xen/test/swap.img', 'mode': 'w', 'online': '1', 'frontend-id': '38', 'type': 'file'} to /local/domain/0/backend/vbd/38/51729.
[2007-01-30 10:51:01 xend 2664] DEBUG (DevController:110) DevController: writing {'backend-id': '0', 'mac': '00:16:3e:5d:3d:28', 'handle': '0', 'state': '1', 'backend': '/local/domain/0/backend/vif/38/0'} to /local/domain/38/device/vif/0.
[2007-01-30 10:51:01 xend 2664] DEBUG (DevController:112) DevController: writing {'domain': 'test-scripting', 'handle': '0', 'script': '/etc/xen/scripts/vif-bridge', 'state': '1', 'frontend': '/local/domain/38/device/vif/0', 'mac': '00:16:3e:5d:3d:28', 'online': '1', 'frontend-id': '38'} to /local/domain/0/backend/vif/38/0.
[2007-01-30 10:51:01 xend.XendDomainInfo 2664] DEBUG (XendDomainInfo:712) Storing VM details: {'shadow_memory': '0', 'uuid': 'aba3ea8c35bf46b56f70ea18f91cf007', 'on_reboot': 'restart', 'start_time': '1170183061.89', 'on_poweroff': 'destroy', 'name': 'test-scripting', 'xend/restart_count': '0', 'vcpus': '2', 'vcpu_avail': '3', 'memory': '256', 'on_crash': 'destroy', 'image': "(linux (kernel /var/lib/xen/vmlinuz.ZxFySv) (ramdisk /var/lib/xen/initrd.cqjEQg) (args 'ro root=LABEL=/'))", 'maxmem': '256'}
[2007-01-30 10:51:01 xend.XendDomainInfo 2664] DEBUG (XendDomainInfo:747) Storing domain details: {'console/ring-ref': '133179', 'console/port': '2', 'name': 'test-scripting', 'console/limit': '1048576', 'vm': '/vm/aba3ea8c35bf46b56f70ea18f91cf007', 'domid': '38', 'cpu/0/availability': 'online', 'memory/target': '262144', 'store/ring-ref': '133180', 'cpu/1/availability': 'online', 'store/port': '1'}
[2007-01-30 10:51:01 xend.XendDomainInfo 2664] DEBUG (XendDomainInfo:933) XendDomainInfo.handleShutdownWatch
[2007-01-30 10:51:02 xend 2664] DEBUG (DevController:143) Waiting for devices vif.
[2007-01-30 10:51:02 xend 2664] DEBUG (DevController:149) Waiting for 0.
[2007-01-30 10:51:02 xend 2664] DEBUG (DevController:464) hotplugStatusCallback /local/domain/0/backend/vif/38/0/hotplug-status.
[2007-01-30 10:51:02 xend 2664] DEBUG (DevController:464) hotplugStatusCallback /local/domain/0/backend/vif/38/0/hotplug-status.
[2007-01-30 10:51:02 xend 2664] DEBUG (DevController:478) hotplugStatusCallback 1.
[2007-01-30 10:51:02 xend 2664] DEBUG (DevController:143) Waiting for devices usb.
[2007-01-30 10:51:02 xend 2664] DEBUG (DevController:143) Waiting for devices vbd.
[2007-01-30 10:51:02 xend 2664] DEBUG (DevController:149) Waiting for 51713.
[2007-01-30 10:51:02 xend 2664] DEBUG (DevController:464) hotplugStatusCallback /local/domain/0/backend/vbd/38/51713/hotplug-status.
[2007-01-30 10:51:02 xend 2664] DEBUG (DevController:464) hotplugStatusCallback /local/domain/0/backend/vbd/38/51713/hotplug-status.
[2007-01-30 10:51:02 xend 2664] DEBUG (DevController:478) hotplugStatusCallback 1.
[2007-01-30 10:51:02 xend 2664] DEBUG (DevController:149) Waiting for 51729.
[2007-01-30 10:51:02 xend 2664] DEBUG (DevController:464) hotplugStatusCallback /local/domain/0/backend/vbd/38/51729/hotplug-status.
[2007-01-30 10:51:03 xend 2664] DEBUG (DevController:464) hotplugStatusCallback /local/domain/0/backend/vbd/38/51729/hotplug-status.
[2007-01-30 10:51:03 xend 2664] DEBUG (DevController:478) hotplugStatusCallback 1.
[2007-01-30 10:51:03 xend 2664] DEBUG (DevController:143) Waiting for devices irq.
[2007-01-30 10:51:03 xend 2664] DEBUG (DevController:143) Waiting for devices pci.
[2007-01-30 10:51:03 xend 2664] DEBUG (DevController:143) Waiting for devices ioports.
[2007-01-30 10:51:03 xend 2664] DEBUG (DevController:143) Waiting for devices tap.
[2007-01-30 10:51:03 xend 2664] DEBUG (DevController:143) Waiting for devices vtpm.
[2007-01-30 10:51:03 xend 2664] INFO (XendDomain:370) Domain test-scripting (38) unpaused.
[2007-01-30 10:51:04 xend.XendDomainInfo 2664] WARNING (XendDomainInfo:875) Domain has crashed: name=test-scripting id=38.
[2007-01-30 10:51:04 xend.XendDomainInfo 2664] DEBUG (XendDomainInfo:1449) XendDomainInfo.destroy: domid=38
[2007-01-30 10:51:04 xend.XendDomainInfo 2664] DEBUG (XendDomainInfo:1457) XendDomainInfo.destroyDomain(38)
<domain type='xen'>
  <name>test-scripting</name>
  <bootloader>/usr/bin/pygrub</bootloader>
  <os>
    <type>linux</type>
<!--
    <kernel>/var/xen/test/vmlinuz</kernel>
    <initrd>/var/xen/test/initrd</initrd>
    <cmdline> ro root=LABEL=/</cmdline>
-->
    <root>/dev/xvda1</root>
  </os>
  <memory>262144</memory>
  <vcpu>2</vcpu>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot> 
  <on_crash>destroy</on_crash>
  <devices>
    <interface type='bridge'>
      <source bridge='xenbr0'/>
      <mac address='00:16:3e:75:fb:4a'/>
      <script path='/etc/xen/scripts/vif-bridge'/>
    </interface>
    <disk type='file' device='disk'>
      <source file='/var/xen/test/root.img'/>
      <target dev='xvda1'/>
    </disk>
    <disk type='file' device='disk'>
      <source file='/var/xen/test/swap.img'/>
      <target dev='xvdb1'/>
    </disk> 
    <console tty='/dev/pts/7'/>
  </devices>
</domain>
#!/usr/bin/python

import libvirt

conn = libvirt.open(None)

xmlDefFile = open('./xendef2.xml', 'r')

xmlDef = ""

for line in xmlDefFile:
  xmlDef = xmlDef + (line.split('\n')[0]).strip()

conn.createLinux(xmlDef, 0)
Nothing to flush.
xenstore-read: couldn't read path backend/vbd/3/51729/node
xenstore-read: couldn't read path backend/vbd/3/51713/node
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.
Nothing to flush.

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]