Resize Partition in Ubuntu for Virtual Drive in VMWare Player

Discussion in 'Software' started by Prog Snob, Dec 10, 2014.

  1. Prog Snob

    Prog Snob Private E-2

    Hey guys, I'm having an issue with making the disc space larger on my virtual drive. Well technically, I was able to go into VMWare's menu and increase the disc space. However, now I have to partition the drive to allocate for the necessary space but I'm not quite sure how to do it. I downloaded GParted and see the main primary drive plus the swap drive. If I want to increase the size of the virtual drive, how do I do that? I am running Ubuntu 14.04 as my main operating system. I'm using VMWare Player and Kali Linux 1.06 is working through the Player. Can someone give me some assistance? Thanks in advance.
     
  2. Earthling

    Earthling Interplanetary Geek

    Does THIS help?
     
  3. Prog Snob

    Prog Snob Private E-2

    I found that also, but it's telling me to unmount the drive which I did. But then I was still getting an error message saying that there was another drive mounted. Is that referring to the virtual drive?
     
  4. Prog Snob

    Prog Snob Private E-2

    And actually, that doesn't help to increase the size of the virtual drive in the partition.
     
  5. Earthling

    Earthling Interplanetary Geek

    I don't know much about Linux VMs but at a guess I'd say it's referring to the VM's swap partition.
     
  6. Earthling

    Earthling Interplanetary Geek

    I don't follow you - the virtual drive is divided into partitions, not the other way around.
     
  7. Prog Snob

    Prog Snob Private E-2

    My main operating system is Ubuntu 14.04. I installed VMWare Player for practice with network penetration testing. On VMWare I installed Kali Linux. The virtual drive on VMWare gives you 25GB of space. I need to increase that to at least 100. I can do it in the settings for VMWare player, but now I need to actually partition the space in Ubuntu itself. That is where I'm stuck.
     
  8. Earthling

    Earthling Interplanetary Geek

    Ok, misunderstood. You need someone who runs Ubuntu as host, that's not me. There is only one expert Linux user who posts regularly here but his name is escaping me. Perhaps someone else can remember and PM him for you, as you cannot PM anyone until you have 50 posts.
     
  9. Prog Snob

    Prog Snob Private E-2


    Got it, thanks. Sorry for the mixup. I wasn't sure I worded it right the first time.
     
  10. Earthling

    Earthling Interplanetary Geek

    If your Ubuntu has Gparted I'm sure that is all you need, or you could download it.
     
  11. Prog Snob

    Prog Snob Private E-2

    I have GParted but the last thing I want to do is really screw up the drive so I want to make sure I'm doing something the right way.
     
  12. Earthling

    Earthling Interplanetary Geek

    The answer to that is to image your hard drive to an external drive or flash drive. That's a doddle in Windows but I can't guide you in Linux. All of the free Windows imaging programs will image a Linux drive but I can't find one that you can download and use when using Linux as main system, though there must be one.
     
  13. Earthling

    Earthling Interplanetary Geek

    I've remembered - it's Hedon James, and I can PM him if it might be helpful.
     
  14. Prog Snob

    Prog Snob Private E-2

    That would be great! Thank you.
     
  15. Earthling

    Earthling Interplanetary Geek

  16. Hedon James

    Hedon James Sergeant

    Thanks for the PM Earthling! I don't lurk as much as I used to, so I haven't seen this thread. I've read through this thread, but I'm a little unclear what the OP is trying to do.

    Here's what I THINK is happening:
    - OP is using Ubuntu 14.04 as host system
    - Kali is loaded as a guest OS in a VMWare VM
    - OP wants to increase the Kali virtual disk from 25GB to 100GB
    - OP has increased the VMware disk from 25GB to 100GB, but the Kali disk is still showing as a 25GB OS, because the additional 75GB has not yet been formatted in a manner for the VM to recognize the additional storage

    You've lost me on partitions and Ubuntu. Why do you want to "partition the space in Ubuntu itself"? This will have no effect on your Kali VM. I'm unclear what you're trying to do do. Did you mean you want to partition the Kali VM, such that there's a 25GB and a 75GB partition? Are you wanting to partition Ubuntu to create a completely separate partition from your OS? Your partition comment is perplexing. Or do you simply want to "grow" the Kali VM from 25GB to 100GB?

    Regardless, I do not use VMWare, I use VirtualBox. This is actually quite easy in VB, so I imagine it is easy in VMWare also, but I'm counting on you to know your way around VMWare, as I do not.

    The other tool you will need is GPartEd. It can be a GPartEd LiveCD (or ISO) or your Ubuntu 14.04 Live disk (or ISO it was burned from), but it must be attached to your VMWare VM and you must boot the Live image from within VMWare. Just like a real machine, but boot a live image from the Kali VM.

    If you know how to boot a live image from within VMWare, I can help. Let me know...
     
  17. Prog Snob

    Prog Snob Private E-2

    Hi Hedon James! Thanks for the fast response.

    Well what happened is that after I increased the size of the drive in VMWare to 100, a window popped up saying I would still have to partition the drives to reflect the new space. As of right now, I am still stuck on 25GB even though the VMWare settings are 100GB.

    Now I get what you are saying. I need a separate instance of GParted on Kali Linux within the VMWare and NOT the GParted in Ubuntu. Is that what I was missing earlier?
     
  18. Hedon James

    Hedon James Sergeant

    Based on what you just described, YES!

    In effect, you have replaced a 25GB drive with a 100GB drive and cloned the 25GB drive onto the 100GB; but it still only shows as a 25GB drive. This is because the remainder of the drive hasn't been formatted for use. It's there, it's available, but your system doesn't know it yet 'cuz it can't read the unformatted area.

    The previous link by Earthling in post #2 is your answer. Attach the GParted or Ubuntu Live Image (either CD or ISO file, it doesn't matter) to your VM and boot from that. Once you have successfully booted into the Live Environment, open GPartEd and make sure you have the appropriate drive selected in the top right corner of GPartEd. If you only have one drive in your VM, it will be dev/sda and it will show 100GB. But once you look at the composition of the drive, you'll see 25GB of EXT formatting (including SWAP) and 75GB of "unallocated" space.

    IMO, the easiest fix is to delete the SWAP partition completely. Then drag the 25GB partition boundary all the way to the right, "growing" your partition in the process. Then create a new SWAP of 2GB at the end of the 100GB partition. When you're happy with the layout, don't forget to click the check mark to "apply all operations" and wait for it to be finalized. Once it's done finalizing the disk layout, shut down the VM, remove the Live Image from the VM, and reboot into your 100GB Kali VM!

    If you've already enlarged the disk in VM, it shouldn't take you more than about 5-10 minutes, tops to format the entire thing for use! You're almost there!
     
  19. Prog Snob

    Prog Snob Private E-2

    Thanks Hedon and thanks Earthling! I'm going to attempt it right now. I already have GParted on disc so I just need to boot to that and take it from there. I'm new to Linux but it's something I'm taking on and loving everything about it. I really like working from the command line. Being a Cisco engineer, the command line becomes your best friend.
     
  20. Prog Snob

    Prog Snob Private E-2

    It worked! Thanks guys. I appreciate the help. It was pretty simple and I did it the way you described. I'm back in business with this Network Penetration book. Thanks again!
     
  21. Hedon James

    Hedon James Sergeant

    Excellent news and congrats! Most of the credit goes to Earthling though, as he provided the correct solution. All I did was ask some questions and confirm his solution was the correct one!
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds