This message was deleted.
# harvester
a
This message was deleted.
s
And the "Eject CDROM" dialogue, which I assume I now need to use to migrate the VM, has a confusing "Select the volume you want to delete" option - I don't want to delete anything!
Disk cd is CD-ROM, needs to be ejected before migration
This seems to be bad. I cannot migrate any VM I installed from a CDROM, which is most VMs.
a
@sticky-summer-13450 Could you post a XML of your
harvester002
VM.
If the VM contains CD type of volume, you need to eject/remove it before migration.
s
Do you mean yaml?
a
yes
s
Copy code
apiVersion: <http://kubevirt.io/v1|kubevirt.io/v1>
kind: VirtualMachine
metadata:
  annotations:
    <http://harvesterhci.io/timestamp|harvesterhci.io/timestamp>: '2023-05-09T08:38:57Z'
    <http://harvesterhci.io/vmRunStrategy|harvesterhci.io/vmRunStrategy>: Always
    <http://harvesterhci.io/volumeClaimTemplates|harvesterhci.io/volumeClaimTemplates>: >-
      [{"metadata":{"name":"win10-ex-vmware-ex-harvester-rootdisk-zj26u","annotations":{"<http://harvesterhci.io/imageId|harvesterhci.io/imageId>":"default/image-52g7v"}},"spec":{"accessModes":["ReadWriteMany"],"resources":{"requests":{"storage":"32Gi"}},"volumeMode":"Block","storageClassName":"longhorn-image-52g7v"}},{"metadata":{"name":"win10-ex-vmware-ex-harvester-cd-bvucd","annotations":{"<http://harvesterhci.io/imageId|harvesterhci.io/imageId>":"default/image-5t44h"}},"spec":{"accessModes":["ReadWriteMany"],"resources":{"requests":{"storage":"10Gi"}},"volumeMode":"Block","storageClassName":"longhorn-image-5t44h"}}]
    <http://kubevirt.io/latest-observed-api-version|kubevirt.io/latest-observed-api-version>: v1
    <http://kubevirt.io/storage-observed-api-version|kubevirt.io/storage-observed-api-version>: v1alpha3
    <http://network.harvesterhci.io/ips|network.harvesterhci.io/ips>: '[]'
  creationTimestamp: '2022-02-09T17:11:13Z'
  finalizers:
    - <http://wrangler.cattle.io/VMController.UnsetOwnerOfPVCs|wrangler.cattle.io/VMController.UnsetOwnerOfPVCs>
    - <http://harvesterhci.io/VMController.UnsetOwnerOfPVCs|harvesterhci.io/VMController.UnsetOwnerOfPVCs>
  generation: 15
  labels:
    <http://harvesterhci.io/creator|harvesterhci.io/creator>: harvester
    <http://harvesterhci.io/os|harvesterhci.io/os>: linux
  managedFields:
    - apiVersion: <http://kubevirt.io/v1alpha3|kubevirt.io/v1alpha3>
      fieldsType: FieldsV1
      fieldsV1:
        f:metadata:
          f:annotations:
            f:<http://kubevirt.io/latest-observed-api-version|kubevirt.io/latest-observed-api-version>: {}
            f:<http://kubevirt.io/storage-observed-api-version|kubevirt.io/storage-observed-api-version>: {}
        f:spec:
          f:running: {}
        f:status: {}
      manager: Go-http-client
      operation: Update
      time: '2022-05-29T13:36:12Z'
    - apiVersion: <http://kubevirt.io/v1|kubevirt.io/v1>
      fieldsType: FieldsV1
      fieldsV1:
        f:metadata:
          f:annotations:
            .: {}
            f:<http://harvesterhci.io/timestamp|harvesterhci.io/timestamp>: {}
            f:<http://harvesterhci.io/vmRunStrategy|harvesterhci.io/vmRunStrategy>: {}
            f:<http://harvesterhci.io/volumeClaimTemplates|harvesterhci.io/volumeClaimTemplates>: {}
            f:<http://network.harvesterhci.io/ips|network.harvesterhci.io/ips>: {}
          f:finalizers:
            .: {}
            v:"<http://harvesterhci.io/VMController.UnsetOwnerOfPVCs|harvesterhci.io/VMController.UnsetOwnerOfPVCs>": {}
            v:"<http://wrangler.cattle.io/VMController.UnsetOwnerOfPVCs|wrangler.cattle.io/VMController.UnsetOwnerOfPVCs>": {}
          f:labels:
            .: {}
            f:<http://harvesterhci.io/creator|harvesterhci.io/creator>: {}
            f:<http://harvesterhci.io/os|harvesterhci.io/os>: {}
        f:spec:
          .: {}
          f:template:
            .: {}
            f:metadata:
              .: {}
              f:annotations: {}
              f:creationTimestamp: {}
              f:labels: {}
            f:spec:
              .: {}
              f:domain:
                .: {}
                f:cpu:
                  .: {}
                  f:cores: {}
                f:devices:
                  .: {}
                  f:disks: {}
                  f:interfaces: {}
                f:machine: {}
                f:resources:
                  .: {}
                  f:limits:
                    .: {}
                    f:cpu: {}
                    f:memory: {}
              f:evictionStrategy: {}
              f:hostname: {}
              f:networks: {}
              f:volumes: {}
      manager: harvester
      operation: Update
      time: '2023-05-09T07:50:22Z'
    - apiVersion: <http://kubevirt.io/v1alpha3|kubevirt.io/v1alpha3>
      fieldsType: FieldsV1
      fieldsV1:
        f:status:
          f:conditions: {}
          f:created: {}
          f:printableStatus: {}
          f:ready: {}
          f:volumeSnapshotStatuses: {}
      manager: Go-http-client
      operation: Update
      subresource: status
      time: '2023-05-09T08:38:57Z'
  name: win10-ex-vmware-ex-harvester
  namespace: default
  resourceVersion: '695451293'
  uid: 7669b3fa-cefe-47b5-9ee4-ad9d69e94f73
spec:
  running: true
  template:
    metadata:
      annotations:
        <http://harvesterhci.io/sshNames|harvesterhci.io/sshNames>: '[]'
      creationTimestamp: null
      labels:
        <http://harvesterhci.io/vmName|harvesterhci.io/vmName>: win10-ex-vmware-ex-harvester
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
              - matchExpressions:
                  - key: <http://network.harvesterhci.io/mgmt|network.harvesterhci.io/mgmt>
                    operator: In
                    values:
                      - 'true'
      domain:
        cpu:
          cores: 2
        devices:
          disks:
            - bootOrder: 1
              disk:
                bus: virtio
              name: rootdisk
            - bootOrder: 2
              cdrom:
                bus: sata
              name: cd
            - disk:
                bus: virtio
              name: cloudinitdisk
          interfaces:
            - bridge: {}
              macAddress: 8a:b7:bd:49:36:c8
              model: virtio
              name: default
        machine:
          type: q35
        memory:
          guest: 3996Mi
        resources:
          limits:
            cpu: '2'
            memory: 4Gi
          requests:
            cpu: 125m
            memory: 2730Mi
      evictionStrategy: LiveMigrate
      hostname: win10-ex-vmware-ex-harvester
      networks:
        - multus:
            networkName: default/vlan640
          name: default
      volumes:
        - name: rootdisk
          persistentVolumeClaim:
            claimName: win10-ex-vmware-ex-harvester-rootdisk-zj26u
        - name: cd
          persistentVolumeClaim:
            claimName: win10-ex-vmware-ex-harvester-cd-bvucd
        - cloudInitNoCloud:
            networkDataSecretRef:
              name: win10-ex-vmware-ex-harvester-p0j0c
            secretRef:
              name: win10-ex-vmware-ex-harvester-p0j0c
          name: cloudinitdisk
status:
  conditions:
    - lastProbeTime: null
      lastTransitionTime: '2023-05-09T08:38:56Z'
      status: 'True'
      type: Ready
    - lastProbeTime: null
      lastTransitionTime: null
      status: 'True'
      type: LiveMigratable
    - lastProbeTime: '2023-04-12T16:37:40Z'
      lastTransitionTime: null
      status: 'True'
      type: AgentConnected
  created: true
  printableStatus: Running
  ready: true
  volumeSnapshotStatuses:
    - enabled: false
      name: rootdisk
      reason: 2 matching VolumeSnapshotClasses for longhorn-image-52g7v
    - enabled: false
      name: cd
      reason: 2 matching VolumeSnapshotClasses for longhorn-image-5t44h
    - enabled: false
      name: cloudinitdisk
      reason: Snapshot is not supported for this volumeSource type [cloudinitdisk]
a
The
CD-ROM
type
cd
, is an volume attached to this VM
when you want to migrate the VM, just eject/remove this volume in advance
Copy code
- bootOrder: 2
              cdrom:
                bus: sata
              name: cd
s
Is restriction new for v1.1.2? It's never been a problem before.
a
yes, newly added in v112
s
Understood - thanks.
What about the "Eject CDROM" saying "Delete" ?
a
the read only type CD normally used only in installation stage.
In
Harvester/kubevirt/k8s
context, the
eject cd
means remove the related volume from VM.
when CD is really needed, we can add it (via volume) back anytime
s
Delete quite scary wording
a
we can improve it πŸ™‚
s
Yeh - but I've never needed to eject the initial CDROM before, so most of my VMs still have it. Restarting a VM to just eject a CDROM is going to be a pain, but 🀷, I guess that's where we are.
Thanks for your quick responses.
a
A VM with a read-only (or mostly not used) CD to migrate else where, is kind of resource wasting, to write/mount the CD to the destination.
When I install a VM via CD type ISO in virt-manager, the virt-manager will eject the CD automatically after VM is installed.
s
Sounds like a similar option is needed in the Harvester "Virtual Machine β†’ Create" user interface πŸ˜‰
a
could be an enhancement
πŸ‘ 1
thanks to report with us @sticky-summer-13450
s
you're welcome πŸ™‚
a
s
Thanks πŸ˜€