[SLUG] Qemu Questions

2005-07-18 Thread Peter Rundle
Any sluggers out there running Qemu? I have a few questions. (great 
product btw)


1. Having trouble getting the network going.

I have interface tun0 up with the same IP as the guest machine. This IP 
is pingable from the network, however the guest machine cannot see the 
network. I assume that the Linux host is responding to the pings. Is 
there an argument that I've missed to qemu. I'm currently starting it like;


  qemu -m 64 -localtime -n tun-ifup guestnt4.img

where tun-ifup contains

  sudo /sbin/ifconfig $1 192.168.1.146

(I'm actually running as root because I couldn't get sudo to run 
ifconfig. Lack of experience with sudo I'm sure, any pointers to what 
should be in /etc/sudoers appreciated).


2. When I run the guest pc using loadvm the cursor is black!? I.E

 qemu -m 64 -localtime -n tun-ifup -loadvm login.state guestnt4.img

login.state was created using savevm from the qemu monitor.

3. I've configured the guest PC (nt4) to turn-off after shutdown, but 
qemu simply restarts the machine. Does anyone know of a way to have the 
guest shutdown and have qemu exit once the guest is "turned-off"?


TIA's

Pete

--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] Qemu Questions

2005-07-19 Thread Geoff Reidy

Peter Rundle wrote:


1. Having trouble getting the network going.

I have interface tun0 up with the same IP as the guest machine. This IP
is pingable from the network, however the guest machine cannot see the 
network. I assume that the Linux host is responding to the pings.


I might be misunderstanding you but the tun0 interface should have a 
different ip, e.g I use 172.20.0.1 for tun0 and 172.20.0.2 for the guest.





  sudo /sbin/ifconfig $1 192.168.1.146



I couldn't get sudo to work with $1 so I just used tun0.



2. When I run the guest pc using loadvm the cursor is black!? I.E



Haven't tried that.



3. I've configured the guest PC (nt4) to turn-off after shutdown, but 
qemu simply restarts the machine. Does anyone know of a way to have the 
guest shutdown and have qemu exit once the guest is "turned-off"?




Don't know, doesn't do it here either.

Geoff

--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] Qemu Questions

2005-07-19 Thread Alan L Tyree
On Tue, 19 Jul 2005 19:18:38 +1000
Geoff Reidy <[EMAIL PROTECTED]> wrote:


> > 3. I've configured the guest PC (nt4) to turn-off after
shutdown,
> > but  qemu simply restarts the machine. Does anyone know of a way to
> > have the  guest shutdown and have qemu exit once the guest is
> > "turned-off"?
> > 
> 
> Don't know, doesn't do it here either.
I'm running Windows 95 under qemu and it shuts down just like it should.
I haven't tried networking or any of the fancy stuff since I just use it
for running some legal research CDs. It's neat for that because of being
able to use the .iso image of the CD.

Alan

> 
> Geoff
> 
> -- 
> SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
> Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
> 


-- 
Alan L Tyreehttp://www2.austlii.edu.au/~alan
Tel: +61 2 4782 2670Mobile: +61 428 148 071
Fax: +61 2 4782 7092FWD: 615662
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] Qemu Questions

2005-07-19 Thread Peter Rundle

Geoff Reidy wrote:


I couldn't get sudo to work with $1 so I just used tun0.


Could you possibly give an example sudoers entry? I'm stuggling with 
sudo (never used it before).


Thanks

P.
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] Qemu Questions

2005-07-19 Thread Peter Rundle

James Gregory wrote:


I have actually had this working in the past, but I remember it being a huge
amount of effort. I don't know if you can get away with it for what you need to
do, but the user-net option is much simpler to get going. I suggest you try
that; it will at least tell you if your guest OS is setup correctly. It will
also let you run it as a normal user.


Err ok I thought that user-net option didn't actually give the PC 
network connection. The documentation on qemu that I found so far is 
pretty thin, just enough to get an expert going, not being one of those 
I'm stuggling a little. So does the user-net option actually give you 
network connectivity and if so why would anyone bother with the other 
method?



Also, which version are you running? The 0.6 version had a bug with networking,
though I don't recall the details.


0.7


I've seen that before, presumably because it doesn't try to redraw until
something writes to its video memory region. It generally works ok once there's
been some activity on the guest OS. Is this not the case for you?


No moving the mouse etc, even the busy "hourglass" cursor is black. It 
all works it's just black, not that there's anything wrong with being 
black ;-)


Thanks

Pete


--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] Qemu Questions

2005-07-20 Thread Geoff Reidy

Peter Rundle wrote:

Geoff Reidy wrote:


I couldn't get sudo to work with $1 so I just used tun0.



Could you possibly give an example sudoers entry? I'm stuggling with 
sudo (never used it before).


Thanks

P.



This is what I've got:

Cmnd_Alias QEMU_NET=/sbin/ifconfig tun0 172.20.0.1

