LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   QEMU & KQEMU on slackware (https://www.linuxquestions.org/questions/slackware-14/qemu-and-kqemu-on-slackware-465123/)

Alien Bob 07-19-2006 05:04 AM

nykey, I think acummings and uselpa answered your questions already.
Old_Fogey, you could try allowing direct access to your scanner in the Windows "guest" and use the Windows driver then - I did not try that yet (I should, at some point, I guess).

Eric

nykey 07-19-2006 06:22 AM

ok, sry to say that, but after seeing Old_Foggie's post about VMware I tought I'd give it a shot, and it mostly worked out of the box. Installation process went faster, I didn't have any issue with my USB keyboard and mouse at install, network is working, it even allocated 16Mb of RAM to my video card instead of 4Mb in QEMU. Much easier to use and understand (I'm better off with a wizzard keeping in mind that I do need this to install Window$ - the wizzard OS). The only problem is that I don't have sound, yet, but hopefully I will get it working soon... must search on their website first to see if they have sound support at all...

uselpa 07-19-2006 07:04 AM

For me, sound with Windows XP in VMWare worked right out of the box as well. Sometimes I have a message about /dev/dsp being in use when I start a VM, and then I have no sound. I haven't bothered looking further, but I think aRts blocks /dev/dsp but releases it after a timeout.

If you have the same message, tell me and I will investigate further.

Old_Fogie 07-19-2006 07:47 AM

Eric I've been reading over your tutorial and thinking of giving it a shot.

The file image that the guest operating sits in...

for your example you had windows here with:

dd if=/dev/zero of=winxp.img bs=1k count=0 seek=4000000

can that file size ever be changed down the road? or would that require that guest OS to be reinstalled on a newly created image file?

nykey 07-19-2006 08:42 AM

@ uselpa
I didn't get any kind of errors, just that it doesn't see my (or any type of emulated) sound card. I looked it up in Device Manager (or whatever it is) and didn't see any sound card not even with that yellow ! like I had at my video card and scsi before I installed the VMware tools. Then I looked in Control Panel @ Sounds and in Sound Devices there was nothing to choose/change. How does sound in VMware work ? It uses the sound device of the host ? Do I need to have anything 'special' on the host ? I'm using ALSA atm with latest alsa-packages and alsa-driver-2.6.16.24 (like my running kernel). Or maybe is there any option in the VMware Console which may escaped my viewing... I always started VMware from the console using 'vmware &' or from the K Menu/Gnome Menu which means it always started in background and couldn't see any error messages. I will try and start it from the console using just 'vmware' and see the output under the command when using it. Ideeas are very much welcomed. Thx.

uselpa 07-19-2006 08:53 AM

Open the VMWare GUI (without starting a virtual machine) and check the properties of your virtual machine, see if you enabled the sound device.

Alien Bob 07-19-2006 10:31 AM

Quote:

Originally Posted by Old_Fogie
for your example you had windows here with:

dd if=/dev/zero of=winxp.img bs=1k count=0 seek=4000000

can that file size ever be changed down the road? or would that require that guest OS to be reinstalled on a newly created image file?

You can easily increase that image file's size using dd and then (after starting your Windows guest) enlarge the Windows partition so that it uses the full (virtual) disk again. But I guess you will need something like partition magic to increase a Windows partition (not sure if Windows can do that all by itself).

If you need more disk(-space)s, you can also create a second imagefile in Linux using 'dd' and use that as the D: drive for the Windows guest. Jou just pass this second imagefile to qemu with the "-hdb" command switch.

Cheers, Eric

Alien Bob 07-19-2006 10:34 AM

Quote:

Originally Posted by nykey
ok, sry to say that, but after seeing Old_Foggie's post about VMware I tought I'd give it a shot

Hey, no offence taken :-) You should use the tools that work best for you and that you feel most comfortable with.
The advantage in using QEMU (to me at least, being an OSS advocate) is the fact that QEMU is fully open source. VMWare has features that QEMU has not, thanks to the many paid man-hours that went into their products. Still, QEMU does all the things I need it for.

Eric

nykey 07-19-2006 11:42 AM

ok, got sound. after adding the virtual machine, just press CTRL+D for settings and click Add , select Sound and then /dev/dsp. This is going pretty nice. Thx alot guys.

nykey 07-19-2006 02:18 PM

uselpa, looks like I got the error message you did too, about /dev/dsp beeing busy. I'm using Dropline Gnome, so arts would be out of the question. Could you investigate further how to fix this, cause I don't have a clue, much more to :study: for me in linux world :D. thanks.

uselpa 07-19-2006 02:35 PM

After a few seconds of googling... check this.

Old_Fogie 07-19-2006 02:38 PM

Thanks Eric for the info on resize, I jotted that down for myself.

I tend to "air on the side of caution" and investigate and ask before I totally jump in head first.

I haven't put it in yet, been reading the help, how-to's there all day mostly to get an idea of what I"m getting into.

From reading the manual there, it appears the use of cd-rom is thru the ctrl+alt+1/2 and some commands there.

Am I reading this correctly that with qemu if I wanted to use windows as a guest OS then I need a samba connection between windows and the host pc? Windows wouldnt be able to directly see a hard drive other than it's own c drive in the image file? I think that's what they're saying here.

Or I guess if I get windows to work w/my network card, I could do just do a samba share to a different pc on the lan and use the windows "map drive" feature.

I wonder if I could have windows running thru qemu...then download microsofts vm and run suse in microsofts free virtualization app......then run slackware in xen.... and qemu all over again....Can I do that too Eric ROFL :D :D :D :D

nykey 07-19-2006 02:54 PM

thanks for the replay and the link but none of them worked for me.

Alien Bob 07-19-2006 05:51 PM

Quote:

Originally Posted by Old_Fogie
From reading the manual there, it appears the use of cd-rom is thru the ctrl+alt+1/2 and some commands there.

Yes, somewhat along those lines is what you do when you have to change CDROM halfway the install. It is a command you have to issue in the "qemu monitor".

Quote:

Am I reading this correctly that with qemu if I wanted to use windows as a guest OS then I need a samba connection between windows and the host pc? Windows wouldnt be able to directly see a hard drive other than it's own c drive in the image file? I think that's what they're saying here.

Or I guess if I get windows to work w/my network card, I could do just do a samba share to a different pc on the lan and use the windows "map drive" feature.
Indeed, a guest OS inside QEMU can not see beyond the limits of it's own virtual disk. The rest of the host PC's filesystem is inaccessible to the guest unless the host has made provisions for this. There are several ways to exchange files between the guest OS running inside QEMU, and the host OS running QEMU. A Samba share is easy, if you have that already set up.
With the commandline option "-hdb fat:/some/directory" you can make part of the host filesystem accessible in read-only mode (although read/write is possible too) as a virtual VFAT disk image.

Quote:

I wonder if I could have windows running thru qemu...then download microsofts vm and run suse in microsofts free virtualization app......then run slackware in xen.... and qemu all over again....Can I do that too Eric ROFL :D :D :D :D
I tried (and succeeded) in running Slackware inside QEMU running on Slackware inside QEMU running on my Slackware desktop machine. Never tried that with Xen or VMware though...

Eric

acummings 07-20-2006 01:38 AM

Quote:

Or I guess if I get windows to work w/my network card, I could do just do a samba share to a different pc on the lan and use the windows "map drive" feature.
I think Windows works/routes via the Qemu virtual network and the Qemu emulated NIC/network_card.

Using Qemu's NAT and DNS and DHCP server these get the Windows (through the mentioned emulated NIC) over/onto the real NIC that's configured and working in Slackware. And, from here, for the Windows it's now onto anywhere where Slackware can go to. (except for the need for Samba due to we have a heterogenous network here) (Samba needed if want to share files between Slackware and the Windows running in Qemu).

(from a magazine article, perhaps Linux-Magazine) When Qemu is (importantly) *not* running, you can mount the image to your Linux file system and copy files either to or from the image -- then umount the image then launch Qemu and you now can see/use these copied files in Windows.

I installed Win 2K in Qemu using on Win 2K the fat32 file system which if you want to copy files in this (the above) manner (I'm not certain but) it may require fat32 on Win due to the Linux limited support for NTFS

At the next, you must add a line to fstab like my very last line from my fstab file (win2k.img line) -- then can mount/umount the image.

al@AB60R:~$ cat /etc/fstab
/dev/sda5 swap swap defaults 0 0
/dev/sda3 / reiserfs defaults 1 1
/dev/sda1 /boot ext2 defaults 1 2
/dev/cdrom /mnt/cdrom auto noauto,users,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,users 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
/dev/sdb5 /mnt/usbhd ext3 noauto,users,rw 0 0
tmpfs /dev/shm tmpfs defaults 0 0
/home/al/images/win2k.img /mnt/win2k vfat rw,user,loop,noauto,offset=32256 0 0

al@AB60R:~$
al@AB60R:~$ mount /mnt/win2k
al@AB60R:~$ umount /mnt/win2k
-----

Since then, I've recently learned how to get the networking operational in Qemu. It's easy. Samba, running on Slackware, provides the medium (which is the Samba or smb file sys) with which files can be network shared back and forth between Slackware and the MS_Win running in Qemu. (part of this is a virtual network that's within Qemu) which it appears that the Win OS in Qemu sends/receives data packets through the Qemu emulated NIC and that these data packets get NAT (forwarded) by Qemu's NAT (network address translation or forwarding which is also sometimes A.K.A. masquerade) forwarded evidently to your real NIC that Slackware uses.

(I guess a real NIC is required and also for it to be an operational NIC for Slackware). No problem for me. I'm always networking computers. The difference now for me is that Qemu is a recent first for me in the *virtual/emulated* of network whereas before I always had *real* network hardware and *real* networks connecting machines.

It still sounds funny to me ie "emulated" NIC, virtual ( as in *not a real* ) network. But the kicker is *it_works!!!* just as if it were a *real* network!!! So, this is a case where virtual is good enough 'cause all I need is for it to work!!

BTW my LAN is 192.168.1.xxx

Internet access is through my LAN (gateway IP is: 192.168.1.254) which is the (LAN side) IP address of my 2wire DSL firewall/gateway device (sbcglobal.net which is now ATT provider). (dynamic IP on internet side of the 2wire).

Win 2K running in Qemu has all LAN/network/internet access!! Through Samba, such Win 2K can access a share on (Qemu's host OS) Slackware. Through the (Qemu's) NAT and DNS (I don't know if Samba is needed for this, maybe not needed here) such Win 2K (using its virtual) accesses my real LAN and real internet gateway and onto the internet.

Yes, I much prefer to share files via Samba and a share on Slackware. It's *Much* more convenient than the cumbersome mount the image method that I enclosed up above.

http://members.tripod.com/~alancummings/virtl/

There's screenshots from two months ago when I first installed Qemu. Slackware with KDE desktop. Includes installing Win 2K in Qemu. Also then installing and using several Win softwares onto/with Win 2K. All of this is on top of (the host OS) Slackware with KDE desktop.

--
Alan.


All times are GMT -5. The time now is 08:27 PM.