Audio/video stream recording forums

Attention Visitor:
You may have to register or log in before you can post:
  • Click the register link to sign up.
  • Registered members please fill in the form below and click the "Log in" button.
To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Audio/video stream recording forums > Other discussions > Linux and software for Linux
Register FAQ Members List Calendar Mark Forums Read

Reply Post New Thread
 
Thread Tools Display Modes
  #1  
Old 03-28-2010, 09:19 AM
elch elch is offline
Member
 
Join Date: Mar 2010
Posts: 78
elch is on a distinguished road
Default

Problems with Qemu


Quote:
[*]USB drives and my USB headset are not mounted automatically. In VirtualBox I was able to do that automatically or with a couple of clicks.
If your USB drive is recognized by Linux, you can allow Qemu direct access to it by using e.g. the -hdb or -hdc parameter. However, this needs to be done before Qemu is started. The only way of doing this during runtime is to use the Qemu console. Press CTRL-Alt-2. Then enter: "usb_add host:<VendorID>:<ProductID>" (you can get the VendorID and ProductID from the command "lsusb").

I haven't used sound myself yet, but according to this page "-soundhw all" should do it. Is your USB headset used as default output in ALSA when you plug it in? Probably you can use PulseAudio to use a different output in Qemu? But I doubt Qemu is PulseAudio-aware.

Quote:
Can't find a way to use my NTFS disks with Qemu
I've read that I can use the following option:
Code:
-hdc fat:rw:/media/mydrive/
(even though it is an NTFS drive), but can't make it work.
You are pointing to the mounted device. I'm not even sure whether you can specify FAT for NTFS devices. Use "fdisk -l" (as root) to get a listing of your disks. Then use e.g. -hdc /dev/sdb. It's best to keep it unmounted while Qemu uses it. Otherwise you might run into data loss if both your Linux system and your virtual machine write on the disk.

According to this thread, you might be right by using FAT for an already-mounted directory. Perhaps you need to be -fda, like in the example they provided:
qemu winxp.img -fda fat:floppy:/my_directory

Quote:
Can't copy-paste from virtual machine to my Ubuntu or from my Ubuntu to my virtual machine.[/list]
I don't think Qemu supports the X.org clipboard. The only way to solve this is to either enable VNC or Remote Desktop within your virtual machine. VNC is directly supported by Qemu but when you're using Windows XP, I'd rather prefer Remote Desktop because it's faster and more suitable. It's also perfectly supported by Linux (rdesktop).

Hope this helps.
Reply With Quote
  #2  
Old 03-28-2010, 12:08 PM
Stream Recorder
 
Posts: n/a
Default

Re: Problems with Qemu


Quote:
Originally Posted by elch View Post
If your USB drive is recognized by Linux, you can allow Qemu direct access to it by using e.g. the -hdb or -hdc parameter. However, this needs to be done before Qemu is started. The only way of doing this during runtime is to use the Qemu console. Press CTRL-Alt-2. Then enter: "usb_add host:<VendorID>:<ProductID>" (you can get the VendorID and ProductID from the command "lsusb").
Thank you very much! I didn't even know about the qemu console before your post.

Quote:
Originally Posted by elch View Post
You are pointing to the mounted device. I'm not even sure whether you can specify FAT for NTFS devices. Use "fdisk -l" (as root) to get a listing of your disks. Then use e.g. -hdc /dev/sdb. It's best to keep it unmounted while Qemu uses it. Otherwise you might run into data loss if both your Linux system and your virtual machine write on the disk.

According to this thread, you might be right by using FAT for an already-mounted directory. Perhaps you need to be -fda, like in the example they provided:
qemu winxp.img -fda fat:floppy:/my_directory
I used GParted (I became lazy after using Windows, so it is hard to use console now ). And I tried to use not only mounted drives, but also /dev/sda1:
Code:
qemu -hda image.qcow2 -hdc /dev/sdb1
Code:
qemu -hda image.qcow2 -hdb /dev/sda1
Code:
qemu -hda image.qcow2 -hdb fat:/dev/sdb1
but I only get the following error
Code:
qemu: could not open disk image fat:/dev/sdb1/
Although this works for Windows host according to this

Also tried the following
Code:
qemu -hda image.qcow2 -drive file="fat::rw:"/media/mydisc"",index=1,media=disk
But my Windows guest doesn't see it...

It seems that Samba is the only way to access files for me.


Quote:
Originally Posted by elch View Post
I don't think Qemu supports the X.org clipboard. The only way to solve this is to either enable VNC or Remote Desktop within your virtual machine. VNC is directly supported by Qemu but when you're using Windows XP, I'd rather prefer Remote Desktop because it's faster and more suitable. It's also perfectly supported by Linux (rdesktop).
The only solution I saw was using VNC and x2vnc:
http://borderworlds.dk/blog/20070224-00.html

Quote:
Originally Posted by elch View Post
Hope this helps.
Thank you very much! This is very helpful!
Reply With Quote
  #3  
Old 03-30-2010, 11:34 AM
elch elch is offline
Member
 
Join Date: Mar 2010
Posts: 78
elch is on a distinguished road
Default

Re: Problems with Qemu


I had the impression that it was more stable using Windows' Remote Desktop feature compared to VNC. Here's a tutorial on how to use it: http://nerds-central.blogspot.com/20...fast-qemu.html

By the way, perhaps the commands did not work because you have to run them as "root"? Specifically, I was talking about:

qemu -hda image.qcow2 -hdb /dev/sda1

This works fine for me.
Reply With Quote
  #4  
Old 03-30-2010, 02:46 PM
Stream Recorder
 
Posts: n/a
Default

Re: Problems with Qemu


Quote:
Originally Posted by elch View Post
I had the impression that it was more stable using Windows' Remote Desktop feature compared to VNC.
Remote Desktop is probably better, and I wanted to use VNC because of the tutorial allowing clipboard synchronization.

Quote:
Originally Posted by elch View Post
By the way, perhaps the commands did not work because you have to run them as "root"? Specifically, I was talking about:

qemu -hda image.qcow2 -hdb /dev/sda1

This works fine for me.
You are a genius! It works like a charm!


Another interesting thing is that, unlike VirtualBox, qemu allows PCI passthrough. I will try to make my PCI TV Tuner work on a guest OS.
Reply With Quote
  #5  
Old 04-03-2010, 03:20 AM
Stream Recorder
 
Posts: n/a
Default

Re: Problems with Qemu


Quote:
Originally Posted by elch View Post
qemu -hda image.qcow2 -hdb /dev/sda1
I can see the file structure, but when I try to write to host NTFS file system, or read files from it, it doesn't work
Reply With Quote
  #6  
Old 04-03-2010, 07:32 AM
elch elch is offline
Member
 
Join Date: Mar 2010
Posts: 78
elch is on a distinguished road
Default

Re: Problems with Qemu


Is it already mounted on your host system? Then unmount it.

If it still does not work, try to mount it on your host system and start Qemu with:

-hdc fat:rw:/media/mydrive/
Reply With Quote
  #7  
Old 04-03-2010, 01:34 PM
Stream Recorder
 
Posts: n/a
Default

Re: Problems with Qemu


Thank you, elch. I will try to follow your advice.

It is just so annoying that this needs to be done. I used to work with 2 of my NTFS drives using VirtualBox. I've never had any problem accessing them from both host and guest simultaneously. I wish VirtualBox was as fast as qemu.
Reply With Quote
Reply Post New Thread
Tags: , , ,



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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 11:18 AM.


Powered by All-streaming-media.com; 2006-2011
vB forum hacked with Zoints add-ons