geoff ALL=NOPASSWD:QEMU_NET

--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] Qemu Questions

2005-07-20 Thread James Gregory
On Wed, 2005-07-20 at 08:54 +1000, Peter Rundle wrote:
> James Gregory wrote:
> 
> > I have actually had this working in the past, but I remember it being a huge
> > amount of effort. I don't know if you can get away with it for what you 
> > need to
> > do, but the user-net option is much simpler to get going. I suggest you try
> > that; it will at least tell you if your guest OS is setup correctly. It will
> > also let you run it as a normal user.
> 
> Err ok I thought that user-net option didn't actually give the PC 
> network connection. The documentation on qemu that I found so far is 
> pretty thin, just enough to get an expert going, not being one of those 
> I'm stuggling a little. So does the user-net option actually give you 
> network connectivity and if so why would anyone bother with the other 
> method?

The user-net option will allow your guest system to make *outgoing*
connections. You can't (without some tinkering) use it to run an
externally accessible webserver for example.

user-net lets me fire up a debian virtual machine, set up networking
with dhcp (qemu has its own dhcp server for its "virtual network"), and
pull packages down with apt.

The other options do have their utility, but for most people, user-net
is the right choice.

> 
> > Also, which version are you running? The 0.6 version had a bug with 
> > networking,
> > though I don't recall the details.
> 
> 0.7

ok, that should be fine.

> 
> > I've seen that before, presumably because it doesn't try to redraw until
> > something writes to its video memory region. It generally works ok once 
> > there's
> > been some activity on the guest OS. Is this not the case for you?
> 
> No moving the mouse etc, even the busy "hourglass" cursor is black. It 
> all works it's just black, not that there's anything wrong with being 
> black ;-)

I don't understand; how can you tell that there's an hourglass there if
everything is black? Can you point us to a screenshot?

HTH,

James.



signature.asc
Description: This is a digitally signed message part
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Re: [SLUG] Qemu Questions

2005-07-20 Thread Peter Rundle

James Gregory wrote:

> The user-net option will allow your guest system to make *outgoing*
> connections. You can't (without some tinkering) use it to run an
>externally accessible webserver for example.

For my application that will suffice.

Just need a little clarification about the network config,
I understand that the guest gets an 10.0.2.x ip from qemu's "virtual 
dhcp" server and it's default gateway is set to 10.0.2.2 which is... 
(I'm guessing) qemu creating a "virtual gateway", does Qemu then Nat the 
outbound packets from the guest to the Hosts ip address? I.E Qemu is a 
user level  application running on the host which has access to the 
hosts networking services?



I don't understand; how can you tell that there's an hourglass there if
everything is black? Can you point us to a screenshot?


Just the cursor is black. The rest of the display is the normal colour. 
When you launch an application the busy/hourglass cursor appears but it 
is also black (windows nt4 guest). Not to worry but curious bug. If I 
launch the guest without the loadvm (i.e boot from scratch) the cursor 
colour is normal.


Thanks for your help

Pete








--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] Qemu Questions

2005-07-21 Thread James Gregory
On Thu, 2005-07-21 at 08:08 +1000, Peter Rundle wrote:
> James Gregory wrote:
> 
>  > The user-net option will allow your guest system to make *outgoing*
>  > connections. You can't (without some tinkering) use it to run an
>  >externally accessible webserver for example.
> 
> For my application that will suffice.
> 
> Just need a little clarification about the network config,
> I understand that the guest gets an 10.0.2.x ip from qemu's "virtual 
> dhcp" server and it's default gateway is set to 10.0.2.2 which is... 
> (I'm guessing) qemu creating a "virtual gateway", does Qemu then Nat the 
> outbound packets from the guest to the Hosts ip address? I.E Qemu is a 
> user level  application running on the host which has access to the 
> hosts networking services?

That's more or less right. qemu makes userspace sockets to connect to
whereever, just like any other application. It doesn't let you send raw
ethernet frames out (or even raw packets); you'd need to be superuser
for that.

> > I don't understand; how can you tell that there's an hourglass there if
> > everything is black? Can you point us to a screenshot?
> 
> Just the cursor is black. The rest of the display is the normal colour. 
> When you launch an application the busy/hourglass cursor appears but it 
> is also black (windows nt4 guest). Not to worry but curious bug. If I 
> launch the guest without the loadvm (i.e boot from scratch) the cursor 
> colour is normal.

Ahh. I misunderstood. I'm guessing it's a bug in the video bios for
qemu's "virtual video card". If it were linux as your host, setting
SoftwareCursor would no doubt fix the problem, so I guess you can
either:

  - Find the Windows NT equivalent of SoftwareCursor
  - Get another video bios (I think there's a few that work)
  - Get a video driver for Windows NT that plays nice with the vga bios
you have.

HTH,

James.



signature.asc
Description: This is a digitally signed message part
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html