[PVE-User] disk replacement procedure when using device passthrough ?

devzero at web.de devzero at web.de
Tue Mar 12 19:32:41 CET 2019


hello,

what is the correct procedure for disk replacement when using raw-disk passthrough into a VM ?

if i remove a disk to simulate failure, both host and VM correctly see it fail. fine.

when i plug it back, disk comes back online with a new disk-name "sdX" and kvm VM does not open
that by itself - sure, most likely expected behaviour.

but i don't find a way to tell kvm VM to "hot unplug" or forget about the old, removed disk.

unfortunately, there is only "qm set <id> -scsiX .....", but no unset or "hot unplug" command for
disk which had been added.

i have come a little bit closer to re-add that by adding the disk as a NEW scsi disk "scsi7",
but how do i tell kvm it should stop using the former device/path ?

i searched into kvm documentation, but i don't find a proper example on how to do this...

i want to avoid downtime/maintenance window in case of a disk failure...

regards
Roland




root at pve1:/etc/pve/qemu-server# cat 100.conf
bootdisk: scsi0
cores: 8
ide2: local:iso/CentOS-7-x86_64-DVD-1804.iso,media=cdrom
memory: 2048
name: backupvm3
net0: virtio=DA:C3:4F:AD:92:93,bridge=vmbr0
numa: 1
ostype: l26
scsi0: local-zfs:vm-100-disk-0,size=15G
scsi1: /dev/disk/by-id/ata-WDC_WD60EFRX-68MYMN1_WD-WX11D4430551,size=5860522584K
scsi2: /dev/disk/by-id/ata-WDC_WD60EFRX-68MYMN1_WD-WX11D4435339,size=5860522584K
scsi3: /dev/disk/by-id/ata-WDC_WD60EFRX-68MYMN1_WD-WX51D6416058,size=5860522584K
scsi4: /dev/disk/by-id/ata-WDC_WD60EFRX-68MYMN1_WD-WX51H3417654,size=5860522584K
scsi5: /dev/disk/by-id/ata-WDC_WD60EFRX-68MYMN1_WD-WX51H3425161,size=5860522584K
scsi6: /dev/disk/by-id/ata-WDC_WD60EFRX-68MYMN1_WD-WX51H3425422,size=5860522584K
scsihw: virtio-scsi-single
smbios1: uuid=80125eec-ee8f-404c-9b56-3db5f2da2735
sockets: 1
vmgenid: eebcc297-2286-4174-9f1d-e7d92e9c01aa



More information about the pve-user mailing list