马磊
2012-Sep-10 08:52 UTC
[Problem with xen-4.1.2] Creating device model failed when disable `-vnc` related options in qemu-dm
Hi all, In xen-4.1.2 src/tools/libxl/libxl_dm.c, there is a function called `libxl_build_device_model_args_old`, the func will build qemu-dm cmdline args according to the xl-formated configuration file specified by xl create command. There are several lines related to vnc option: 76 if (info->vnc || info->vncdisplay || info->vnclisten || info->vncunused ) { 77 char *vncarg; 78 if (ctx->disable_vnc) 79 { 80 INFO("skipped vnc..."); 81 goto skip_vnc; 82 } 83 ...skip.... the red part above is added by me for testing forcing to disable vnc in consideration of performance. But what I got was that the qemu-dm without vnc related options failed to create device model. In my case, the vm id is 2, the* qemu-dm log info*(not truncated) is as follows: domid: 2 -videoram option does not work with cirrus vga device model. Videoram set to 4M. Strip off blktap sub-type prefix to /home/malei/c2.delta.img (drv ''qcow2'') Using file /home/malei/c2.delta.img in read-write mode Strip off blktap sub-type prefix to /home/malei/d2.delta.img (drv ''qcow2'') Using file /home/malei/d2.delta.img in read-write mode Watching /local/domain/0/device-model/2/logdirty/cmd Watching /local/domain/0/device-model/2/command Watching /local/domain/2/cpu char device redirected to /dev/pts/4 qemu_map_cache_init nr_buckets = 10000 size 4194304 shared page at pfn feffd buffered io page at pfn feffb Guest uuid = d06b08f0-491f-43d6-9a01-ac317aea5034 populating video RAM at ff000000 mapping video RAM from ff000000 Register xen platform. Done register platform. platform_fixed_ioport: changed ro/rw state of ROM memory area. now is rw state. qemu: match NIC model: rtl8139 pci_rtl8139_init: s->macaddr: 0 16 3e eb ca 66 xs_read(/local/domain/0/device-model/2/xen_extended_power_mgmt): read error * (stop here, but the normal log should contains other lines like * *device model state set to running* *Log-dirty: no command yet.* *I/O request not ready: 0, ptr: 0, port: 0, data: 0, count: 0, size: 0* *vcpu-set: watch node error.* *xs_read(/local/domain/1/log-throttling): read error* *qemu: ignoring not-understood drive `/local/domain/1/log-throttling''* *medium change watch on `/local/domain/1/log-throttling'' - unknown device, ignored* *cirrus vga map change while on lfb mode* *mapping vram to f0000000 - f0400000* *platform_fixed_ioport: changed ro/rw state of ROM memory area. now is rw state.* *platform_fixed_ioport: changed ro/rw state of ROM memory area. now is ro state.)* and the* xl log info* is: Waiting for domain xp-102 (domid 2) to die [pid 14006] Domain 2 is dead Unknown shutdown reason code 255. Destroying domain. Action for shutdown reason code 255 is destroy Domain 2 needs to be cleaned up: destroying the domain libxl: error: libxl_dm.c:779:libxl__destroy_device_model Couldn''t find device model''s pid: No such file or directory libxl: error: libxl.c:752:libxl_domain_destroy libxl__destroy_device_model failed for 2 Done. Exiting now I dig into the src/tools/ioemu-qemu-xen/i386-dm/helper2.c, found the function : 553-int main_loop(void) 554{ 555 CPUState *env = cpu_single_env; 556 int evtchn_fd = xce_handle == NULL ? -1 : xc_evtchn_fd(xce_handle); 557 char *qemu_file; 558 fd_set fds; 559 560 main_loop_prepare(); 561 562 buffered_io_timer = qemu_new_timer(rt_clock, handle_buffered_io, 563 cpu_single_env); 564 qemu_mod_timer(buffered_io_timer, qemu_get_clock(rt_clock)); 565 566 if (evtchn_fd != -1) 567 qemu_set_fd_handler(evtchn_fd, cpu_handle_ioreq, NULL, env); 568 569 fprintf(logfile, "device model state set to running\n"); 570 xenstore_record_dm_state("running"); * * *In normal circumstance, the qemu-dm log info will record the red line above, but when disable vnc, it seems that it didn''t go into the function `main_loop` and didn''t see that line.* *What happend to that and How to disable the vnc ?* _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
马磊
2012-Sep-10 09:44 UTC
Re: [Problem with xen-4.1.2] Creating device model failed when disable `-vnc` related options in qemu-dm
On Mon, Sep 10, 2012 at 4:52 PM, 马磊 <aware.why@gmail.com> wrote:> Hi all, > In xen-4.1.2 src/tools/libxl/libxl_dm.c, there is a function called > `libxl_build_device_model_args_old`, the func will build qemu-dm cmdline > args according to > the xl-formated configuration file specified by xl create command. There > are several lines related to vnc option: > > 76 if (info->vnc || info->vncdisplay || info->vnclisten || > info->vncunused ) { > > > 77 char *vncarg; > > > > 78 if (ctx->disable_vnc) > > > > 79 { > > > > 80 INFO("skipped vnc..."); > > > > 81 goto skip_vnc; > > > > 82 } > > > > 83 ...skip.... > > > the red part above is added by me for testing forcing to disable vnc in > consideration of performance. > But what I got was that the qemu-dm without vnc related options failed to > create device model. > > In my case, the vm id is 2, the* qemu-dm log info*(not truncated) is as > follows: > > > domid: 2 > -videoram option does not work with cirrus vga device model. Videoram set > to 4M. > Strip off blktap sub-type prefix to /home/malei/c2.delta.img (drv ''qcow2'') > Using file /home/malei/c2.delta.img in read-write mode > Strip off blktap sub-type prefix to /home/malei/d2.delta.img (drv ''qcow2'') > Using file /home/malei/d2.delta.img in read-write mode > Watching /local/domain/0/device-model/2/logdirty/cmd > Watching /local/domain/0/device-model/2/command > Watching /local/domain/2/cpu > char device redirected to /dev/pts/4 > qemu_map_cache_init nr_buckets = 10000 size 4194304 > shared page at pfn feffd > buffered io page at pfn feffb > Guest uuid = d06b08f0-491f-43d6-9a01-ac317aea5034 > populating video RAM at ff000000 > mapping video RAM from ff000000 > Register xen platform. > Done register platform. > platform_fixed_ioport: changed ro/rw state of ROM memory area. now is rw > state. > qemu: match NIC model: rtl8139 > pci_rtl8139_init: s->macaddr: 0 16 3e eb ca 66 > xs_read(/local/domain/0/device-model/2/xen_extended_power_mgmt): read > error > > * (stop here, but the normal log should contains other lines like * > *device model state set to running* > > *Log-dirty: no command yet.* > > *I/O request not ready: 0, ptr: 0, port: 0, data: 0, count: 0, size: 0* > > *vcpu-set: watch node error.* > > *xs_read(/local/domain/1/log-throttling): read error* > > *qemu: ignoring not-understood drive `/local/domain/1/log-throttling''* > > *medium change watch on `/local/domain/1/log-throttling'' - unknown > device, ignored* > > *cirrus vga map change while on lfb mode* > > *mapping vram to f0000000 - f0400000* > > *platform_fixed_ioport: changed ro/rw state of ROM memory area. now is rw > state.* > > *platform_fixed_ioport: changed ro/rw state of ROM memory area. now is ro > state.)* > > > and the* xl log info* is: > > > Waiting for domain xp-102 (domid 2) to die [pid 14006] > Domain 2 is dead > Unknown shutdown reason code 255. Destroying domain. > Action for shutdown reason code 255 is destroy > Domain 2 needs to be cleaned up: destroying the domain > libxl: error: libxl_dm.c:779:libxl__destroy_device_model Couldn''t find > device model''s pid: No such file or directory > libxl: error: libxl.c:752:libxl_domain_destroy libxl__destroy_device_model > failed for 2 > Done. Exiting now > > > I dig into the src/tools/ioemu-qemu-xen/i386-dm/helper2.c, found the > function : > > 553-int main_loop(void) > > > > 554{ > > > > 555 CPUState *env = cpu_single_env; > > > > 556 int evtchn_fd = xce_handle == NULL ? -1 : xc_evtchn_fd(xce_handle); > > > > 557 char *qemu_file; > > > > 558 fd_set fds; > > > > 559 > > > > 560 main_loop_prepare(); > > > > 561 > > > > 562 buffered_io_timer = qemu_new_timer(rt_clock, handle_buffered_io, > > > > 563 cpu_single_env); > > > > 564 qemu_mod_timer(buffered_io_timer, qemu_get_clock(rt_clock)); > > > > 565 > > > > 566 if (evtchn_fd != -1) > > > > 567 qemu_set_fd_handler(evtchn_fd, cpu_handle_ioreq, NULL, env); > > > > 568 > > > > 569 fprintf(logfile, "device model state set to running\n"); > > > > 570 xenstore_record_dm_state("running"); > * > * > > *In normal circumstance, the qemu-dm log info will record the red line > above, but when disable vnc, it seems that it didn''t go into the function > `main_loop` and didn''t see that line.* > *What happend to that and How to disable the vnc ?* > >I try to inspect the source code, but reap nothing... _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel