DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 7th March 2012
sepuku's Avatar
sepuku sepuku is offline
Real Name: Vizard Sepuku
Package Pilot
 
Join Date: Jun 2011
Location: Athens & Chania,Greece
Posts: 143
Default Some qemu questions (networking,usb devices)

Hello people,

i have installed succesfully qemu-1.0p1 on my system(OpenBSD 5.1)
and then installed windows xp using these steps(i read the guide on /usr/local/share/doc/pkg-readmes):

Code:
qemu-system-i386 -m 320 -monitor stdio -no-fd-bootchk \-hda xpdark.img -cdrom *iso -boot d
Then compressed the virtualdisk with:

Code:
qemu-img convert -c -O qcow2 xpdark.img v.tmp && \mv v.tmp xpdark.img
and after using almost 100% of my cpu it finished succesfully.

The third step in the guide is for booting:

Code:
qemu-system-i386 -m 320 -nographic -no-fd-bootchk -hda xpdark.img
but that won't boot xp: qmu won't load and i have to press the x button on xterm
running qemu to stop it.

However xp load normally if i omit the nographic and -no-fd-bootchk params.

1)Not sure why that happens but i would like to know if anyone has faced the same issue.

2)Also, i noticed that i can't give to the guest OS more than 320mb of memory. Is there a way to give more?( 512 would be nice ) my physical system has 3GB of ram.

3)About networking now i'm trying to connect the guest to the internet but the man page is not much of a help.In the /usr/local/share/doc/pkg-readmes the networking part of qemu says:

Default Settings

By default, QEMU sets up the equivalent of the following networking:

-net nic,vlan=0,model=e1000,macaddr=52:54:00:12:34:56
-net user,vlan=0


Does this mean that networking should work by default if don't use the -net parameter to make manual settings?(it doesn't work for me). And if not, can anyone share some tips on how to do it?

4) Also about using usbs to the guest OS the man page says:

-usbdevice devname

So i'm trying something like this:

Code:
qemu-system-i386 -usb -usbdevice sd0 -hda xpdark.img -m 320
but i get: qemu: could not add USB device 'sd0'

I also tried /dev/sd0,/dev/sd0c,/dev/sd0i and the same but with /dev/rsdx

and i get the same errors.

I know i'm asking a lot of questions, but unfortunately, so far the qemu man page
is the most disappointing of all the man pages i've read.

I'm also attaching my dmesg in case someone needs it.
Attached Files
File Type: txt dmesg.txt (16.0 KB, 82 views)

Last edited by sepuku; 7th March 2012 at 11:33 PM.
Reply With Quote
  #2   (View Single Post)  
Old 8th March 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Yes, you're asking a lot of questions.

The first one, about -nographic, I can answer. You got into trouble because the readme is describing running OpenBSD as a guest, not Windows. -nographic eliminates the virtual graphics card, and routes the first serial device I/O to the host standard input and output. Very useful for an OpenBSD guest where X would not be used ... not so helpful with your typical MS Windows installation, which isn't designed to communicate with an operator via a com port nor to typically be operated and administered headless.

The second question, about virtual memory limitations, I can also answer. You have two limiting factors: 1) you are running i386 -- in that arch, userland processes are limited to obtaining just under 1GB of virtual memory in total, and 2) qemu consumes lots on its own. This new release (1.0) consumes much much more than earlier versions.

The third question, I cannot answer only because I don't understand the problem. If you don't use -net, you will get a single "userland" network interface definition, which will have a virtual 10.x subnet and a virtual DHCP server on it. You haven't posted what "doesn't work for me" means, but the only reasons I could think of that it isn't working for you is either a missing NIC driver in your guest OS, or perhaps a conflict between the virtual 10.x subnet and a real subnet in the 10/8 address space in your private network.

The fourth question -- well, I think you need not use -usb at all. Just give the raw, phyiscal drive to the guest as either an IDE or SCSI drive, your choice. If sd0 is the drive, the device to pass to qemu would be /dev/rsd0c. You'll need to be superuser, of course.

Last edited by jggimi; 8th March 2012 at 11:54 AM.
Reply With Quote
  #3   (View Single Post)  
Old 8th March 2012
sepuku's Avatar
sepuku sepuku is offline
Real Name: Vizard Sepuku
Package Pilot
 
Join Date: Jun 2011
Location: Athens & Chania,Greece
Posts: 143
Default

Quote:
Originally Posted by jggimi View Post
The first one, about -nographic, I can answer. You got into trouble because the readme is describing running OpenBSD as a guest, not Windows. -nographic eliminates the virtual graphics card, and routes the first serial device I/O to the host standard input and output.
First of all thank you for yor reply jggimi.

I see, i thought it was just an example for every OS and it was just using openbsd for it. :/

Quote:
Originally Posted by jggimi View Post
The second question, about virtual memory limitations,
Oooh, i was not aware there were limitations according to the arch.

Quote:
Originally Posted by jggimi View Post
either a missing NIC driver
Yes that's what it is. I forgot about this kind of windows annoying problems.

Quote:
Originally Posted by jggimi View Post
If sd0 is the drive, the device to pass to qemu would be /dev/rsd0c
I've tried that too and all i get is this:

Code:
sudo qemu-system-i386 -usbdevice /dev/rsd0c -hda xpdark.img -m 320
qemu: could not add USB device '/dev/rsd0c'
Reply With Quote
  #4   (View Single Post)  
Old 8th March 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Use -hda/b/c/d or -drive.
Reply With Quote
  #5   (View Single Post)  
Old 8th March 2012
sepuku's Avatar
sepuku sepuku is offline
Real Name: Vizard Sepuku
Package Pilot
 
Join Date: Jun 2011
Location: Athens & Chania,Greece
Posts: 143
Default

Quote:
Originally Posted by jggimi View Post
Use -hda/b/c/d or -drive.
Yes jggimi -hdb did it for me:

Code:
sudo qemu-system-i386 -hda xpdark.img -m 320 -hdb /dev/rsd0c
That saved from a physical installation of xp because i must use some programs that run only on xp.Although it runs kinda slow, i'm sure i can do my job. Thank you very much jggimi.

One last thing: I noticed that i must mount the usb device to obsd to use it with qemu. Don't know might be that i'm brand new to a lot of things latetly but this kinda strange.

Anyway, thanks again.

Last edited by sepuku; 8th March 2012 at 09:24 PM.
Reply With Quote
  #6   (View Single Post)  
Old 8th March 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Unless xpdark.img is on sd0, or some part of the /usr/local hierarchy is on sd0, there should be no requirement for mounting any of its partitions on OpenBSD.

(An example: Suppose your guest was OS X and your USB device contained only a single foreign filesystem for which there is no filesystem driver in OpenBSD, such as HFS. Or your device used GPT instead of MBR. Or your guest architecture were SPARC and the device had no MBR... etc.)
Reply With Quote
  #7   (View Single Post)  
Old 9th March 2012
sepuku's Avatar
sepuku sepuku is offline
Real Name: Vizard Sepuku
Package Pilot
 
Join Date: Jun 2011
Location: Athens & Chania,Greece
Posts: 143
Default

Quote:
Originally Posted by jggimi View Post
Unless xpdark.img is on sd0, or some part of the /usr/local hierarchy is on sd0, there should be no requirement for mounting any of its partitions on OpenBSD.

Yes, you were right. I guess i got confused with the previous attempts with -usb and -usbdevice and got wrong impressions.

Anyway thank you once again.
Reply With Quote
  #8   (View Single Post)  
Old 19th March 2012
sw2wolf sw2wolf is offline
λ programmer
 
Join Date: Mar 2012
Location: China
Posts: 133
Default

I have installed XP guest using qemu. But XP doesnot find NIC driver.
I donot use any "-net" switch so it should be e1000 .

Can you share the NIC driver ?

Sincerely!

Last edited by sw2wolf; 25th March 2012 at 08:44 AM.
Reply With Quote
Reply

Tags
networking, qemu, usb devices

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
qemu networking gpatrick OpenBSD Packages and Ports 2 18th December 2011 04:20 AM
OpenBSD Support for Realtek 802.11n USB devices J65nko News 0 18th December 2010 11:00 PM
OpenBSD OpenBSD developer wants USB devices ocicat News 0 9th November 2010 01:57 AM
Automounting USB devices with HAL/KDE vinegaroon FreeBSD General 1 13th June 2008 02:16 PM
Automatic Mount for Devices/Filesystems vermaden FreeBSD General 11 12th June 2008 04:55 AM


All times are GMT. The time now is 09:10 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick