amluto / virtme

An easy way to virtualize the running system
GNU General Public License v2.0
330 stars 66 forks source link

installation instructions #21

Closed muelli closed 5 years ago

muelli commented 6 years ago

I ran pretty much these commands:

➜ tmp>virtualenv --system-site-packages  --python=python3 /tmp/virtme
Already using interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /tmp/virtme/bin/python3
Also creating executable in /tmp/virtme/bin/python
Installing setuptools, pkg_resources, pip, wheel...done.
➜ tmp>/tmp/virtme/bin/pip install 'git+http://github.com/amluto/virtme#egg=virtme'
Collecting virtme from git+http://github.com/amluto/virtme#egg=virtme
  Cloning http://github.com/amluto/virtme to ./pip-install-5gz50xtg/virtme
Building wheels for collected packages: virtme
  Running setup.py bdist_wheel for virtme ... done
  Stored in directory: /tmp/pip-ephem-wheel-cache-dg8zx1ce/wheels/01/23/c1/8bb07c0ec32d4aad2e9b56850eb290ed2f4bf4850be4160f74
Successfully built virtme
Installing collected packages: virtme
Successfully installed virtme-0.0.3
➜ tmp>/tmp/virtme/bin/virtme-run 
You must specify a kernel to use.
usage: virtme-run [-h] [--installed-kernel [VERSION] | --kimg KIMG | --kdir
                  KDIR] [-a KOPT] [--xen XEN] [--root ROOT] [--rw]
                  [--graphics] [--net] [--balloon] [--disk NAME=PATH]
                  [--name NAME] [--script-sh SHELL_COMMAND]
                  [--script-exec BINARY] [--arch ARCHITECTURE]
                  [--busybox PATH_TO_BUSYBOX] [-q QEMU_OPT] [--qemu-opts ...]
                  [--force-initramfs] [--dry-run] [--show-command] [--pwd]
                  [--rwdir RWDIR] [--rodir RODIR]
➜ tmp>/tmp/virtme/bin/virtme-run --kdir=~/vcs/linux
Traceback (most recent call last):
  File "/tmp/virtme/bin/virtme-run", line 11, in <module>
    sys.exit(main())
  File "/tmp/virtme/lib/python3.6/site-packages/virtme/commands/run.py", line 205, in main
    raise ValueError("couldn't find guest tools -- virtme is installed incorrectly")
ValueError: couldn't find guest tools -- virtme is installed incorrectly
➜ tmp>

I expected these to work. I'd appreciate if the readme had some more information regarding installation and usage.

I sort of works when I modify the path in virtme/guest_tools.py and copy virtme/guest to /tmp/virtme-guest0 or something.

Of course, I'd much rather like to see the pip installation just work™.

gagallo7 commented 6 years ago

Hi @muelli.

I've had the same problem as you described. Running the scripts from the cloned repository works like a charm.

So I modified the setup.py instructions to copy the missing files to the installed directory.

Could you try to install and run this fork from virtme? If that works, I'll make a Pull Request to this repository.

Thanks in advance.

mellowcandle commented 6 years ago

It wasn't working for me either, with or without virtualenv. I launched virtme-run directly from the path of the repo and it worked just fine.

muelli commented 6 years ago

Could you try to install and run this fork from virtme?

yeah, that seems to work :) Nice. That is, /path/to/venv/pip install 'git+http://github.com/gagallo7/virtme#egg=virtme'

My kernel doesn't boot, but that's probably another story.

marcosps commented 5 years ago

@muelli can this bug be closed?

muelli commented 5 years ago

Let's assume this is good enough. Thanks.