@stgraber I’ve got a fix for this here:
lxc/lxd-pkg-snap
LXD snap packaging. Contribute to lxc/lxd-pkg-snap development by creating an account on GitHub.
@stgraber I’ve got a fix for this here:
Anyone tried to run windows vm on ceph?
Windows10 LXD 4.0.3
I tried to run windows10 on ceph, and performance seems inadeqately slow, everything becomes slugish, even simple file manager operations like browsing folders, compared to local storage. I tried to google it and looks like I m not alone.
Maybe there is some configuration options to boost performance?
that indicates the LXD VMs utilizes KVM. What I do not quite get about the motivation/benefit of this new feature from browsing though this Topic is:
Thus has been answered before; a summary is that you get the same user-experience through LXD, whether you use VMs or system containers.
where? not in this Topic. Can you point me to it?
I meant to say earlier that I could not find the previous discussion.
But still, the gist is that you are providing a common user-interface to using both system containers and VMs (which share many end-user features). It is a common practice in the computer industry. I find it straightforward, but perhaps you have something else in mind?
LXD is now also a manager for virtual machines.
As @simos said it can be useful for users of LXD to also be able to use (mostly) the same commands for VMs and containers.
The deciding point in comparison to other tools are the features and details.
I don’t know what is planned to be done, but for now LXD is not feature complete regarding Virtual machines, so several additions will follow.
Sadly there is no complete feature list yet, but I guess there will be one in the future.
For now you can look at Instances - Documentation (look for VM
tag) and the release notes in the forum for (most) available features.
I don’t know what is planned to be done
that’s exactly why I was asking. To get an idea what the ambition is.
As you can see in [Overview] Features for Virtual Machines for example, many features that you usually want are already implemented.
So VMs are already very usable via LXD.
There will be additional features (especially to achieve feature parity with containers, I assume (as far as that is possible)) I am sure.
But I don’t really understand what you want.
The ambition is to have a good VM manager, which we have now.
If you have good ideas, propose them to the team via a Feature Request, either on Github or in the Forum (at best in a seperate post).
We are producing VM images daily for the following distributions:
- Arch Linux
- CentOS (7 and up)
- Debian (8 and up)
- Fedora
- Gentoo
- OpenSUSE
- Ubuntu
Does the Archlinux iso there have cloud-init? I have been unable to set a password in that.
If I wanted an ArchLinux VM how would I get cloud-init in there to set a password?
You can run
lxc image list images:cloud
to show you all images that have cloud
in their name. The cloud in this case is used as a relative search term, showing all images that support cloud-init
. ArchLinux is not in the list.
You can always check https://images.linuxcontainers.org
, only cloud
variants have cloud-init, if there is no such variant (only default
), then no cloud-init.
We usually try to have cloud-init images whenever official up to date packages for it are available in the distro, maybe things changed with Arch but the current state of things suggest it wasn’t last we checked.
We usually try to have cloud-init images whenever official up to date packages for it are available in the distro, maybe things changed with Arch but the current state of things suggest it wasn’t last we checked.
Ah that does make sense. It seems cloud-init for arch is actually on 20.2-1 and has been out of date since it was flagged on 2020-09-24. It would also appear Gentoo has the same problem cloud-init-21.1.
On a side note it’s nice to see cloud-init in Alpine Linux. Currently edge repo, so maybe next stable release 3.13 it will be in main repo.
* Is there any way to add a root account etc without I suppose the only way is to boot an archiso media, chroot to the environment and add a user.cloud-init
? I read somewhere default accounts are not shipped with any images.
* I also thought about creating my own image with cloud-init. If the package is slightly out of date is this likely to cause issues? I’ll try to work with upstream to get this up to date. It’s nice to have a rolling release distribution with cloud-init.
echo -n '-drive file=/home/USER/Downloads/Win10_1909_English_x64.iso,index=0,media=cdrom,if=ide -drive file=/home/USER/Downloads/virtio-win-0.1.173.iso,index=1,media=cdrom,if=ide' | lxc config set win10 raw.qemu -
- Start the VM:
lxc start win10 --console
- Repeatedly hit ESC in that console (even before any output) to enter the firmware menu.
I assume something like this can be used to boot an environment from a live-cd in order to add some users. For example the archlinux instance doesn’t have cloud-init
, so I expect manually adding users is a way?
Add boot ISO to boot device
sudo echo -n '-drive file=/os/archlinux/2020.11.01/archlinux-2020.11.01-x86_64.iso,index=0,media=cdrom,if=ide' | sudo lxc config set archvm raw.qemu -
I’ve already created a VM with:
lxc init images:archlinux/current/amd64 archvm --vm -c security.secureboot=false
The environment will automatically boot from the primary disk. It seems hitting ESC isn’t enough to bring up the boot menu. Did I need to change some of the boot options?
I did try hitting escape but that wasn’t helping.
For ArchLinux since it has a running agent, just use:
echo user:passwd | lxc exec NAME -- chpasswd
Or something similar. You have a root shell easily accessible with lxc exec NAME bash
so just use that
ESC works but the time window is very very narrow unless your distribution has a build of EDK2 with an increased timeout (as we do in the LXD snap).
Or something similar. You have a root shell easily accessible with
lxc exec NAME bash
so just use that
Ah yes, that probably wasn’t working because of the issue you answered in Lxd-agent: No such file or directory - #4 by stgraber
ESC works but the time window is very very narrow unless your distribution has a build of EDK2 with an increased timeout (as we do in the LXD snap).
Right. I don’t think they have a patch for that. Are you able to point me to the commit/patch that increases it?
LXD snap packaging. Contribute to lxc/lxd-pkg-snap development by creating an account on GitHub.
First patch is to make DHCPv6 netboot work properly, second is for the fancy LXD bootscreen, third is the boot delay increase.
Hi,
I posted the following regarding an error I am getting when trying to boot into Windows… can anyone help?
Hello I have been trying desperately to resolve the following error: [lxc_win10_error] I have followed the steps several times in this document: and the issue always happens. When I use the same Win10 ISO file in Virtual Box I do not receive this error. Here is the output from the ‘lxc info’ command" $ lxc info config: {} api_extensions: storage_zfs_remove_snapshots container_host_shutdown_timeout container_stop_priority container_syscall_filtering auth_pki container_last_used_at eta…
Appreciate any help!
Thanks,
Tony
Hi,
I’m trying to run lxd vm’s on my Arch Linux machine, but I get the same error (image doesn’t mater):
[mz@V7590 ~]$ lxc launch ubuntu:20.04 vm1 --vm --profile myprofile --profile vm
Creating vm1
Starting vm1
Error: Failed to run: forklimits limit=memlock:unlimited:unlimited – /usr/bin/qemu-system-x86_64 -S -name vm1 -uuid 8ccbcfe8-1392-4848-a5fe-75382a0e2fdb -daemonize -cpu host -nographic -serial chardev:console -nodefaults -no-reboot -no-user-config -sandbox on,obsolete=deny,elevateprivileges=allow,spawn=deny,resourcecontrol=deny -readconfig /var/log/lxd/vm1/qemu.conf -pidfile /var/log/lxd/vm1/qemu.pid -D /var/log/lxd/vm1/qemu.log -chroot /var/lib/lxd/virtual-machines/vm1 -smbios type=2,manufacturer=Canonical Ltd.,product=LXD -runas nobody: qemu-system-x86_64:/var/log/lxd/vm1/qemu.conf:27: There is no option group ‘spice’
qemu-system-x86_64: -readconfig /var/log/lxd/vm1/qemu.conf: read config /var/log/lxd/vm1/qemu.conf: Invalid argument
: Process exited with a non-zero value
Try lxc info --show-log local:vm1
for more info
[mz@V7590 ~]$ sudo cat /var/log/lxd/vm1/qemu.conf
[sudo] password for mz:
[machine]
graphics = “off”
type = “q35”
accel = “kvm”
usb = “off”
graphics = “off”
[global]
driver = “ICH9-LPC”
property = “disable_s3”
value = “1”
[global]
driver = “ICH9-LPC”
property = “disable_s4”
value = “1”
[boot-opts]
strict = “on”
[chardev “console”]
backend = “pty”
[spice] // Line number 27 //
unix = “on”
addr = “/var/log/lxd/vm1/qemu.spice”
disable-ticketing = “on”
…
[mz@V7590 ~]$ lxc info --show-log local:vm1
Name: vm1
Location: none
Remote: unix://
Architecture: x86_64
Created: 2021/01/04 20:22 UTC
Status: Stopped
Type: virtual-machine
Profiles: myprofile, vm
Error: open /var/log/lxd/vm1/qemu.log: no such file or directory
[mz@V7590 ~]$ lxd --version
4.9
[mz@V7590 ~]$ lxc --version
4.9
[mz@V7590 ~]$ pacman -Ss spice-gtk
community/spice-gtk 0.38-1 [installed]
GTK+ client library for SPICE
[mz@V7590 ~]$ which virt-viewer
/usr/bin/virt-viewer
[mz@V7590 ~]$ uname -r
5.4.86-1-lts
Launching vm’s with options --console=vga or --console=console, the result is exactly the same…
At this setup lxd containers are working fine…
Could you help me ?
Thx in advance…