HarryWei / cloudxy

Automatically exported from code.google.com/p/cloudxy
6 stars 3 forks source link

Install OS with "qemu-system-x86_64" command into HLFS backend storage errors #33

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. git clone git://git.qemu.org/qemu.git
2. cd qemu
3, git reset --hard v1.3.0
4. cp ../hlfs/patches/hlfs_driver_for_qemu.patch ./ 
5. git apply hlfs_driver_for_qemu.patch
6, Modify the dead path
7, ./configure 
8, make
9, ./qemu-img create -f hlfs hlfs:local:///tmp/testenv/testfs 10G
10, cd x86_64-softmmu
11, ./qemu-system-x86_64 -hda hlfs:local:///tmp/testenv/testfs 
/home/jiawei/test/ubuntu-12.04.1-desktop-amd64.iso -boot d -m 512 -no-acpi

What is the expected output? What do you see instead?
Expected output:
Install OS successfully

See instead:
jiawei@jiawei-laptop:~/workshop4/qemu/x86_64-softmmu$ ./qemu-system-x86_64 -hda 
hlfs:local:///tmp/testenv/testfs 
/home/jiawei/test/ubuntu-12.04.1-desktop-i386.iso -boot d -m 512 -no-acpi
** Message: enter func bdrv_hlbs_init
** Message: leave func bdrv_hlbs_init
enter func bdrv_new
leave func bdrv_new
999 enter func bdrv_open
999$$ filename is hlfs:local:///tmp/testenv/testfs
999 enter func find_image_format
enter func bdrv_new
leave func bdrv_new
** Message: enter func hlbs_open
** Message: 999 filename is hlfs:local:///tmp/testenv/testfs
** Message: 999 filename is local:///tmp/testenv/testfs
** Message: enter func parse_vdiname
** Message: 999 filename is local:///tmp/testenv/testfs
** Message: leave func parse_vdiname
enter func init_storage_handler
loc [fs:testfs], 

uri:local:///tmp/testenv/testfs,head:local,dir:/tmp/testenv,fsname:testfs,hostna
me:default,port:0,user:kanghua
leave func init_storage_handler
enter func init_from_superblock
SEGMENT_SIZE:67108864,HBLOCK_SIZE:8192
father uri:(null)
enter func get_cur_latest_segment_info
how much file :1

7777 file:superblock,size:115,time:1359731400

7777 file:,size:0,time:0

leave func get_cur_latest_segment_info
Raw Hlfs Ctrl Init Over ! 
uri:local:///tmp/testenv/testfs,max_fs_size:10240,seg_size:67108864,block_size:8
192,last_segno:0,last_offset:0,start_segno:0,io_nonactive_period:10
enter func seg_clean_task
 we should do clean in silent period ;access timestamp:0,cur timestamp:1359731408899
Data Block Cache Init Over ! 
cache_size:4096,block_size:8192,flush_interval:5,flush_trigger_level:80,flush_on
ce_size:64
--iblock_size:8192,icache_size:1024,invalidate_trigger_level:90,invalidate_once_
size:64
-- flush worker doing --
Indirect  Block Cache Init Over ! 
icache_size:1024,iblock_size:8192,invalidate_trigger_level:90,invalidate_once_si
ze:64
enter func hlfs_open
inode no 0 , inode address 0
empty filesystem testfs
create new fs inode !
ctrl->rw_inode_flag:1
do not need read alive snapshot file
leave func hlfs_open
** Message: 1leave func hlbs_open
** Message: enter func hlbs_getlength
** Message: leave func hlbs_getlength
** Message: enter func hlbs_read
Hlfs Read Req pos:0,read_len:2048,last_segno:0,last_offset:0,cur_file_len:0
read offset:0,read len:2048
only need to read one block: 0
--Entering func dbcache_query_block
The hash table of block_map is empty
NO item in hash table
not find in cache!
beyond current inode's length:0
read len 2048
** Message: leave func hlbs_read
** Message: enter func hlbs_close
hlfs close over !
enter func deinit_storage_handler
disconnect succ
leave func deinit_storage_handler
 time wait res for cond is :1 !
-- flush worker should exit --
--flush worker exit--
--Entering func icache_destroy
--Leaving func icache_destroy
leave func seg_clean_task
** Message: leave func hlbs_close
999 after find_image_format, ret is 2048
enter func bdrv_new
leave func bdrv_new
** Message: enter func hlbs_open
** Message: 999 filename is hlfs:local:///tmp/testenv/testfs
** Message: 999 filename is local:///tmp/testenv/testfs
** Message: enter func parse_vdiname
** Message: 999 filename is local:///tmp/testenv/testfs
** Message: leave func parse_vdiname
enter func init_storage_handler
loc [fs:testfs], 

