Closed ghqter30 closed 3 months ago
Are you able to try on 5.0/edge channel (you will need a fresh install as can't downgrade from latest/stable).
This channel comes with same qemu version but previous edk firmware version (as we've seen a fair few problems with more recent edk firmware versions).
5.0/edge channel works just fine:
sudo snap list lxd
lxd git-7f8a581 25932 5.0/edge canonical✓
sudo lxc list
+------+---------+------------------------+-------------------------------------------------+-----------------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+------+---------+------------------------+-------------------------------------------------+-----------------+-----------+
| c2 | RUNNING | 10.33.200.84 (eth0) | fd42:e225:ffb0:2967:216:3eff:fe13:5045 (eth0) | CONTAINER | 0 |
+------+---------+------------------------+-------------------------------------------------+-----------------+-----------+
| vm2 | RUNNING | 10.33.200.116 (enp5s0) | fd42:e225:ffb0:2967:216:3eff:fe94:e2ea (enp5s0) | VIRTUAL-MACHINE | 0 |
+------+---------+------------------------+-------------------------------------------------+-----------------+-----------
sudo lxc exec vm2 -- uptime
22:33:07 up 3 min, 0 users, load average: 0.07, 0.17, 0.08
Hi @ghqter30
Can you try to run the VM on latest/edge
with lxc launch ubuntu:22.04 --vm --console=vga vm1
and try to catch on which step it fails? Can you see any messaged from GRUB? Or maybe from the Linux kernel.
We have seen and workarounded two issues with edk2: https://github.com/canonical/lxd-pkg-snap/pull/147 https://github.com/canonical/lxd-pkg-snap/pull/153
Unfortunately, edk2 developers do not care about maintaining compatibility with old versions of GRUB/shim/Linux kernel and as a consequence we have problems like that.
Another experiment that you can make is to try lxc launch ubuntu:22.04 -c security.secureboot=false --vm --console=vga vm1
and check results.
Kind regards, Alex
thanks @mihalicyn !
I get this:
sudo snap list lxd
lxd git-7d7624d 25952 latest/edge canonical✓
sudo lxc launch ubuntu:22.04 -c security.secureboot=false --vm --console=vga vm1
Creating vm1
Starting vm1
(remote-viewer:7732): Gtk-WARNING **: 08:42:00.885: cannot open display:
sudo lxc list vm1
+------+---------+------+---------------------------------------------+-----------------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+------+---------+------+---------------------------------------------+-----------------+-----------+
| vm1 | RUNNING | | fd42:6c59:447:38fb:216:3eff:fe3b:c49 (eth0) | VIRTUAL-MACHINE | 0 |
+------+---------+------+---------------------------------------------+-----------------+-----------+
Ah, you are likely running this on the server without desktop environment? Then just use --console
without vga
.
Console output doesn't show much:
sudo lxc launch ubuntu:22.04 -c security.secureboot=false --vm --console vm2
Creating vm2
Starting vm2
To detach from the console, press: <ctrl>+a q
Graphic and Text Console show the same empty results:
Any suggestions?
Hi @ghqter30
Sorry about this huge delay with reply. This thread got lost. (Feel free to ping us next time!)
The first thing that I would start with is to try latest/edge
channel again.
Results that you've shared with us a bit interesting: nothing in the console output, nothing on the screen and VM just stuck, right? Couldn't you also show:
# replace "vm1" to your VM instance name
cat /proc/$(cat /var/snap/lxd/common/lxd/logs/vm1/qemu.pid)/stack
Closing this for now, but please let us know if you are still experiencing the issue and can reproduce on latest/edge channel.
Thanks!
Issue description
LXD deployed on SBC / Rockchip RK3588, Virtual Machines don't get an IPV4 and return "Error: LXD VM agent isn't currently running" when attempted to run exec command. CPU process is constantly maxed out. Best known/tested version where this behavior is not present is version 5.13 --revision=24850
Required information
sudo lxc info
Steps to reproduce
Step one
sudo snap install lxd --channel latest/edge # git-a733f9b 2023-10-06 (25934)
sudo lxd init
Step two
sudo lxc launch ubuntu:22.04 --vm vm1
Step three
sudo lxc list
sudo lxc exec vm1 bash
sudo lxc stop vm1 --force
sudo lxc start vm1 --console
Information to attach
sudo lxc info vm1 --show-log
sudo lxc config show vm1 --expanded
sudo cat /var/snap/lxd/common/lxd/logs/lxd.log