clipos / bugs

CLIP OS issue tracker
https://clip-os.org
28 stars 1 forks source link

Starting the qemu image fails on Ubuntu 18.04 #24

Open ghost opened 5 years ago

ghost commented 5 years ago

Hi Clip-OS Team,

first of thanks for open-sourcing this interesting project. Its time qubes gets a reasonable alternative that does more than "it all runs in xen".

I've setup my dev laptop with Ubuntu 18.04 and followed the instructions. Most everything runs fine. The first major problem I encountered was 18.04 shipping libvirt version 4.0, while 4.5 or above is required. I then found this ppa: https://launchpad.net/~jacob/+archive/ubuntu/virtualisation, which ships 4.7, so I installed it. After some more debugging I am now stuck with:

$ sujust qemu
[...]
libvirt: error: internal error: Could not start 'swtpm'. exitstatus: 1, error:
  [x] Uncaught unknown exception libvirtError:
       internal error: Could not start 'swtpm'. exitstatus: 1, error:
error: Recipe `run` failed on line 26 with exit code 1
error: Recipe `qemu` failed on line 36 with exit code 1
error: Recipe `qemu` failed on line 24 with exit code 1

I'm not really sure how to debug this / where to find a relevant logfile. The error message doesn't give me the hint I was looking for.

I have to admit I was "debugging" for a while and may have "shot" my dev system in the process.. I could try a reinstall and start from scratch.

What distro do you guys use for development / on which system did you try things to write the doc?

Btw starting sujust qemu works without the PPA, but the image wont boot correctly complaining that libvirt is to old and that it does not support swtpm below 4.5 (if I remember correctly).

Expected Behavior

Qemu image should start without errors.

Actual Behavior

sujust qemu fails with error above.

Steps to Reproduce the Problem

  1. Setup fresh 18.04
  2. Install the ppa for libvirt 4.7
  3. Follow steps in the doc

Specifications

tsautereau-anssi commented 5 years ago

Hi Peter,

I've setup my dev laptop with Ubuntu 18.04 and followed the instructions. Most everything runs fine. The first major problem I encountered was 18.04 shipping libvirt version 4.0, while 4.5 or above is required. I then found this ppa: https://launchpad.net/~jacob/+archive/ubuntu/virtualisation, which ships 4.7, so I installed it.

Yes, this is a known issue and we are investigating ways to fix it.

After some more debugging I am now stuck with:

$ sujust qemu
[...]
libvirt: error: internal error: Could not start 'swtpm'. exitstatus: 1, error:
  [x] Uncaught unknown exception libvirtError:
       internal error: Could not start 'swtpm'. exitstatus: 1, error:
error: Recipe `run` failed on line 26 with exit code 1
error: Recipe `qemu` failed on line 36 with exit code 1
error: Recipe `qemu` failed on line 24 with exit code 1

I'm not really sure how to debug this / where to find a relevant logfile. The error message doesn't give me the hint I was looking for.

How did you install swtpm?

What distro do you guys use for development / on which system did you try things to write the doc?

Most of us use either Arch Linux or Debian but we also support other distros as indicated here.

ghost commented 5 years ago

How did you install swtpm?

git cloned it as stated in the doc of clip-os and followed the INSTALL file in the repo. Added some debugging here and there, you know, missing apt packages and what not, but overall it looked good. If thats a common issue maybe we should include the relevant commands in the core-os doc too.

Most of us use either Arch Linux or Debian but we also support other distros as indicated here.

Debian testing you mean right? I would prefer something Debian based, but that's a personal preference that is also not that important to me.

travier-anssi commented 5 years ago

Please see the answers in this thread to work around currently known issues. We are working on doc improvements.

ghost commented 5 years ago

Hi! I would like to share my experience with you, I also had trouble starting swtpm through libvirt. After some research it happened that the root of the issue was Apparmor preventing libvirtd from creating sockets for swtpm.

As a workaround, I added these two lines to /etc/apparmor.d/abstractions/libvirt-qemu :

/var/lib/libvirt/swtpm/** krw,
/var/log/swtpm/** rw,

But, since it bothered me a lot, I chose to remove completely Apparmor from my system.

I hope it helped!

travier-anssi commented 5 years ago

Thanks for the investigation and the workaround!