Re: support for hvm guests

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

 



>>>> Anthony Liguori <aliguori@xxxxxxxxxx> 05/03/06 6:47 PM >>>
>
>>>> Currently I can get info on hvm domains but unable to create them. 

>>>> The create request is sent to xend but then blocks reading from
xend 
>>>> in xend_req().  No problem creating the domain using xm.  I have 
>>>> looked at the config coming into xend and it is identical between
xm 
>>>> and virsh/libvirt.  Need to poke around xend and see why there is
no 
>>>> response to the virsh/libvirt create request for hvm domains.
>>>>   
>>>
>>>  Hum, basically to debug this kind of things I spend my time in
>>> /var/log/xend.log especially since it prints what it received at 
>>> creation
>>> time, you can at least check the informations coming from libvirt
and
>>> from xm look alike.
>>>  Unfortunately I won't be able to help you, first because I'm about
to
>>> take vacations for 3 weeks :-), second because I don't have one of
those
>>> new Intel CPUs, but I am sure others will give an hand if needed.
>>>  
>>>
>>
>> Well, I have found the problem but not a fix :-).  When posting the 
>> create op to xend, the libvirt code currently waits for a response 
>> from xend (xend_req() is called after posting in xend_post()).  For 
>> hvm guests, xend does not respond and libvirt blocks indefinitely on 
>> read.  If I skip over the call to xend_req() for the create
operation, 
>> wait_for_devices() and subsequently unpause() are called and the hvm 
>> guest is launched.
>
>What do you mean by Xend does not respond?

I post a request such as:

op=create&config=(vm%20(name%20'j_sles10b9_full')(memory%20512)(vcpus%201)(on_poweroff%20'destroy')(on_reboot%20'destroy')(on_crash%20'destroy')(image%20(hvm%20(kernel%20'/usr/lib/xen/boot/hvmloader')(device_model%20'/usr/lib/xen/bin/qemu-dm')(boot%20c)(sdl%201)(stdvga%201)(vcpus%201)))(device%20(vbd%20(dev%20'ioemu:hda')(uname%20'file:/var/lib/xen/images/j_sles10b9_full/hda')(mode%20'w')))(device%20(vif%20(mac%20'00:16:3e:b2:68:1d')(bridge%20'xenbr0')(script%20'vif-bridge')(type%20'ioemu'))))

to xend from xend_post() in libvirt's xend_internal.c, which then
expects to read a response from xend but it never arrives and blocks the
read in libvirt.

>Can you give me a very concrete test case for this?  The exact 
>parameters being passed to domain_create() (it should just be an 
>S-Expression config).

The sexpr is:

(vm (name 'j_sles10b9_full')(memory 512)(vcpus 1)(on_poweroff
'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (hvm (kernel
'/usr/lib/xen/boot/hvmloader')(device_model
'/usr/lib/xen/bin/qemu-dm')(boot c)(sdl 1)(stdvga 1)(vcpus 1)))(device
(vbd (dev 'ioemu:hda')(uname
'file:/var/lib/xen/images/j_sles10b9_full/hda')(mode 'w')))(device (vif
(mac '00:16:3e:b2:68:1d')(bridge 'xenbr0')(script 'vif-bridge')(type
'ioemu'))))

The url-encoded request sent from libvirt is also provided above.  Below
is the relevent content in xend.log.

Thanks,
Jim


[2006-05-02 10:58:13 xend.XendDomainInfo] DEBUG (XendDomainInfo:180)
XendDomainInfo.create(['vm', ['name', 'j_sles10b9_full'], ['memory',
'512'], ['maxmem', '512'], ['vcpus', '1'], ['on_poweroff', 'destroy'],
['on_reboot', 'destroy'], ['on_crash', 'destroy'], ['image', ['hvm',
['kernel', '/usr/lib/xen/boot/hvmloader'], ['device_model',
'/usr/lib/xen/bin/qemu-dm'], ['boot', 'c'], ['cdrom',
'/tests/iso/SLES-10-i386-Beta9.iso'], ['sdl', '1'], ['stdvga', '1'],
['vcpus', '1']]], ['device', ['vbd', ['dev', 'ioemu:hda'], ['uname',
'file:/var/lib/xen/images/j_sles10b9_full/hda'], ['mode', 'w']]],
['device', ['vif', ['mac', '00:16:3e:b2:68:1d'], ['bridge', 'xenbr0'],
['script', 'vif-bridge'], ['type', 'ioemu']]]])
[2006-05-02 10:58:13 xend.XendDomainInfo] DEBUG (XendDomainInfo:286)
parseConfig: config is ['vm', ['name', 'j_sles10b9_full'], ['memory',
'512'], ['maxmem', '512'], ['vcpus', '1'], ['on_poweroff', 'destroy'],
['on_reboot', 'destroy'], ['on_crash', 'destroy'], ['image', ['hvm',
['kernel', '/usr/lib/xen/boot/hvmloader'], ['device_model',
'/usr/lib/xen/bin/qemu-dm'], ['boot', 'c'], ['cdrom',
'/tests/iso/SLES-10-i386-Beta9.iso'], ['sdl', '1'], ['stdvga', '1'],
['vcpus', '1']]], ['device', ['vbd', ['dev', 'ioemu:hda'], ['uname',
'file:/var/lib/xen/images/j_sles10b9_full/hda'], ['mode', 'w']]],
['device', ['vif', ['mac', '00:16:3e:b2:68:1d'], ['bridge', 'xenbr0'],
['script', 'vif-bridge'], ['type', 'ioemu']]]]
[2006-05-02 10:58:13 xend.XendDomainInfo] DEBUG (XendDomainInfo:382)
parseConfig: result is {'ssidref': None, 'uuid': None, 'on_crash':
'destroy', 'on_reboot': 'destroy', 'localtime': None, 'image': ['hvm',
['kernel', '/usr/lib/xen/boot/hvmloader'], ['device_model',
'/usr/lib/xen/bin/qemu-dm'], ['boot', 'c'], ['cdrom',
'/tests/iso/SLES-10-i386-Beta9.iso'], ['sdl', '1'], ['stdvga', '1'],
['vcpus', '1']], 'on_poweroff': 'destroy', 'cpus': None, 'name':
'j_sles10b9_full', 'backend': [], 'cpu': None, 'vcpus': 1, 'cpu_weight':
None, 'vcpu_avail': None, 'memory': 512, 'device': [('vbd', ['vbd',
['dev', 'ioemu:hda'], ['uname',
'file:/var/lib/xen/images/j_sles10b9_full/hda'], ['mode', 'w']]),
('vif', ['vif', ['mac', '00:16:3e:b2:68:1d'], ['bridge', 'xenbr0'],
['script', 'vif-bridge'], ['type', 'ioemu']])], 'bootloader': None,
'root': None, 'bootentry': None, 'maxmem': 512}
[2006-05-02 10:58:13 xend.XendDomainInfo] DEBUG (XendDomainInfo:1189)
XendDomainInfo.construct: None 0
[2006-05-02 10:58:13 xend.XendDomainInfo] DEBUG (XendDomainInfo:1221)
XendDomainInfo.initDomain: 29 1.0
[2006-05-02 10:58:13 xend] DEBUG (image:266) args: cdrom, val:
/tests/iso/SLES-10-i386-Beta9.iso
[2006-05-02 10:58:13 xend] DEBUG (image:266) args: boot, val: c
[2006-05-02 10:58:13 xend] DEBUG (image:266) args: fda, val: None
[2006-05-02 10:58:13 xend] DEBUG (image:266) args: fdb, val: None
[2006-05-02 10:58:13 xend] DEBUG (image:266) args: nic-ne2000, val: None
[2006-05-02 10:58:13 xend] DEBUG (image:266) args: enable-audio, val:
None
[2006-05-02 10:58:13 xend] DEBUG (image:266) args: localtime, val: None
[2006-05-02 10:58:13 xend] DEBUG (image:266) args: serial, val: None
[2006-05-02 10:58:13 xend] DEBUG (image:266) args: std-vga, val: 1
[2006-05-02 10:58:13 xend] DEBUG (image:266) args: isa, val: None
[2006-05-02 10:58:13 xend] DEBUG (image:266) args: vcpus, val: 1
[2006-05-02 10:58:13 xend] DEBUG (balloon:177) Balloon: free 2267; need
518; done.
[2006-05-02 10:58:13 xend] INFO (image:135) buildDomain os=hvm dom=29
vcpus=1
[2006-05-02 10:58:13 xend] DEBUG (image:224) dom            = 29
[2006-05-02 10:58:13 xend] DEBUG (image:225) image          =
/usr/lib/xen/boot/hvmloader
[2006-05-02 10:58:13 xend] DEBUG (image:226) store_evtchn   = 1
[2006-05-02 10:58:13 xend] DEBUG (image:227) memsize        = 512
[2006-05-02 10:58:13 xend] DEBUG (image:228) vcpus          = 1
[2006-05-02 10:58:13 xend] DEBUG (image:229) pae            = 0
[2006-05-02 10:58:13 xend] DEBUG (image:230) acpi           = 0
[2006-05-02 10:58:13 xend] DEBUG (image:231) apic           = 0
[2006-05-02 10:58:13 xend] DEBUG (image:409) hvm shutdown watch
registered
[2006-05-02 10:58:13 xend] DEBUG (blkif:24) exception looking up device
number for hda: [Errno 2] No such file or directory: '/dev/hda'
[2006-05-02 10:58:13 xend] DEBUG (DevController:103) DevController:
writing {'state': '1', 'backend-id': '0', 'backend':
'/local/domain/0/backend/vbd/29/768'} to
/local/domain/29/device/vbd/768.
[2006-05-02 10:58:13 xend] DEBUG (DevController:105) DevController:
writing {'domain': 'j_sles10b9_full', 'frontend':
'/local/domain/29/device/vbd/768', 'dev': 'ioemu:hda', 'state': '1',
'params': '/var/lib/xen/images/j_sles10b9_full/hda', 'mode': 'w',
'frontend-id': '29', 'type': 'file'} to
/local/domain/0/backend/vbd/29/768.
[2006-05-02 10:58:13 xend] DEBUG (DevController:103) DevController:
writing {'state': '1', 'backend-id': '0', 'backend':
'/local/domain/0/backend/vif/29/0'} to /local/domain/29/device/vif/0.
[2006-05-02 10:58:13 xend] DEBUG (DevController:105) DevController:
writing {'bridge': 'xenbr0', 'domain': 'j_sles10b9_full', 'handle': '0',
'script': '/etc/xen/scripts/vif-bridge', 'state': '1', 'frontend':
'/local/domain/29/device/vif/0', 'mac': '00:16:3e:b2:68:1d',
'frontend-id': '29', 'type': 'ioemu'} to
/local/domain/0/backend/vif/29/0.
[2006-05-02 10:58:13 xend] INFO (image:355) spawning device models:
/usr/lib/xen/bin/qemu-dm ['/usr/lib/xen/bin/qemu-dm', '-d', '29', '-m',
'512', '-cdrom', '/tests/iso/SLES-10-i386-Beta9.iso', '-boot', 'c',
'-std-vga', '-vcpus', '1', '-domain-name', 'j_sles10b9_full', '-hda',
'/var/lib/xen/images/j_sles10b9_full/hda', '-macaddr',
'00:16:3e:b2:68:1d', '-bridge', 'xenbr0', '-nics', '1']
[2006-05-02 10:58:13 xend] INFO (image:357) device model pid: 3496
[2006-05-02 10:58:13 xend.XendDomainInfo] DEBUG (XendDomainInfo:675)
Storing VM details: {'ssidref': '0', 'uuid':
'a3fc6694-3959-b4bf-85b3-0364c231c504', 'on_reboot': 'destroy',
'start_time': '1146589093.41', 'on_poweroff': 'destroy', 'name':
'j_sles10b9_full', 'vcpus': '1', 'vcpu_avail': '1', 'memory': '512',
'on_crash': 'destroy', 'image': '(hvm (kernel
/usr/lib/xen/boot/hvmloader) (device_model /usr/lib/xen/bin/qemu-dm)
(boot c) (cdrom /tests/iso/SLES-10-i386-Beta9.iso) (sdl 1) (stdvga 1)
(vcpus 1))', 'maxmem': '512'}
[2006-05-02 10:58:13 xend.XendDomainInfo] DEBUG (XendDomainInfo:700)
Storing domain details: {'console/port': '2', 'name': 'j_sles10b9_full',
'console/limit': '1048576', 'vm':
'/vm/a3fc6694-3959-b4bf-85b3-0364c231c504', 'domid': '29',
'cpu/0/availability': 'online', 'memory/target': '524288',
'store/ring-ref': '682307', 'store/port': '1'}
[2006-05-02 10:58:13 xend] DEBUG (image:432) hvm_shutdown fired,
shutdown reason=None
[2006-05-02 10:58:13 xend.XendDomainInfo] DEBUG (XendDomainInfo:881)
XendDomainInfo.handleShutdownWatch



[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]