Skip to content

Commit 28c5dcf

Browse files
committed
Switch capturing of CDROMs
If images of Windows server are created the -all disks flag will lead to an error because CDROM can't be imaged. Added skip for mountType equals CD
1 parent 6ece889 commit 28c5dcf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

SoftLayer/managers/vs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ def capture(self, instance_id, name, additional_disks=False, notes=None):
583583
disk_filter = lambda x: x['device'] == '0'
584584
# Disk 1 is swap partition. Need to skip its capture.
585585
if additional_disks:
586-
disk_filter = lambda x: x['device'] != '1'
586+
disk_filter = lambda x: x['device'] != '1' and x['mountType'] != 'CD'
587587

588588
disks = [block_device for block_device in vsi['blockDevices']
589589
if disk_filter(block_device)]

0 commit comments

Comments
 (0)