0

Is it the disk, which behaves as persistent and non persistent or the VM?

I have a VM on my vsphere with two disk drives ( C and D ), Both Drives are marked as THIN PROVISIONED. this machine is being used as a CI/CV node. C drive has the OS installed on it and D drive has jenkins and gitcode.

i want to make c drive as non persistent , so that the changes happening to this drive does not stick in my VM after i restart the machine. at the same time i want my D drive to be Persistent, so that the logs and other screenshots taken should remain in the D drive.

I made the c drive as non persistent and D drive as persistent disk in Vsphere VM edit option But when i use this machine now.. Both C drive as well as D drive behave as NON Persistent, Datafiles created during execution are getting deleted from D drive as well.

Drive D

Drive D

Drive C

Drive C

Gerald Schneider
  • 23,274
  • 8
  • 57
  • 89

1 Answers1

0

This is a slightly unusual use-case for this but yes it can be done.

Just set the underlying disk for your C: drive to be 'Independent Non-Persistent Mode' and the underlying disk for your D: drive to be Persistent and I think you'll get what you want. Good luck.

Chopper3
  • 101,299
  • 9
  • 108
  • 239
  • I have already done that, made C drive as independent -non persistent and D drive as independent - persistent, but still the files which were added to D drive(persistent drive), are getting deleted from D drive after switching VM OFF and ON. C drive is behaving as expected. – ravi kumar Aug 02 '22 at 11:18
  • ah! are they on separate disk controllers?! If I recall correctly they have to be, sorry should have mentioned that before. – Chopper3 Aug 02 '22 at 14:35
  • MY VMs have (LSI Logic SAS) controller. There was only one controller earlier - "SCSI controller 0". I added one more controller: "SCSI controller 1" based on your comment. now my two drives are on different controllers....... i am still facing the same issue. D drive is still behaving as non-persistent. Data is getting deleted from there. – ravi kumar Aug 03 '22 at 04:37
  • That's odd, I know you need separate controllers but that should have fixed it, sorry – Chopper3 Aug 03 '22 at 08:33
  • its working now. Strangely on the first go it failed...but now when i retried, its working properly. Thanks alot for your help :) – ravi kumar Aug 03 '22 at 09:50
  • Oh more than happy to help - normally I'd have said it was the result of a reboot but you must have shut down the VM to add the second controller and disk - so it can't be that - just glad you're sorted anyway. – Chopper3 Aug 03 '22 at 09:54