Unable to select a usb drive in my windows vm

I just setup my windows vm. But i’m unable to view the usb device (thought it would just show up normally on the vm’s viewer). Under ‘File’ I see ‘usb device selection’ but the only available option are my camera, cdrom & bluetooth. Luckily under ‘Preferences’ I see 'folder sharing 'so I thought I could just copy the file to my host’s ‘Downloads’ and just get the file from there after selecting ‘share folder’ and selecting ‘Downloads’ but wasn’t quite straightforward on that option.

An assist would be much appreciated!

Did you share the usb device with the VM ? Please show lxc config show <instance> --expanded.

You can also do file sharing over RDP when using Windows VMs.

architecture: x86_64
config:
  limits.cpu: "2"
  limits.memory: 4GiB
  volatile.cloud-init.instance-id: d914aebe-969d-4fee-895c-9edf60076eaf
  volatile.eth0.hwaddr: 00:16:3e:ec:a3:39
  volatile.last_state.power: STOPPED
  volatile.uuid: a0bf87d9-cf2a-41f1-a840-3fa3a1a6bc2d
  volatile.vsock_id: "6"
devices:
  eth0:
    name: eth0
    network: lxdbr0
    type: nic
  install:
    boot.priority: "10"
    source: /home/jesse/Downloads/ISOs/win10.lxd.iso
    type: disk
  root:
    path: /
    pool: default
    size: 50GiB
    type: disk
  vtpm:
    type: tpm
ephemeral: false
profiles:
- default
stateful: false
description: ""

You’ve not passed in a USB device:

Being new to this, rather looks like a handful! :grinning:

Got it. Thanks

You could use file sharing via RDP instead, that may be easier.
Or mounting the USB drive on the host and sharing it as a filesystem using the disk device type.
See Instance configuration - LXD documentation

Okay. Thanks

Just wondering. Is it possible to save the state of a vm? I see when you leave it running it does something similar tho. Anything aside that?

You can do a stateful snapshot using “lxc snapshot --stateful”

Thanks for the info!

architecture: x86_64
config:
limits.cpu: “4”
limits.memory: 6GiB
migration.stateful: “true”
volatile.cloud-init.instance-id: 9cfc0c77-2a73-4b5d-8bf8-c3099b653c18
volatile.eth0.host_name: tapccb58b4f
volatile.eth0.hwaddr: 00:16:3e:b9:3f:76
volatile.last_state.power: RUNNING
volatile.last_state.ready: “false”
volatile.uuid: 96a6ebb1-d60a-450c-b928-bd9b23e33a73
volatile.vsock_id: “4”
devices:
eth0:
name: eth0
network: lxdbr0
type: nic
install:
boot.priority: “10”
source: /home/jesse/Downloads/ISOs/win11.lxd.iso
type: disk
root:
path: /
pool: default
size: 50GiB
size.state: 6GiB
type: disk
vtpm:
type: tpm
ephemeral: false
profiles:

  • default
    stateful: false
    description: “”