Skip to content

How to passthrough a disk (and not a partition) #1119

@linktohack

Description

@linktohack

Operating system

Fedora 42

Description

Hello,

I have ask the question in this comment but it seems to not have your attention.

#958 (comment)

Basically, how to pass /dev/sdb and not /dev/sdb1 for example.

Thank you

Docker compose

I'm running with k3s/containerd instead docker

#958 (comment)

# Source: stack/templates/stack.yml
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: dsm
spec:
  selector:
    matchLabels:
      service: dsm
  serviceName: dsm
  template:
    metadata:
      labels:
        service: dsm
    spec:
      containers:
      - env:
        - name: CPU_CORES
          value: "4"
        - name: DISK_SIZE
          value: 6G
        - name: RAM_SIZE
          value: 4G
        image: vdsm/virtual-dsm:7.33
        name: dsm
        securityContext:
          capabilities:
            add:
            - NET_ADMIN
          privileged: true
        volumeMounts:
        - mountPath: /dev/kvm
          name: volume-0
        - mountPath: /dev/dri
          name: volume-1
        - mountPath: /storage
          name: volume-2
        - mountPath: /disk1
          name: volume-3
      terminationGracePeriodSeconds: 120
      volumes:
      - hostPath:
          path: /dev/kvm
        name: volume-0
      - hostPath:
          path: /dev/dri
        name: volume-1
      - hostPath:
          path: /var/dsm
        name: volume-2
      - hostPath:
          path: /dev/sdb
        name: volume-3

Docker log

The disk cannot be found, but if I rollback to `7.33` it works again, nothing wiped

Screenshots (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions