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

Re: [Xen-devel] Question about QEMU as ide device emulator



Question has been answered. Thanks.

On Thu, May 25, 2017 at 6:35 PM, Bruno Alvisio <bruno.alvisio@xxxxxxxxx> wrote:
Hello all,

Summary

I am using XEN hypervisor to run a HVM with a QEMU backed disk. After I start the HVM I use QMP "query-block" command to see the devices of the VM. Initially the command returns the disk that I set as part of the configuration but after a few seconds  the "query-block" command returns an empty result.

KVM Version: 4.6.5
Arch: x86-64
QEMU : 2.2.1


I was expecting to see the device information in QEMU such as:

{"execute":"query-block"}

{"return": [{"io-status": "ok", "device": "ide0-hd0", "locked": false, "removable": false, "inserted": {"iops_rd": 0, "detect_zeroes": "off", "image": {"virtual-size": 10737418240, "filename": "/home/balvisio/debian-disk.img", "format": "raw", "actual-size": 4940075008, "dirty-flag": false}, "iops_wr": 0, "ro": false, "backing_file_depth": 0, "drv": "raw", "iops": 0, "bps_wr": 0, "encrypted": false, "bps": 0, "bps_rd": 0, "file": "/home/balvisio/debian-disk.img", "encryption_key_missing": false}, "type": "unknown"}]}



I wanted to understand how the storage subsystem work for QEMU backed disks. Any help and pointers in the code would be great.

Eventually I would like to implement a feature in XEN to allow migration of instances with local disks.

Thanks,

Bruno


DETAILED LOGS

I am using XEN hypervisor to run a HVM with QEMU backed disk. When I start the HVM I see the following QEMU process started:

root      2199     1  0 18:57 ?        00:00:02 /usr/local/lib/xen/bin/qemu-system-i386 -xen-domid 3 -chardev socket,id=libxl-cmd,path=/var/run/xen/qmp-libxl-3,server,nowait -no-shutdown -mon chardev=libxl-cmd,mode=control -chardev socket,id=libxenstat-cmd,path=/var/run/xen/qmp-libxenstat-3,server,nowait -mon chardev=libxenstat-cmd,mode=control -nodefaults -no-user-config -name debianL2 -vnc :0,to=99 -display none -serial pty -device cirrus-vga,vgamem_mb=8 -boot order=d -device rtl8139,id=nic0,netdev=net0,mac=00:16:3e:1b:d0:7e -netdev type=tap,id=net0,ifname=vif3.0-emu,script=no,downscript=no -machine xenfv -m 1016 -drive file=/home/balvisio/debian-disk.img,if=ide,index=0,media=disk,format=raw,cache=writeback -drive if=ide,index=2,readonly=on,media=cdrom,id=ide-5632,file=/home/balvisio/debian-live-8.7.1-amd64-gnome-desktop.iso,format=raw


After launching the VM, I connected to the QMP socket:

# rlwrap -C qmp socat STDIO UNIX:/var/run/xen/qmp-libxl-2

{"QMP": {"version": {"qemu": {"micro": 1, "minor": 2, "major": 2}, "package": ""}, "capabilities": []}}

{"execute":"qmp_capabilities"}

{"return": {}}


I issue the "query-block" command and I get

{"execute":"query-block"}

{"return": []}



Xen Config File Used

kernel="/usr/local/lib/xen/boot/hvmloader"

builder='hvm'

memory=1024

vcpus=1

name="debianL2"

vfb = ['type=vnc']

vif= ['bridge=xenbr0']

boot='b'

disk=['file:/home/balvisio/debian-disk.img,xvda,w']

acpi=1

device_model_version='qemu-xen'

serial='pty'

vnc=1

vnclisten=""

vncpasswd=""





_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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