Closed makspiechota closed 4 years ago
Hi @makspiechota,
When you say:
I run multipass downloaded by PPA
Do you mean you're running the Multipass Snap or is there some PPA somewhere that we don't know about?
Regarding running a "from build" version of Multipass, I have better luck running multipassd
in a complete root
environment like the following:
$ su -
Password:
$ /path/to/multipass/build/multipassd &
That said, the issue is that dnsmasq
is not happy for some reason. To help figure out why, you'll need to look in journalctl
right after this happens and look for dnsmasq
entries.
And the libvirt
issue is because libvirt
is quite pedantic when the default image location is changed like what we do in Multipass. You can get around this by modifying /etc/libvirt/qemu.conf' and uncommenting the
user = "root"line (or the
group = "root") and then restart
libvirtd`.
I hope this helps!
Thanks for your reply! I've started with libvirt for now and uncommented mentioned line. multipass daemon started without complaining, but when I do
multipass launch
I get
Configuring deep-spoonbill \libvirt: QEMU Driver error : Domain not found: no domain with matching name 'deep-spoonbill'
Starting deep-spoonbill -libvirt: QEMU Driver error : internal error: qemu unexpectedly closed the monitor: 2019-09-24T19:13:11.454677Z qemu-system-x86_64: error: failed to set MSR 0x38d to 0x0
qemu-system-x86_64: /build/qemu-iYRv0n/qemu-2.11+dfsg/target/i386/kvm.c:1906: kvm_put_msrs: Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed.
launch failed: internal error: qemu unexpectedly closed the monitor: 2019-09-24T19:13:11.454677Z qemu-system-x86_64: error: failed to set MSR 0x38d to 0x0
qemu-system-x86_64: /build/qemu-iYRv0n/qemu-2.11+dfsg/target/i386/kvm.c:1906: kvm_put_msrs: Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed.
Hi @makspiechota,
Doing a search of qemu-system-x86_64: error: failed to set MSR 0x38d to 0x0
, it appears VMWare is not properly set up for nested virtualization. I suggest digging more into if/how to get your VMWare install to support that properly.
Also, I'm curious as to why you are not running Multipass natively on your MacOS machine :grin:
I would like to build multipass and contribute, but I can't manage to build it on OSX?
If VMWare cant support it properly why multipass downloaded (yes, you're right - its Multipass Snap) works well?
@makspiechota,
Oh, I see, that's totally cool!
Regarding why the snap works vs. libvirt
, by default, the snap uses what we call the qemu
driver in which multipass itself is responsible for starting and managing the qemu
process. We use many less options than what libvirt
uses when it starts qemu
and it seems an option libvirt
uses is incompatible with VMWare.
When you build and run multipass, are you disabling the snap? If not, the dnsmasq
the snap runs will conflict with the version of dnsmasq
the built version tries to start. Be sure to snap disable multipass
before running the built version. If you have already done that, then I think we need to figure out why dnsmasq
is not working on the built version.
Hm, running snap multipass with local.driver=qemu seems to work. I've disabled snap now and tried to run built multipass (as root as you suggested):
./multipass set local.driver=qemu
./multipassd &
multipass launch
And i get again:
launch failed: The following errors occurred:
qemu-system-x86_64: error: failed to set MSR 0x38d to 0x0
qemu-system-x86_64: /build/qemu-iYRv0n/qemu-2.11+dfsg/target/i386/kvm.c:1906: kvm_put_msrs: Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed.
I think I should start with fresh environment and then disable snap. Playing with libvirt, because of non disabled snap, could mess something.
Ok, sounds like a plan. Let me know if you are successful or if you still have issues.
Thanks for your patience!
Thank you, for your help. I've set fresh environment. Snap multipass works totally well, and built one (as a root, after disabling snap) gives me following error: launch failed: Cannot read image format: qemu-img failed (execve: No such file or directory) with output
EDIT: Seems from the code that image path (that I assume was just created) passed to qemu does not exists?
Hi @makspiechota,
Sounds like you're making progress :grin: So the problem here is that you're missing the qemu-img
runtime dependency. We're pretty bad about not documenting the runtime dependencies for developers :frowning_face: We need to fix that.
At any rate, you need to install qemu-img
in your environment via apt install qemu-utils
. If you do already have that installed, then we need to dig further why multipassd
can't find qemu-img
in the PATH
.
I have installed it and now I'm getting:
launch failed: failed to start qemu instance: execve: No such file or directory
However I'm able to run
qemu-img --help
from terminal
Ugh, another missing runtime dependency.
Try apt install qemu-system-x86
.
It would be useful to have dependencies documented. Maybe this my fresh environment is a good case study for it :grin:
Maybe there should be some configure
script with it?
However installing it lead me to this point again:
launch failed: The following errors occurred:
qemu-system-x86_64: error: failed to set MSR 0x38d to 0x0
qemu-system-x86_64: /build/qemu-iYRv0n/qemu-2.11+dfsg/target/i386/kvm.c:1906: kvm_put_msrs: Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed.
So again we have the question why snap version works and built one not?
Yes, we're going to have to at least document it in a HACKING.md or something.
Regarding the error, I'm afraid I'm at my limit on how to help. I don't have a VMWare Fusion 8 on OSX environment to help debug this and it is really unclear to me why the snap works, but the built version doesn't. I really wish I could help more and I'm sorry I can't.
I understand. Is it possible then to build multipass on other platform? I've failed on OSX and Ubuntu 16.04 and for now these are the only native options for me.
Good news! After quick research (I became inspired with your second post, now, little bit too late, I could have do it faster) I've found that enabling counters in VMWare helps. And indeed it works now!
You had issues building on a Ubuntu 16.04 machine? What were the issues? Also, I assume this is 16.04 installed directly on the machine itself and not in a hypervisor, correct?
If it is a 16.04 bare metal machine, then I think there are few options we can do to get you going. If you need a 18.04 VM so Multipass will build and run, you could use virt-manager
to create a 18.04 VM and then do work in that VM. KVM supports nested virtualization quite well, so inside that VM you should be able to run and build Multipass.
Another option would be just do your work on your 16.04 and then build the snap via snapcraft and test it out that way.
Lastly, if you're comfortable using IRC, we have a #multipass channel on freenode where you can drop in and chat with us. I'm in the eastern US and a couple of other Multipass folks are in Europe and we could help you in a more "realtime" way :grin:
Oh, I just saw your post after I posted my last response. That's great \o/
The invitation stands to join us on IRC if you'd like to chat.
I'm going to close this issue now, but we'll use #612 to track that we need to be better about the runtime dependencies.
I had some major issues with Qt compatibility. Ubuntu 16 has Qt v5.5.1 and 18 has v5.9.5. I don't know if it is the reason, however the qt headers couldn't be built.
I haven't actually thought that other hypervisor could resolve my issues. Good point.
I've tried to ask my questions on IRC first, but I couldn't get any response there :grin:
Oh, right the Qt version, yeah, that will cause problems. We should probably see if there is some way to have CMake gate on the Qt version.
Alright! However many thanks for your help! I think I could start with some first easy issue :)
I've tried to ask my questions on IRC first, but I couldn't get any response there
Sorry about that. I'm not sure when you asked, but we were all in Paris last week at an engineering sprint, so our communication would definitely be lacking then. But don't hesitate to come back again and try :grinning:
And good luck on your contribution(s)! Just let us know in the issue that you are going to work on it so we don't accidentally duplicate any work.
Good news! After quick research (I became inspired with your second post, now, little bit too late, I could have do it faster) I've found that enabling counters in VMWare helps. And indeed it works now!
Thanks a lot, I spent a long time trying to debug this and missed this comment the first time I looked in this thread - all working now!
Environment: VM Ubuntu 18.04 LTS virtualized by VMWare Fusion 8 on OSX with option "Enable hypervisor applications in this virtual machine"
multipass --version
multipass launch
multipass list
./multipass --version
sudo ./multipassd &
sudo ./multipass launch
launch failed: Multipass dnsmasq failed to start: Process operation timed out
Configuring assisting-akita \libvirt: QEMU Driver error : Domain not found: no domain with matching name 'assisting-akita' Starting assisting-akita -libvirt: Storage Driver error : Cannot access storage file '/home/maks-piechota/.local/share/multipassd/vault/instances/assisting-akita/ubuntu-18.04-server-cloudimg-amd64.img' (as uid:64055, gid:127): Permission denied launch failed: Cannot access storage file '/home/maks-piechota/.local/share/multipassd/vault/instances/assisting-akita/ubuntu-18.04-server-cloudimg-amd64.img' (as uid:64055, gid:127): Permission denied