Running virtual machines with LXD 4.0

None of the commands that start with “lxc-*” have anything to do with LXD. They are the older lxc commands.

Instead you use the LXD CLI command “lxc” for anything to do with LXD.

To ask the instance to cleanly shutdown use lxc stop <instance> and to force a stop use lxc stop <instance> --force

To delete do lxc delete <instance>

Thank you.

When installing win from iso the virtual bios only allows a couple of seconds to “hit any key to boot from iso” and then it went straight to PXE where it hung.
lxc delete <name> --force
worked. I think I tried to stop it but I don’t think it worked. I’ll try again next time. Maybe the stop command didn’t work due to the vm being in bios pxe rather than the os. I’ll worry about that next time.

For this time, force delete was good enough for me since there was almost zero lost time.

1 Like

lxc stop --force is required if os isnt started

Create windows10 vm not have QM00001 drive to select

image

I am OK after install

sudo apt install libwin-hivex-perl
sudo apt install wimtools

in Ubuntu 22.04
Hope this can help.

1 Like

Hi,

Is it possible to run a Win 10 in LXD without KVM?

Thanks

LXD VMs of all types require KVM support.

Ok so, if I understand well,

I can run

KVM + Qemu to get Win 10/11 runing in a VM

And I can do it with

KVM + LXD + Qemu to get Win 10/11 the same result

Or can I do KVM + LXD only to get Win 10/11?

What is the interest to use it like that, sounds like it add one more layer

Convenience primarily. LXD handles setting up the storage, networking and configuring QEMU (which can be non-trivial). It also adds remote management through LXD’s REST API, and convenience features such as the lxd-agent which runs inside guest machines to allow quick access to the guest (this is Linux only currently).

Hello, i have lxd cluster and group

lxc cluster group ls
+---------+-----------------------+---------+
|  NAME   |      DESCRIPTION      | MEMBERS |
+---------+-----------------------+---------+
| group1  |                       | 1       |
+---------+-----------------------+---------+
| group2  |                       | 1       |

I run vm and go to inside lxc exec <vm_name> bash

How can I find out which lxd group a virtual machine is located in?
I want to have in vm a variable with group name