[HOME] [DOWNLOAD] [DOCS] [BLOG] [SUPPORT] [TIPS] [ISSUES] [Priority Support]

KVM Shared Problem


#1

sudo mkdir /home/user/shared
sudo chmod 777 /home/user/shared
sudo chown -R user /home/user/shared && sudo chmod 777 -R /home/user/shared

And code from Wiki added to vm’s device settings.

Now run Whonix Workstation and get error:

Error starting domain: internal error: early end of file from monitor, possible problem: -pci,id=balloon0,bus=pci.0,addr=0x7 -object rng-random,id=objrng0,filename=/dev/random -device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.0,addr=0x8 -msg timestamp=on
2017-06-07T07:53:01.629133Z qemu-system-x86_64: -device virtio-9p-pci,id=fs0,fsdev=fsdev-fs0,mount_tag=shared,bus=pci.0,addr=0x9: Virtio-9p Failed to initialize fs-driver with id:fsdev-fs0 and export path:/mnt/shared

Error starting domain: internal error: early end of file from monitor, possible problem: -pci,id=balloon0,bus=pci.0,addr=0x7 -object rng-random,id=objrng0,filename=/dev/random -device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.0,addr=0x8 -msg timestamp=on
2017-06-07T07:53:01.629133Z qemu-system-x86_64: -device virtio-9p-pci,id=fs0,fsdev=fsdev-fs0,mount_tag=shared,bus=pci.0,addr=0x9: Virtio-9p Failed to initialize fs-driver with id:fsdev-fs0 and export path:/mnt/shared

Traceback (most recent call last):
File “/usr/share/virt-manager/virtManager/asyncjob.py”, line 90, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File “/usr/share/virt-manager/virtManager/asyncjob.py”, line 126, in tmpcb
callback(*args, **kwargs)
File “/usr/share/virt-manager/virtManager/libvirtobject.py”, line 83, in newfn
ret = fn(self, *args, **kwargs)
File “/usr/share/virt-manager/virtManager/domain.py”, line 1402, in startup
self._backend.create()
File “/usr/lib/python2.7/dist-packages/libvirt.py”, line 1035, in create
if ret == -1: raise libvirtError (‘virDomainCreate() failed’, dom=self)
libvirtError: internal error: early end of file from monitor, possible problem: -pci,id=balloon0,bus=pci.0,addr=0x7 -object rng-random,id=objrng0,filename=/dev/random -device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.0,addr=0x8 -msg timestamp=on
2017-06-07T07:53:01.629133Z qemu-system-x86_64: -device virtio-9p-pci,id=fs0,fsdev=fsdev-fs0,mount_tag=shared,bus=pci.0,addr=0x9: Virtio-9p Failed to initialize fs-driver with id:fsdev-fs0 and export path:/mnt/shared


#2

libguestfs0 is not installed.


#3

Frieeends, help please.


#4

Did you adjust the above mkdir command to create a shared folder under your username’s home folder?

You don’t need libguestfs for shared folders. Run: “sudo modprobe 9pnet_virtio” without quotes in the guest. You normally don’t need to do that.

BTW there was a small bug in the shared folders feature in the Whonix 13 release and to fix it you need to update your VMs from the Whonix repos.

EDIT:

This particular error means you haven’t created the shared folder on the host correclty. https://thelittleican.blogspot.com/2014/01/virtio-9p-failed-to-initialize-fs.html


#6

From the regular user (not root):
mkdir /tmp/share

Reconfigure:
virsh edit Whonix-Workstation
Added:
https://pastebin.com/wq3ewuy4

Same Problem:

Error starting domain: internal error: process exited while connecting to monitor: 2017-06-08T16:42:06.964544Z qemu-system-x86_64: -device virtio-9p-pci,id=fs0,fsdev=fsdev-fs0,mount_tag=share,bus=pci.0,addr=0x9: Virtio-9p Failed to initialize fs-driver with id:fsdev-fs0 and export path:/tmp/share

Traceback (most recent call last):
File “/usr/share/virt-manager/virtManager/asyncjob.py”, line 90, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File “/usr/share/virt-manager/virtManager/asyncjob.py”, line 126, in tmpcb
callback(*args, **kwargs)
File “/usr/share/virt-manager/virtManager/libvirtobject.py”, line 83, in newfn
ret = fn(self, *args, **kwargs)
File “/usr/share/virt-manager/virtManager/domain.py”, line 1402, in startup
self._backend.create()
File “/usr/lib/python2.7/dist-packages/libvirt.py”, line 1035, in create
if ret == -1: raise libvirtError (‘virDomainCreate() failed’, dom=self)
libvirtError: internal error: process exited while connecting to monitor: 2017-06-08T16:42:06.964544Z qemu-system-x86_64: -device virtio-9p-pci,id=fs0,fsdev=fsdev-fs0,mount_tag=share,bus=pci.0,addr=0x9: Virtio-9p Failed to initialize fs-driver with id:fsdev-fs0 and export path:/tmp/share


#7

What are you creating the shared folder in /tmp/ for? Forget about the command line and just create a folder called “shared” in your home folder. Use the libvirt gui to add the shared folder device by choosing it and follow all the other instructions.


#8

“To solve this error, just create a folder in your /tmp folder using this:
mkdir /tmp/share”


#9

I in Whonix but I do not see my files in the folder:
/mnt/shared/

Now I will update Workstation.


#11

sudo apt-get update
sudo apt-get dist-upgrade
did not help.

I do not see my files in the folder:
/mnt/shared/


#12

Did you create the shared folder in your home folder on the host as I said?

/mnt/shared is location in the guest where you can access the shared folder. Creating your shared folder under /tmp/ or /mnt/ on the host is problematic for file access permissions.

Make sure you have set the shared folder to ‘777’ on the host as the instructions say or you won’t be able to write to it.


#13

yes

[quote=“HulaHoop, post:12, topic:4010”]
/mnt/shared is location in the guest where you can access the shared folder. Creating your shared folder under /tmp/ or /mnt/ on the host is problematic for file access permissions.
[/quote]I know

sudo chmod 777 -R /home/myuser/share
And I have few files there and folder on the host.
But I do not see anything in the guest (/mnt/shared/).


#14

What is your host distro? SELinux causes additional permission restrictions that can do this.


#15

Linux Mint of of course.


#16

Unfortunately I’m out of ideas. What you’re experiencing is likely a distro specific bug. Please try asking the Linux Mint people for help and post back any answers they have to help others.

PS. Debian is a more secure alternative to Mint. Last time I checked Mint didn’t do security advisories(!)


#17

I figured it out if anyone out there still cares. The only command you need to make shared files accessible in the host and guest is:

sudo chmod 777 -R /home/yourusername/shared

The longer command I had originally was wrong. Thanks for reporting this.