It is currently Thu Oct 01, 2020 7:54 pm


All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Qemu improvements - Flavors
PostPosted: Fri Dec 28, 2012 12:56 pm 
Offline

Joined: Tue Mar 08, 2011 2:25 pm
Posts: 101
Hey,

I played a bit with Qemu, and I got this working on Windows, the code is on the repository, I'd be glad if you could test it. Maybe someone can investigate IOU with that (using -sparc), the ARM flavor might be fun as well (run android?).
It requires you to have a recent qemu package shipping flavors: qemu-system-i386, qemu-system-sparc, etc. The Default will take the binary you set up in the General Settings, in case you have something else you want to use or if you still use an old Qemu. It's pretty naive, I think it goes without saying but try not to rename qemu-system-i386 to qemu-i386 :D. If the Qemu in the General Settings doesn't respect that pattern, flavors won't work (it uses the pattern to check if flavors can be applied).

Image

Cheers




Top
 Profile  
 
 Post subject: Re: Qemu improvements - Flavors
PostPosted: Tue Jan 08, 2013 11:34 pm 
Offline

Joined: Mon Nov 10, 2008 10:31 am
Posts: 555
Location: Slovakia
Benjamin,
I think I found a bug. From the output you see that it is always trying to start qemu-system-sparc (located in /usr/bin). However my qemu-system-sparc is located in /usr/local/ as I'd compiled qemu by myself. Could you make GNS3 to check location of Qemu flavor?

[[email protected] qemuwrapper]$ sudo ./qemuwrapper.py
[sudo] password for brezular:
Qemu Emulator Wrapper (version 0.8.4)
Copyright (c) 2007-2011 Thomas Pani & Jeremy Grossmann

Qemu path (qemu-system-i386) is valid
Qemu-img path (qemu-img) is valid
Qemu TCP control server started (port 10525).
Listening on all network interfaces
Connection from ('127.0.0.1', 53649)
Disconnection from ('127.0.0.1', 53649)
Connection from ('127.0.0.1', 53650)
Shutdown in progress...
Shutdown completed.
Qemu path is now /usr/local/bin/qemu-system-i386
Qemu-img path is now /usr/local/bin/qemu-img
Working directory is now /home/brezular/GNS3-work/test-iou-solaris/working
!! QEMU1.console = 3001
!! QEMU1.netcard = lance
!! QEMU1.nics = 1
!! QEMU1.image = /home/brezular/Downloads/GNS3-files/IOU/sparc/final-with-iou/36G.disk
!! QEMU1.ram = 512
!! QEMU1.flavor = -sparc
!! QEMU1.options = -bios /usr/local/share/qemu/ss20_v2.25_rom -M SS-20 -nographic -smp 2,cores=4 -cpu "TI SuperSparc 60"
Formatting '/home/brezular/GNS3-work/test-iou-solaris/working/QEMU1/FLASH', fmt=qcow2 size=38654705664 backing_file='/home/brezular/Downloads/GNS3-files/IOU/sparc/final-with-iou/36G.disk' encryption=off cluster_size=65536 lazy_refcounts=off
/usr/local/bin/qemu-img returned with 0
Formatting '/home/brezular/GNS3-work/test-iou-solaris/working/QEMU1/SWAP', fmt=qcow2 size=1073741824 encryption=off cluster_size=65536 lazy_refcounts=off
/usr/local/bin/qemu-img returned with 0
Unable to execute qemu-system-sparc -net socket
Starting Qemu: qemu-system-sparc -name QEMU1 -m 512 /home/brezular/GNS3-work/test-iou-solaris/working/QEMU1/FLASH -hdb /home/brezular/GNS3-work/test-iou-solaris/working/QEMU1/SWAP -serial telnet::3001,server,nowait -bios /usr/local/share/qemu/ss20_v2.25_rom -M SS-20 -nographic -smp 2,cores=4 -cpu "TI SuperSparc 60"
Unable to start instance QEMU1 of <class '__main__.QemuDeviceInstance'>
[Errno 2] No such file or directory

Thank you for your good work

Update
I created a following symbolic link:
/usr/bin/qemu-system-sparc -> /usr/local/bin/qemu-system-sparc

Now I can start my sparc instance and there is not an error message in the output of qemuwrapper. Unfortunately I can't telnet to sparc instance even it seems to be started. It is really strange because it is working when I copy/paste the same qemu-system-sparc command (with all the parameters) from qemuwrapper and run it from CLI

_________________
Brezular

All my tutorials can be found here:
http://brezular.com


Top
 Profile  
 
 Post subject: Re: Qemu improvements - Flavors
PostPosted: Tue Jan 15, 2013 5:05 pm 
Offline

Joined: Mon Nov 10, 2008 10:31 am
Posts: 555
Location: Slovakia
Another strange thing - GUI (Node configurator tab) shows that rtl8139 is used but the ouput from qemuwrapper shows that lance NIC model is used.

_________________
Brezular

All my tutorials can be found here:
http://brezular.com


Top
 Profile  
 
 Post subject: Re: Qemu improvements - Flavors
PostPosted: Fri Jan 25, 2013 8:40 am 
Offline
Site Admin

Joined: Sat Oct 11, 2008 1:41 pm
Posts: 2668
Location: Canada
Quote:
I think I found a bug. From the output you see that it is always trying to start qemu-system-sparc (located in /usr/bin). However my qemu-system-sparc is located in /usr/local/ as I'd compiled qemu by myself. Could you make GNS3 to check location of Qemu flavor?


This is fixed now.

Quote:
Another strange thing - GUI (Node configurator tab) shows that rtl8139 is used but the ouput from qemuwrapper shows that lance NIC model is used.


Only supported NIC for Qemu sparc is lance. Do you still have an issue?

Thanks,

_________________
Jeremy, GNS3 Programmer & Benevolent Dictator for Life.


Top
 Profile  
 
 Post subject: Re: Qemu improvements - Flavors
PostPosted: Wed Jan 30, 2013 6:46 pm 
Offline

Joined: Mon Nov 10, 2008 10:31 am
Posts: 555
Location: Slovakia
Quote:
Only supported NIC for Qemu sparc is lance. Do you still have an issue?


1) Jeremy, I made a video of this bug and sent to your gmail account. This bug doesn't prevent Qemu sparc host start, it is only cosmetic - rtl8139 is shown even lance NIC is used.

2) I can run two sparc Qemu instances but connection between them is not working. For some reason they both use the same MAC address 00:00:00:00:00:00

Attachment:
gns4-project.jpeg
gns4-project.jpeg [ 68.16 KiB | Viewed 5011 times ]

I used following image for testing:

http://people.debian.org/~aurel32/qemu/sparc/debian_etch_sparc_small.qcow2

_________________
Brezular

All my tutorials can be found here:
http://brezular.com


Top
 Profile  
 
 Post subject: Re: Qemu improvements - Flavors
PostPosted: Thu Jan 31, 2013 5:52 am 
Offline

Joined: Mon Nov 10, 2008 10:31 am
Posts: 555
Location: Slovakia
As you can see, the mac address of NIC 1 doesn't match. In this case, QEMU 5 is not connected to the other device.

!! QEMU5.console = 3005
!! QEMU5.netcard = lance
!! QEMU5.nics = 1
!! QEMU5.image = /home/brezular/Downloads/debian_etch_sparc_small.qcow2
!! QEMU5.flavor = -sparc
Formatting '/home/brezular/GNS3-work/debian-test/working/QEMU5/FLASH', fmt=qcow2 size=10737418240 backing_file='/home/brezular/Downloads/debian_etch_sparc_small.qcow2' encryption=off cluster_size=65536 lazy_refcounts=off
/usr/local/bin/qemu-img returned with 0
Formatting '/home/brezular/GNS3-work/debian-test/working/QEMU5/SWAP', fmt=qcow2 size=1073741824 encryption=off cluster_size=65536 lazy_refcounts=off
/usr/local/bin/qemu-img returned with 0
Starting Qemu: /usr/local/bin/qemu-system-sparc -name QEMU5 -m 256 /home/brezular/GNS3-work/debian-test/working/QEMU5/FLASH -hdb /home/brezular/GNS3-work/debian-test/working/QEMU5/SWAP -device lance,mac=00:00:ab:51:e8:00 -serial telnet::3005,server,nowait
Qemu started with PID 4413
4413 (process ID) old priority 0, new priority 19
Attachment:
qemu5.jpeg
qemu5.jpeg [ 77.82 KiB | Viewed 4989 times ]


If I shutdown QEMU5 and connect it to anoher Qemu device, e.g Qemu6, they both will get the same MAC address - 00.00.00.00.00.00

_________________
Brezular

All my tutorials can be found here:
http://brezular.com


Top
 Profile  
 
 Post subject: Re: Qemu improvements - Flavors
PostPosted: Thu Jan 31, 2013 5:55 am 
Offline
Site Admin

Joined: Sat Oct 11, 2008 1:41 pm
Posts: 2668
Location: Canada
Hi Brezular!

Quote:
1) Jeremy, I made a video of this bug and sent to your gmail account. This bug doesn't prevent Qemu sparc host start, it is only cosmetic - rtl8139 is shown even lance NIC is used.


I see, I'll fix that.

Quote:
2) I can run two sparc Qemu instances but connection between them is not working. For some reason they both use the same MAC address 00:00:00:00:00:00


Ok I am gonna use your image and find out where the issue is.

Thanks!

_________________
Jeremy, GNS3 Programmer & Benevolent Dictator for Life.


Top
 Profile  
 
 Post subject: Re: Qemu improvements - Flavors
PostPosted: Thu Jan 31, 2013 6:12 am 
Offline

Joined: Mon Nov 10, 2008 10:31 am
Posts: 555
Location: Slovakia
Hi Jeremy,

I made following test. I connected two Qemu sparc instances with one lance NIC. They both got the null MAC address so I used command ifconfig eth0 hw ether MAC_from_qemuwrapper to change their MAC adresses according to their particular MAC shown in the output of qemuwrapper.
Connection is not working.



_________________
Brezular

All my tutorials can be found here:
http://brezular.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO