cockpit-project / cockpit-machines

Cockpit UI for virtual machines
GNU Lesser General Public License v2.1
266 stars 68 forks source link

Attach block device as a disk #854

Open skobyda opened 1 year ago

skobyda commented 1 year ago

Discussed in https://github.com/cockpit-project/cockpit-machines/discussions/746

Originally posted by **pgmillon** June 28, 2022 Hi, this is probably a dumb question since I'm not too familiar with qemu/cockpit: is it possible to attach a SATA device to a VM ? I already successfully attached a USD drive via the Host devices panel but I'm looking to attach /dev/sda & /dev/sdc and I'm not sure how to do that using cockpit-machines. ``` $ sudo lsscsi [0:0:0:0] disk ATA ST1000DM010-2EP1 CC46 /dev/sda [1:0:0:0] disk ATA INTEL SSDSC2BW12 DC32 /dev/sdb [2:0:0:0] disk ATA ST1000DM010-2EP1 CC46 /dev/sdc ```
skobyda commented 1 year ago

Libvirt offers possibility to attach block device directly as a disk (see docs) We can expose this in the UI

garrett commented 1 year ago

Oh, I assumed we had this already. We definitely should support block devices.

Now the questions are:

If we do show just block devices:

marcolam commented 1 year ago

Truenas vm also create zfs zvol for vm disk (a block device),currently cockpit recognite the zvol but can't attach disk corretly.