uri:local:///tmp/testenv/testfs,head:local,dir:/tmp/testenv,fsname:testfs,hostna
me:default,port:0,user:kanghua
leave func init_storage_handler
enter func init_from_superblock
SEGMENT_SIZE:67108864,HBLOCK_SIZE:8192
father uri:(null)
enter func get_cur_latest_segment_info
how much file :1

7777 file:superblock,size:115,time:1359731400

7777 file:,size:0,time:0

leave func get_cur_latest_segment_info
Raw Hlfs Ctrl Init Over ! 
uri:local:///tmp/testenv/testfs,max_fs_size:10240,seg_size:67108864,block_size:8
192,last_segno:0,last_offset:0,start_segno:0,io_nonactive_period:10
enter func seg_clean_task
 we should do clean in silent period ;access timestamp:0,cur timestamp:1359731409900
Data Block Cache Init Over ! 
cache_size:4096,block_size:8192,flush_interval:5,flush_trigger_level:80,flush_on
ce_size:64
--iblock_size:8192,icache_size:1024,invalidate_trigger_level:90,invalidate_once_
size:64
-- flush worker doing --
Indirect  Block Cache Init Over ! 
icache_size:1024,iblock_size:8192,invalidate_trigger_level:90,invalidate_once_si
ze:64
enter func hlfs_open
inode no 0 , inode address 0
empty filesystem testfs
create new fs inode !
ctrl->rw_inode_flag:1
do not need read alive snapshot file
leave func hlfs_open
** Message: 1leave func hlbs_open
** Message: enter func hlbs_getlength
** Message: leave func hlbs_getlength
** Message: enter func hlbs_getlength
** Message: leave func hlbs_getlength
qemu-system-x86_64: -hda hlfs:local:///tmp/testenv/testfs: drive with bus=0, 
unit=0 (index=0) exists
jiawei@jiawei-laptop:~/workshop4/qemu/x86_64-softmmu$ ./qemu-system-x86_64 -hda 
hlfs:local:///tmp/testenv/testfs 
/home/jiawei/test/ubuntu-12.04.1-desktop-amd64.iso -boot d -m 512 -no-acpi
** Message: enter func bdrv_hlbs_init
** Message: leave func bdrv_hlbs_init
enter func bdrv_new
leave func bdrv_new
999 enter func bdrv_open
999$$ filename is hlfs:local:///tmp/testenv/testfs
999 enter func find_image_format
enter func bdrv_new
leave func bdrv_new
** Message: enter func hlbs_open
** Message: 999 filename is hlfs:local:///tmp/testenv/testfs
** Message: 999 filename is local:///tmp/testenv/testfs
** Message: enter func parse_vdiname
** Message: 999 filename is local:///tmp/testenv/testfs
** Message: leave func parse_vdiname
enter func init_storage_handler
loc [fs:testfs], 

uri:local:///tmp/testenv/testfs,head:local,dir:/tmp/testenv,fsname:testfs,hostna
me:default,port:0,user:kanghua
leave func init_storage_handler
enter func init_from_superblock
SEGMENT_SIZE:67108864,HBLOCK_SIZE:8192
father uri:(null)
enter func get_cur_latest_segment_info
how much file :1

7777 file:superblock,size:115,time:1359731400

7777 file:,size:0,time:0

leave func get_cur_latest_segment_info
Raw Hlfs Ctrl Init Over ! 
uri:local:///tmp/testenv/testfs,max_fs_size:10240,seg_size:67108864,block_size:8
192,last_segno:0,last_offset:0,start_segno:0,io_nonactive_period:10
enter func seg_clean_task
 we should do clean in silent period ;access timestamp:0,cur timestamp:1359731455435
Data Block Cache Init Over ! 
cache_size:4096,block_size:8192,flush_interval:5,flush_trigger_level:80,flush_on
ce_size:64
--iblock_size:8192,icache_size:1024,invalidate_trigger_level:90,invalidate_once_
size:64
-- flush worker doing --
Indirect  Block Cache Init Over ! 
icache_size:1024,iblock_size:8192,invalidate_trigger_level:90,invalidate_once_si
ze:64
enter func hlfs_open
inode no 0 , inode address 0
empty filesystem testfs
create new fs inode !
ctrl->rw_inode_flag:1
do not need read alive snapshot file
leave func hlfs_open
** Message: 1leave func hlbs_open
** Message: enter func hlbs_getlength
** Message: leave func hlbs_getlength
** Message: enter func hlbs_read
Hlfs Read Req pos:0,read_len:2048,last_segno:0,last_offset:0,cur_file_len:0
read offset:0,read len:2048
only need to read one block: 0
--Entering func dbcache_query_block
The hash table of block_map is empty
NO item in hash table
not find in cache!
beyond current inode's length:0
read len 2048
** Message: leave func hlbs_read
** Message: enter func hlbs_close
hlfs close over !
enter func deinit_storage_handler
disconnect succ
leave func deinit_storage_handler
 time wait res for cond is :1 !
-- flush worker should exit --
--flush worker exit--
--Entering func icache_destroy
--Leaving func icache_destroy
leave func seg_clean_task
** Message: leave func hlbs_close
999 after find_image_format, ret is 2048
enter func bdrv_new
leave func bdrv_new
** Message: enter func hlbs_open
** Message: 999 filename is hlfs:local:///tmp/testenv/testfs
** Message: 999 filename is local:///tmp/testenv/testfs
** Message: enter func parse_vdiname
** Message: 999 filename is local:///tmp/testenv/testfs
** Message: leave func parse_vdiname
enter func init_storage_handler
loc [fs:testfs], 

uri:local:///tmp/testenv/testfs,head:local,dir:/tmp/testenv,fsname:testfs,hostna
me:default,port:0,user:kanghua
leave func init_storage_handler
enter func init_from_superblock
SEGMENT_SIZE:67108864,HBLOCK_SIZE:8192
father uri:(null)
enter func get_cur_latest_segment_info
how much file :1

7777 file:superblock,size:115,time:1359731400

7777 file:,size:0,time:0

leave func get_cur_latest_segment_info
Raw Hlfs Ctrl Init Over ! 
uri:local:///tmp/testenv/testfs,max_fs_size:10240,seg_size:67108864,block_size:8
192,last_segno:0,last_offset:0,start_segno:0,io_nonactive_period:10
enter func seg_clean_task
 we should do clean in silent period ;access timestamp:0,cur timestamp:1359731456436
Data Block Cache Init Over ! 
cache_size:4096,block_size:8192,flush_interval:5,flush_trigger_level:80,flush_on
ce_size:64
--iblock_size:8192,icache_size:1024,invalidate_trigger_level:90,invalidate_once_
size:64
-- flush worker doing --
Indirect  Block Cache Init Over ! 
icache_size:1024,iblock_size:8192,invalidate_trigger_level:90,invalidate_once_si
ze:64
enter func hlfs_open
inode no 0 , inode address 0
empty filesystem testfs
create new fs inode !
ctrl->rw_inode_flag:1
do not need read alive snapshot file
leave func hlfs_open
** Message: 1leave func hlbs_open
** Message: enter func hlbs_getlength
** Message: leave func hlbs_getlength
** Message: enter func hlbs_getlength
** Message: leave func hlbs_getlength
qemu-system-x86_64: -hda hlfs:local:///tmp/testenv/testfs: drive with bus=0, 
unit=0 (index=0) exists

Original issue reported on code.google.com by harryxi...@gmail.com on 1 Feb 2013 at 3:20

GoogleCodeExporter commented 9 years ago
I searched the Internet and found a solution, which said by MORITA like 
following.

At Thu, 1 Sep 2011 09:29:59 +0200,
Valerio Pachera wrote:
> 
> I guess it's not possible to run a vm with more than one sheepdog disk, right?
> 
> # qemu-system-x86_64 -m 512 -smp 1 -k it -daemonize -vnc :1
> sheepdog:squeeze sheepdog:squeeze_swap
> 
> qemu-system-x86_64: -vnc :1: drive with bus=0, unit=0 (index=0) exists

It's possible.  You can add Sheepdog disks like other format ones.
For example:

 $ qemu-system-x86_64 -hda sheepdog:squeeze -hdb sheepdog:squeeze_swap

See also "man qemu" for more information.

Thanks,

Kazutaka

Original comment by harryxi...@gmail.com on 1 Feb 2013 at 3:34

GoogleCodeExporter commented 9 years ago
I don't think MORITA resolve the question. They are not one matter!!!

Original comment by littlesmartsmart on 2 Feb 2013 at 2:31

GoogleCodeExporter commented 9 years ago
The solution really solved my problem.

Original comment by harryxi...@gmail.com on 2 Feb 2013 at 2:56

GoogleCodeExporter commented 9 years ago

Original comment by kanghua...@gmail.com on 9 Feb 2013 at 6:23