From mboxrd@z Thu Jan 1 00:00:00 1970 From: Catonano Subject: Re: qemu shared folder Date: Mon, 8 Jan 2018 22:39:50 +0100 Message-ID: References: <87tw4dt7rd.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="089e082c5388584e1305624aa3db" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45710) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYf9A-0002cw-VT for help-guix@gnu.org; Mon, 08 Jan 2018 16:39:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eYf98-0005Sb-Ub for help-guix@gnu.org; Mon, 08 Jan 2018 16:39:57 -0500 In-Reply-To: <87tw4dt7rd.fsf@gnu.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Cc: help-guix --089e082c5388584e1305624aa3db Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 2017-05-22 14:07 GMT+02:00 Ludovic Court=C3=A8s : > Hello, > > Catonano skribis: > > > I created my virtual machine with this command > > > > guix system vm-image /etc/vm-config-desktop.scm \ > > --image-size=3D30GB \ > > --share=3D$HOME=3D/exchange > > > > then I copied the image from the store to a local folder > > then I run it with this command > > > > qemu-system-x86_64 \ > > -net user \ > > -net nic,model=3Dvirtio \ > > -enable-kvm -m 4096 .../projects/qemu-image > > > > Now: I understand that there should be a folder that is shared among th= e > 2 > > machines, the host and the guest > > > > I can't find it > > > > Where is it ? > > > > Where is iit on the host ? > > And where is it on the guest ? > > The documentation (info "(guix) Invoking guix system") phrases it this > way: > > The example below creates a VM in which the user=E2=80=99s home dire= ctory > is accessible read-only, and where the =E2=80=98/exchange=E2=80=99 d= irectory is a > read-write mapping of =E2=80=98$HOME/tmp=E2=80=99 on the host: > > guix system vm my-config.scm \ > --expose=3D$HOME --share=3D$HOME/tmp=3D/exchange > > IOW, if you do =E2=80=9Ccd /exchange=E2=80=9D in the guest, you should se= e the contents > of the host=E2=80=99s $HOME/tmp, read-write. Likewise, if $HOME =3D /foo= in the > host, then /foo in the guest is a read-only view of the host=E2=80=99s /f= oo. > > HTH! > It helped ! There's some work to do, but we're getting there ;-) So 2 observations 1) the script produced by system vm contains this bit: -m 256 does this mean that the guest has 256 Mb ? For a Gnome session that's not enough ! I copied this script /gnu/store/d7kwa95lip6y7xw62fipw391qm3ilb53-run-vm.sh to a local folder and I edited it in order to give the machine 2 Gb, like this -m 2G and it's way better !! Instead, if I run /gnu/store/d7kwa95lip6y7xw62fipw391qm3ilb53-run-vm.sh this what I get, roughly [ 496.828999] traps: pool[679] trap int3 ip:7f4d0230fb31 sp:7f4d00e76ba0 error:0 in libglib-2.0.so.0.5200.3[7f4d022c1000+110000] Error creating proxy: Errore nel chiamare StartServiceByName per org.gtk.vfs.GPhoto2VolumeMonitor: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildSignaled: Process org.gtk.vfs.GPhoto2VolumeMonitor received signal 5 (g-dbus-error-quark, 26) gnome-session-binary[577]: WARNING: Application 'org.gnome.Shell.desktop' failed to register before timeout gnome-session-binary[577]: WARNING: Failed to start app: Unable to start application: Esecuzione di fork non riuscita (Impossibile allocare memoria) gnome-session-binary[577]: WARNING: Failed to start app: Unable to start application: Esecuzione di fork non riuscita (Impossibile allocare memoria) gnome-session-binary[577]: WARNING: Failed to start app: Unable to start application: Esecuzione di fork non riuscita (Impossibile allocare memoria) gnome-session-binary[577]: WARNING: Failed to start app: Unable to start application: Esecuzione di fork non riuscita (Impossibile allocare memoria) gnome-session-binary[577]: WARNING: Failed to start app: Unable to start application: Esecuzione di fork non riuscita (Impossibile allocare memoria) gnome-session-binary[577]: WARNING: Failed to start app: Unable to start application: Esecuzione di fork non riuscita (Impossibile allocare memoria) gnome-session-binary[577]: WARNING: Failed to start app: Unable to start application: Esecuzione di fork non riuscita (Impossibile allocare memoria) gnome-session-binary[577]: WARNING: Failed to start app: Unable to start application: Esecuzione di fork non riuscita (Impossibile allocare memoria) gnome-session-binary[577]: WARNING: Failed to start app: Unable to start application: Esecuzione di fork non riuscita (Impossibile allocare memoria) gnome-session-binary[577]: WARNING: Failed to start app: Unable to start application: Esecuzione di fork non riuscita (Impossibile allocare memoria) gnome-session-binary[577]: WARNING: Failed to start app: Unable to start application: Esecuzione di fork non riuscita (Impossibile allocare memoria) gnome-session-binary[577]: WARNING: Failed to start app: Unable to start application: Esecuzione di fork non riuscita (Impossibile allocare memoria) gnome-session-binary[577]: WARNING: Failed to start app: Unable to start application: Esecuzione di fork non riuscita (Impossibile allocare memoria) gnome-session-binary[577]: WARNING: Failed to start app: Unable to start application: Esecuzione di fork non riuscita (Impossibile allocare memoria) gnome-session-binary[577]: WARNING: Failed to start app: Unable to start application: Esecuzione di fork non riuscita (Impossibile allocare memoria) gnome-session-binary[577]: WARNING: Failed to start app: Unable to start application: Esecuzione di fork non riuscita (Impossibile allocare memoria) gnome-session-binary[577]: WARNING: Failed to start app: Unable to start application: Esecuzione di fork non riuscita (Impossibile allocare memoria) gnome-session-binary[577]: WARNING: Failed to start app: Unable to start application: Esecuzione di fork non riuscita (Impossibile allocare memoria) gnome-session-binary[577]: WARNING: Failed to start app: Unable to start application: Esecuzione di fork non riuscita (Impossibile allocare memoria) gnome-session-binary[577]: WARNING: Failed to start app: Unable to start application: Esecuzione di fork non riuscita (Impossibile allocare memoria) ** (gnome-session-failed:542): WARNING **: Cannot open display: gnome-session-binary[442]: WARNING: Failed to start app: Unable to start application: Esecuzione di fork non riuscita (Impossibile allocare memoria) 8 Jan 22:10:47 ntpd[386]: Deleting interface #5 eth0, fe80::20e:6d5d:8610:7ad1%2#123, interface stats: received=3D0, sent=3D0, dropped=3D0, active_time=3D165 secs This sentence in Italian "Esecuzione di fork non riuscita (Impossibile allocare memoria)" means that a call to "fork" failed because allocation of some new memory failed You are probably not used to run Gnome in virtual machines so you never run into this Can I pass a switch to system vm so that it concedes more memory to my guest ? Similar to " --image-size=3D10GB " but for ram space rather than disk spa= ce Ok, second observation: 2) if instead of system vm I use system vm-image, --share=3D$HOME/transit=3D/transit doesn't work So it seems Why ? Couldn't it work anyway ? Pheew ;-) --089e082c5388584e1305624aa3db Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
2017-05-22 14:07 GMT+02:00 Ludovic Court=C3=A8s <ludo@gnu.org= >:
<= blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px= #ccc solid;padding-left:1ex">Hello,

Catonano <catonano@gmail.com&g= t; skribis:

> I created my virtual machine with this command
>
> guix system vm-image /etc/vm-config-desktop.scm \
>=C2=A0 =C2=A0 --image-size=3D30GB \
>=C2=A0 =C2=A0 --share=3D$HOME=3D/exchange
>
> then I copied the image from the store to a local folder
> then I run it with this command
>
> qemu-system-x86_64 \
>=C2=A0 -net user \
>=C2=A0 -net nic,model=3Dvirtio \
>=C2=A0 -enable-kvm -m 4096 .../projects/qemu-image
>
> Now: I understand that there should be a folder that is shared among t= he 2
> machines, the host and the guest
>
> I can't find it
>
> Where is it ?
>
> Where is iit on the host ?
> And where is it on the guest ?

The documentation (info "(guix) Invoking guix system") phr= ases it this
way:

=C2=A0 =C2=A0 =C2=A0The example below creates a VM in which the user=E2=80= =99s home directory
=C2=A0 =C2=A0 =C2=A0is accessible read-only, and where the =E2=80=98/exchan= ge=E2=80=99 directory is a
=C2=A0 =C2=A0 =C2=A0read-write mapping of =E2=80=98$HOME/tmp=E2=80=99 on th= e host:

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 guix system vm my-config.scm \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0--expose=3D$HOME --share=3D= $HOME/tmp=3D/exchange

IOW, if you do =E2=80=9Ccd /exchange=E2=80=9D in the guest, you should see = the contents
of the host=E2=80=99s $HOME/tmp, read-write.=C2=A0 Likewise, if $HOME =3D /= foo in the
host, then /foo in the guest is a read-only view of the host=E2=80=99s /foo= .

HTH!

It helped !

Ther= e's some work to do, but we're getting there ;-)

= So 2 observations

1)

the script produced by system= vm contains this bit:

-m=C2=A0 256

does this mean= that the guest has 256 Mb ?

For a Gnome session that'= ;s not enough !

I copied this script

/gnu/store/d7= kwa95lip6y7xw62fipw391qm3ilb53-run-vm.sh

to a local folde= r and I edited it in order to give the machine 2 Gb, like this

-m 2G=

and it's way better !!

Instead, if I run
/gnu/store/d7kwa95lip6y7xw62fipw391qm3ilb53-run-vm.sh

this what I get, roughly

[=C2=A0 496.828999] traps: pool[67= 9] trap int3 ip:7f4d0230fb31 sp:7f4d00e76ba0 error:0 in libglib-2.0.so.0.52= 00.3[7f4d022c1000+110000]
Error creating proxy: Errore nel chiamare Star= tServiceByName per org.gtk.vfs.GPhoto2VolumeMonitor: GDBus.Error:org.freede= sktop.DBus.Error.Spawn.ChildSignaled: Process org.gtk.vfs.GPhoto2VolumeMoni= tor received signal 5 (g-dbus-error-quark, 26)

gnome-session-binary[= 577]: WARNING: Application 'org.gnome.Shell.desktop' failed to regi= ster before timeout
gnome-session-binary[577]: WARNING: Failed to start = app: Unable to start application: Esecuzione di fork non riuscita (Impossib= ile allocare memoria)
gnome-session-binary[577]: WARNING: Failed to star= t app: Unable to start application: Esecuzione di fork non riuscita (Imposs= ibile allocare memoria)
gnome-session-binary[577]: WARNING: Failed to st= art app: Unable to start application: Esecuzione di fork non riuscita (Impo= ssibile allocare memoria)
gnome-session-binary[577]: WARNING: Failed to = start app: Unable to start application: Esecuzione di fork non riuscita (Im= possibile allocare memoria)
gnome-session-binary[577]: WARNING: Failed t= o start app: Unable to start application: Esecuzione di fork non riuscita (= Impossibile allocare memoria)
gnome-session-binary[577]: WARNING: Failed= to start app: Unable to start application: Esecuzione di fork non riuscita= (Impossibile allocare memoria)
gnome-session-binary[577]: WARNING: Fail= ed to start app: Unable to start application: Esecuzione di fork non riusci= ta (Impossibile allocare memoria)
gnome-session-binary[577]: WARNING: Fa= iled to start app: Unable to start application: Esecuzione di fork non rius= cita (Impossibile allocare memoria)
gnome-session-binary[577]: WARNING: = Failed to start app: Unable to start application: Esecuzione di fork non ri= uscita (Impossibile allocare memoria)
gnome-session-binary[577]: WARNING= : Failed to start app: Unable to start application: Esecuzione di fork non = riuscita (Impossibile allocare memoria)
gnome-session-binary[577]: WARNI= NG: Failed to start app: Unable to start application: Esecuzione di fork no= n riuscita (Impossibile allocare memoria)
gnome-session-binary[577]: WAR= NING: Failed to start app: Unable to start application: Esecuzione di fork = non riuscita (Impossibile allocare memoria)
gnome-session-binary[577]: W= ARNING: Failed to start app: Unable to start application: Esecuzione di for= k non riuscita (Impossibile allocare memoria)
gnome-session-binary[577]:= WARNING: Failed to start app: Unable to start application: Esecuzione di f= ork non riuscita (Impossibile allocare memoria)
gnome-session-binary[577= ]: WARNING: Failed to start app: Unable to start application: Esecuzione di= fork non riuscita (Impossibile allocare memoria)
gnome-session-binary[5= 77]: WARNING: Failed to start app: Unable to start application: Esecuzione = di fork non riuscita (Impossibile allocare memoria)
gnome-session-binary= [577]: WARNING: Failed to start app: Unable to start application: Esecuzion= e di fork non riuscita (Impossibile allocare memoria)
gnome-session-bina= ry[577]: WARNING: Failed to start app: Unable to start application: Esecuzi= one di fork non riuscita (Impossibile allocare memoria)
gnome-session-bi= nary[577]: WARNING: Failed to start app: Unable to start application: Esecu= zione di fork non riuscita (Impossibile allocare memoria)
gnome-session-= binary[577]: WARNING: Failed to start app: Unable to start application: Ese= cuzione di fork non riuscita (Impossibile allocare memoria)


** (= gnome-session-failed:542): WARNING **: Cannot open display:
gnome-sessi= on-binary[442]: WARNING: Failed to start app: Unable to start application: = Esecuzione di fork non riuscita (Impossibile allocare memoria)
=C2=A08 J= an 22:10:47 ntpd[386]: Deleting interface #5 eth0, fe80::20e:6d5d:8610:7ad1= %2#123, interface stats: received=3D0, sent=3D0, dropped=3D0, active_time= =3D165 secs

This sentence in Italian
"Esecuzione = di fork non riuscita (Impossibile allocare memoria)"

means that a call to "fork" failed because allocation of some ne= w memory failed

You are probably not used to run Gnome in= virtual machines so you never run into this

Can I pass a= switch to system vm so that it concedes more memory to my guest ?
Similar to "=C2=A0=C2=A0 --image-size=3D10GB " but for ram = space rather than disk space

Ok, second observation:
<= br>2)

if instead of system vm I use system vm-image, =C2= =A0=C2=A0 --share=3D$HOME/transit=3D/transit doesn't work
So it seems
Why ?
Couldn't it work anyway= ?

Pheew ;-)
--089e082c5388584e1305624aa3db--