Attaching Disks to VMs
- To attach disk to windows, disk should have the filesystem windows understands (NTFS)
- If the disk is empty:
- format the disk with the right file system
-
If the disk has data in it:
- find out the file system and attach to the windows/linux machine
-
Windows VM:
- Create a Windows VM
- Attach an extra disk
-
Linux VM:
- File Systems: ext4, xfs
- In linux we mount disks on to directories
- Lets create a new linux vm
- To view the disks attached to linux
lsblk
- To view the mounts the command is
df -h
- Lets attach a new disk of size 4 GB
- lets format the disk and create xfs file system
- Now create tools folder and mount the new disk on to tools folder
-
Exercise:
- After mounting shutdown and start the machines login to check if the disks are still attached.
- Shutdown the vm, Resize the disk. Start the vm and check if you see new size.
- Shutdown the vm Resize the disk to previous size, check if it allows or not