all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* qemu shared folder
@ 2017-05-22  8:10 Catonano
  2017-05-22 12:07 ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: Catonano @ 2017-05-22  8:10 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 814 bytes --]

Ok, this is not about Guix per se

But I understand that in order to play with services you need to run GuixSD
in a Qemu virtual machine

I created my virtual machine with this command

guix system vm-image /etc/vm-config-desktop.scm \
   --image-size=30GB \
   --share=$HOME=/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=virtio \
 -enable-kvm -m 4096 .../projects/qemu-image

Now: I understand that there should be a folder that is shared among the 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 ?

I tried to manually creat /exchhange and put a small text file in it but I
couldn't ind it anywhere on the guest

Thanks in advance

[-- Attachment #2: Type: text/html, Size: 1107 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: qemu shared folder
  2017-05-22  8:10 qemu shared folder Catonano
@ 2017-05-22 12:07 ` Ludovic Courtès
  2018-01-08 21:39   ` Catonano
  0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2017-05-22 12:07 UTC (permalink / raw)
  To: Catonano; +Cc: help-guix

Hello,

Catonano <catonano@gmail.com> skribis:

> I created my virtual machine with this command
>
> guix system vm-image /etc/vm-config-desktop.scm \
>    --image-size=30GB \
>    --share=$HOME=/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=virtio \
>  -enable-kvm -m 4096 .../projects/qemu-image
>
> Now: I understand that there should be a folder that is shared among the 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’s home directory
     is accessible read-only, and where the ‘/exchange’ directory is a
     read-write mapping of ‘$HOME/tmp’ on the host:

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

IOW, if you do “cd /exchange” in the guest, you should see the contents
of the host’s $HOME/tmp, read-write.  Likewise, if $HOME = /foo in the
host, then /foo in the guest is a read-only view of the host’s /foo.

HTH!

Ludo’.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: qemu shared folder
  2017-05-22 12:07 ` Ludovic Courtès
@ 2018-01-08 21:39   ` Catonano
  2018-01-10  7:15     ` Chris Marusich
  0 siblings, 1 reply; 5+ messages in thread
From: Catonano @ 2018-01-08 21:39 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 6492 bytes --]

2017-05-22 14:07 GMT+02:00 Ludovic Courtès <ludo@gnu.org>:

> Hello,
>
> Catonano <catonano@gmail.com> skribis:
>
> > I created my virtual machine with this command
> >
> > guix system vm-image /etc/vm-config-desktop.scm \
> >    --image-size=30GB \
> >    --share=$HOME=/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=virtio \
> >  -enable-kvm -m 4096 .../projects/qemu-image
> >
> > Now: I understand that there should be a folder that is shared among the
> 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’s home directory
>      is accessible read-only, and where the ‘/exchange’ directory is a
>      read-write mapping of ‘$HOME/tmp’ on the host:
>
>           guix system vm my-config.scm \
>              --expose=$HOME --share=$HOME/tmp=/exchange
>
> IOW, if you do “cd /exchange” in the guest, you should see the contents
> of the host’s $HOME/tmp, read-write.  Likewise, if $HOME = /foo in the
> host, then /foo in the guest is a read-only view of the host’s /foo.
>
> 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=0, sent=0,
dropped=0, active_time=165 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=10GB " but for ram space rather than disk space

Ok, second observation:

2)

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

Pheew ;-)

[-- Attachment #2: Type: text/html, Size: 7496 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: qemu shared folder
  2018-01-08 21:39   ` Catonano
@ 2018-01-10  7:15     ` Chris Marusich
  2018-01-13 18:32       ` Catonano
  0 siblings, 1 reply; 5+ messages in thread
From: Chris Marusich @ 2018-01-10  7:15 UTC (permalink / raw)
  To: Catonano; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 1776 bytes --]

Catonano <catonano@gmail.com> writes:

> the script produced by system vm contains this bit:
>
> -m  256
>
> does this mean that the guest has 256 Mb ?

Yes.  The qemu manual describes this in more detail (section 2.3,
"Invocation"):

https://qemu.weilnetz.de/doc/qemu-doc.html

You might want to bookmark it or keep a local copy; it's a useful
reference manual.

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

Yes, you can.  The Guix manual explains ((guix) Invoking guix system):

     Arguments given to the script are passed to QEMU as in the example
     below, which enables networking and requests 1 GiB of RAM for the
     emulated machine:

          $ /gnu/store/...-run-vm.sh -m 1024 -net user

> Ok, second observation:
>
> 2)
>
> if instead of system vm I use system vm-image,
> --share=$HOME/transit=/transit doesn't work
> So it seems
> Why ?
> Couldn't it work anyway ?

I don't think that will work.  I'm pretty sure that the --share option
is specific to "guix system".  What you probably want to do is look at
the options used in the /gnu/store/...-run-vm.sh script, and mimic what
it does.  If you see QEMU options in there that you don't understand,
try looking them up in the QEMU manual.

By the way, there is a "--share" option mentioned in the QEMU manual,
but it seems to be totally unrelated (section 2.7.10, "NBD access").

> Pheew ;-)

Hang in there!  QEMU is extremely versatile, but it's got a little bit
of a learning curve.  Beyond the reference manual, you can find even
more documentation here:

https://wiki.qemu.org/Manual

Hope that helped.  Good luck!

-- 
Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: qemu shared folder
  2018-01-10  7:15     ` Chris Marusich
@ 2018-01-13 18:32       ` Catonano
  0 siblings, 0 replies; 5+ messages in thread
From: Catonano @ 2018-01-13 18:32 UTC (permalink / raw)
  To: Chris Marusich; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 1913 bytes --]

2018-01-10 8:15 GMT+01:00 Chris Marusich <cmmarusich@gmail.com>:

> Catonano <catonano@gmail.com> writes:
>
> > the script produced by system vm contains this bit:
> >
> > -m  256
> >
> > does this mean that the guest has 256 Mb ?
>
> Yes.  The qemu manual describes this in more detail (section 2.3,
> "Invocation"):
>
> https://qemu.weilnetz.de/doc/qemu-doc.html
>
> You might want to bookmark it or keep a local copy; it's a useful
> reference manual.
>
> > Can I pass a switch to system vm so that it concedes more memory to my
> > guest ?
> > Similar to "   --image-size=10GB " but for ram space rather than disk
> space
>
> Yes, you can.  The Guix manual explains ((guix) Invoking guix system):
>
>      Arguments given to the script are passed to QEMU as in the example
>      below, which enables networking and requests 1 GiB of RAM for the
>      emulated machine:
>
>           $ /gnu/store/...-run-vm.sh -m 1024 -net user
>

Ok, thanks


>
> > Ok, second observation:
> >
> > 2)
> >
> > if instead of system vm I use system vm-image,
> > --share=$HOME/transit=/transit doesn't work
> > So it seems
> > Why ?
> > Couldn't it work anyway ?
>
> I don't think that will work.  I'm pretty sure that the --share option
> is specific to "guix system".  What you probably want to do is look at
> the options used in the /gnu/store/...-run-vm.sh script, and mimic what
> it does.  If you see QEMU options in there that you don't understand,
> try looking them up in the QEMU manual.
>
> By the way, there is a "--share" option mentioned in the QEMU manual,
> but it seems to be totally unrelated (section 2.7.10, "NBD access").
>
> > Pheew ;-)
>
> Hang in there!  QEMU is extremely versatile, but it's got a little bit
> of a learning curve.  Beyond the reference manual, you can find even
> more documentation here:
>
> https://wiki.qemu.org/Manual
>
> Hope that helped.  Good luck!
>

That helped !
Thanks !

[-- Attachment #2: Type: text/html, Size: 3010 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-01-13 18:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-22  8:10 qemu shared folder Catonano
2017-05-22 12:07 ` Ludovic Courtès
2018-01-08 21:39   ` Catonano
2018-01-10  7:15     ` Chris Marusich
2018-01-13 18:32       ` Catonano

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.