• Categories
    Category
  • Categories
    Category
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial Comments FAQ Related Articles

How to add disk on a virtual machine in VMware

  • 01:42 sudo su
  • 01:59 lsblk
  • 03:07 lsblk
  • 03:22 fdisk -l
  • 05:28 for x in `ls /sys/class/scsi_host/` ; do echo "-----$x Scanned-----"; echo "- - -" > /sys/class/scsi_host/$x/scan ; done
  • 05:49 lsblk
7794

To Add The Disk On A Virtual Machine In VMware

Introduction:

VMware Workstation is a Desktop Hypervisor product line that lets users run virtual machines, containers, and Kubernetes clusters. Several commands allow you to reset and scan one or more interconnects, potentially adding and removing multiple devices in one operation. This type of scan can be disruptive, as it can cause delays while I/O operations timeout, and remove devices unexpectedly.

Procedure:

Step 1: First power on the virtual machine and open the terminal.

Step 2: Switch to the root user by using following command then enter the globalt user password

globalt@linuxhelp:~/Desktop$ sudo su
[sudo] password for globalt: 
root@linuxhelp:/home/globalt/Desktop#

Step 3: Before add the device list the block device by using the below command

root@linuxhelp:~# lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0    7:0    0     4K  1 loop /snap/bare/5
loop1    7:1    0  63.9M  1 loop /snap/core20/2182
loop2    7:2    0  73.9M  1 loop /snap/core22/864
loop3    7:3    0   497M  1 loop /snap/gnome-42-2204/141
loop4    7:4    0 400.8M  1 loop /snap/gnome-3-38-2004/112
loop5    7:5    0 163.3M  1 loop /snap/firefox/1635
loop6    7:6    0 349.7M  1 loop /snap/gnome-3-38-2004/143
loop7    7:7    0  63.5M  1 loop /snap/core20/2015
loop8    7:8    0  45.9M  1 loop /snap/snap-store/582
loop9    7:9    0  91.7M  1 loop /snap/gtk-common-themes/1535
loop10   7:10   0  40.9M  1 loop /snap/snapd/20290
loop11   7:11   0  40.4M  1 loop /snap/snapd/20671
loop12   7:12   0  12.3M  1 loop /snap/snap-store/959
loop13   7:13   0   452K  1 loop /snap/snapd-desktop-integration/83
loop14   7:14   0   284K  1 loop /snap/snapd-desktop-integration/14
loop15   7:15   0  74.2M  1 loop /snap/core22/1122
sda      8:0    0    40G  0 disk 
├─sda1   8:1    0     1M  0 part 
├─sda2   8:2    0   513M  0 part /boot/efi
└─sda3   8:3    0  39.5G  0 part /
sr0     11:0    1  1024M  0 rom  

Step 4: Now right click on the virtual machine and click settings as shown in the below image SNAP 1

Step 5: Click Add button as shown in the below image SNAP 2

Step 6: Select Hardware type as Hard Disk and click next as shown in the below image SNAP 3

Step 7: Select Virtual Disk type and click next as shown in the below image SNAP 4

Step 8: Select Disk and click next as shown in the below image SNAP 5

Step 9: Enter disk size and click next as shown in the below image SNAP 6

Step 10: Enter Disk file name and click finish button as shown in the below image SNAP 7

Step 11: Now click ok button to add the disk as shown in the below image SNAP 8

Step 12: After the disk added, now list the devices using lsblk by using the below command

root@linuxhelp:~# lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0    7:0    0     4K  1 loop /snap/bare/5
loop1    7:1    0  63.9M  1 loop /snap/core20/2182
loop2    7:2    0  73.9M  1 loop /snap/core22/864
loop3    7:3    0   497M  1 loop /snap/gnome-42-2204/141
loop4    7:4    0 400.8M  1 loop /snap/gnome-3-38-2004/112
loop5    7:5    0 163.3M  1 loop /snap/firefox/1635
loop6    7:6    0 349.7M  1 loop /snap/gnome-3-38-2004/143
loop7    7:7    0  63.5M  1 loop /snap/core20/2015
loop8    7:8    0  45.9M  1 loop /snap/snap-store/582
loop9    7:9    0  91.7M  1 loop /snap/gtk-common-themes/1535
loop10   7:10   0  40.9M  1 loop /snap/snapd/20290
loop11   7:11   0  40.4M  1 loop /snap/snapd/20671
loop12   7:12   0  12.3M  1 loop /snap/snap-store/959
loop13   7:13   0   452K  1 loop /snap/snapd-desktop-integration/83
loop14   7:14   0   284K  1 loop /snap/snapd-desktop-integration/14
loop15   7:15   0  74.2M  1 loop /snap/core22/1122
sda      8:0    0    40G  0 disk 
├─sda1   8:1    0     1M  0 part 
├─sda2   8:2    0   513M  0 part /boot/efi
└─sda3   8:3    0  39.5G  0 part /
sr0     11:0    1  1024M  0 rom

Step 13: Now list the partition table using fdisk

root@linuxhelp:~# fdisk -l
Disk /dev/sda: 40 GiB, 42949672960 bytes, 83886080 sectors
Disk model: VMware Virtual S
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: F747C239-799C-4F59-A541-2CADC6E836C5

Device       Start      End  Sectors  Size Type
/dev/sda1     2048     4095     2048    1M BIOS boot
/dev/sda2     4096  1054719  1050624  513M EFI System
/dev/sda3  1054720 83884031 82829312 39.5G Linux filesystem

Step 14: Below script to scan all your host. This script will scan each and every SCSI host.

root@linuxhelp:~# for x in `ls /sys/class/scsi_host/` ; do echo "-----$x Scanned-----"; echo "- - -" > /sys/class/scsi_host/$x/scan ; done
-----host0 Scanned-----
-----host1 Scanned-----
-----host10 Scanned-----
-----host11 Scanned-----
-----host12 Scanned-----
-----host13 Scanned-----
-----host14 Scanned-----
-----host15 Scanned-----
-----host16 Scanned-----
-----host17 Scanned-----
-----host18 Scanned-----
-----host19 Scanned-----
-----host2 Scanned-----
-----host20 Scanned-----
-----host21 Scanned-----
-----host22 Scanned-----
-----host23 Scanned-----
-----host24 Scanned-----
-----host25 Scanned-----
-----host26 Scanned-----
-----host27 Scanned-----
-----host28 Scanned-----
-----host29 Scanned-----
-----host3 Scanned-----
-----host30 Scanned-----
-----host31 Scanned-----
-----host32 Scanned-----
-----host4 Scanned-----
-----host5 Scanned-----
-----host6 Scanned-----
-----host7 Scanned-----
-----host8 Scanned-----
-----host9 Scanned-----

Step 15: Now use lsblk command again to see newly added disk.

root@linuxhelp:~# lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0    7:0    0     4K  1 loop /snap/bare/5
loop1    7:1    0  63.9M  1 loop /snap/core20/2182
loop2    7:2    0  73.9M  1 loop /snap/core22/864
loop3    7:3    0   497M  1 loop /snap/gnome-42-2204/141
loop4    7:4    0 400.8M  1 loop /snap/gnome-3-38-2004/112
loop5    7:5    0 163.3M  1 loop /snap/firefox/1635
loop6    7:6    0 349.7M  1 loop /snap/gnome-3-38-2004/143
loop7    7:7    0  63.5M  1 loop /snap/core20/2015
loop8    7:8    0  45.9M  1 loop /snap/snap-store/582
loop9    7:9    0  91.7M  1 loop /snap/gtk-common-themes/1535
loop10   7:10   0  40.9M  1 loop /snap/snapd/20290
loop11   7:11   0  40.4M  1 loop /snap/snapd/20671
loop12   7:12   0  12.3M  1 loop /snap/snap-store/959
loop13   7:13   0   452K  1 loop /snap/snapd-desktop-integration/83
loop14   7:14   0   284K  1 loop /snap/snapd-desktop-integration/14
loop15   7:15   0  74.2M  1 loop /snap/core22/1122
sda      8:0    0    40G  0 disk 
├─sda1   8:1    0     1M  0 part 
├─sda2   8:2    0   513M  0 part /boot/efi
└─sda3   8:3    0  39.5G  0 part /
sdb      8:16   0     5G  0 disk 
sr0     11:0    1  1024M  0 rom

Conclusion:

We have reached the end of this article. In this guide, we have walked you through the steps required to add disk on virtual machine in VMware without reboot. Your feedback is much welcome.

Tags:
michael
Author: 

Comments ( 0 )

No comments available

Add a comment

Frequently asked questions ( 5 )

Q

What is VMware Go?

A

VMware Go is a web-based application that enables you to get up and running quickly with VMware virtualization.

Q

Is VMware ESX supported?

A

No, Vmware ESX does not support

Q

What is the main purpose of VMware?

A

VMware is a virtualization and cloud computing company that develops virtualization software.

Q

How to list the partition table in Linux?

A

By using the following command you can list the partition table
# fdisk -l

Q

How do you list the block devices in Linux?

A

By using the following command you can list the block devices
# lsblk

Related Tutorials in How to add disk on a virtual machine in VMware

Related Tutorials in How to add disk on a virtual machine in VMware

How to install Xrdp Server (Remote Desktop) on Oracle Linux 8.5
How to install Xrdp Server (Remote Desktop) on Oracle Linux 8.5
Oct 17, 2022
How to add additional hard disk in xenserver
How to add additional hard disk in xenserver
Jul 4, 2016
How to install and update OpenSSL on Debian 11.3
How to install and update OpenSSL on Debian 11.3
Oct 21, 2022
How to Install and Configure Mega in Linux
How to Install and Configure Mega in Linux
Jul 19, 2016
How to use Aureport command on Linux
How to use Aureport command on Linux
Nov 28, 2017
How to install Development tools on Linux
How to install Development tools on Linux
Jun 12, 2018
How to Install mod_ssl and SSL certificate on Oracle Linux
How to Install mod_ssl and SSL certificate on Oracle Linux
Dec 30, 2021
How to install Nextcloud on Ubuntu 22.04 version
How to install Nextcloud on Ubuntu 22.04 version
Jun 23, 2023

Related Forums in How to add disk on a virtual machine in VMware

Related Forums in How to add disk on a virtual machine in VMware

Linux
jayce class=
shasum command not found
May 5, 2017
Linux
stephan class=
How to list all samba users
Jan 12, 2018
pv command
muhammad class=
pvcreate command not found error
May 9, 2017
Linux
henry class=
Starting NFS daemon: rpc.nfsd: writing fd to kernel failed: errno 111 (Connection refused)
Apr 25, 2017
ifconfig command
jackbrookes class=
what is the location of the ifconfig program on your machine?
Jan 4, 2018
Linux
baseer class=
single command to apply setfacl for multiple user at a time
Jan 23, 2018
Linux
beulah class=
What does mean by 0 0 value in fstab file
Jan 2, 2018
CentOS
mason class=
Error getting authority: Error initializing authority: Could not connect: No such file or directory (g-io-error-quark, 1)
Nov 20, 2018

Related News in How to add disk on a virtual machine in VMware

Related News in How to add disk on a virtual machine in VMware

Anbox, the Android-to-Linux tool the developers have been waiting for
Anbox, the Android-to-Linux tool the developers have been waiting for
Apr 17, 2017
Linus Torvalds stops signing Linux kernel RC tarballs
Linus Torvalds stops signing Linux kernel RC tarballs
May 17, 2017
Capsule8 Launches Linux-Based Container Security Platform
Capsule8 Launches Linux-Based Container Security Platform
Feb 14, 2017
Symantec updates Management console product
Symantec updates Management console product
Nov 22, 2017
Latest Linux driver release feature seven AMD Vega
Latest Linux driver release feature seven AMD Vega
Mar 23, 2017
A Newer and a Faster Window Manager for Tina (Linux Mint 19.2)
A Newer and a Faster Window Manager for Tina (Linux Mint 19.2)
Apr 9, 2019
Microsoft makes its Azure App service now available on Linux Systems
Microsoft makes its Azure App service now available on Linux Systems
Sep 7, 2017
Docker friendly Alpine Linux gets hardened Node.js
Docker friendly Alpine Linux gets hardened Node.js
Apr 19, 2017
Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Jayce ?
What are the types of table used in IPtables

What are the various types of table used in IPtables and how to use that for my server security?

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.