VMware Lab 15: Managing Virtual Machines

In this lab, we will be performing the following.

  • Unregister a VM from VCSA
  • Register a VM in VCSA
  • Take a snapshot of a VM
  • Revert a Snapshot
  • Delete an individual snapshot
  • Use the Delete All Function in Snapshot Manager

Task 1: Unregister a VM from VSCA Inventory

For this, I need to power down nw01-4 before we can remove it from the inventory. I don’t have VMware tools installed so I could not shut down via the host, it’s frowned upon to just pull the plug but in this situation, I am not to bothered.

And now we can right-click it and remove from inventory.

Now there is a question if I can still see the VM’s folder within my public storage VMFS share. Now before I even look I can tell you that it will be there because I have simply removed it from the inventory, which is the screen selection on the right.

And it’s still there, it is still called Hot-Clone01 because that was its original name.

Task 2: Register a VM in the VCSA Inventory

To register a VM I need to click the .vmx file in the image above and select register.

This slideshow requires JavaScript.

Before I move on I’m going to change the Hot-Clone folder name to nw01-4 because it’s bugging me because it does not match the naming convention.

Task 3: Unregister and Delete a VM from Disk.

Here we need to go into the properties of nw01-5 and record the name of its datastore. We can see it is in my public datastore VMFS-01, but it does not have a folder because I assume it’s because it has not been turned on so I will do that just so I can have those folders there.

Now I encountered an issue because I changed the folder name, my VM has no idea where to look for it’s files, so it is now orphaned.

For me to fix this issue I need to follow these steps provided by VMware website.

  1. Open VMware Infrastructure or vSphere Client and connect to vCenter Server with a user with Administrative rights.
  2. Change the view to the VMs and Templates inventory view.
  3. On the left pane, right-click vCenter Server, click New Folder and provide an alpha-numeric name to the folder.
  4. Click the virtual machine and while holding the left mouse button, drag the virtual machine to the folder created in step 3.
  5. Right-click the folder, and click Remove. The folder and its contents are deleted.

But these do not help at all, and because I want to use that name I am not going to leave that VM sitting there as it needs to go, so let’s think of how we can remove this if we can’t in VCSA… What about if we install VM Workstation pro on my Client and connect to my VCSA that way and try to delete it in there?

Okay now I have copied the file onto a USB and now I am going to put it into my VM client hosting VCSA.

This may take a while, haha my upload speed is terrible :p I’ll just install Arch Linux in the meantime.

It’s time to install!

Okay, i’m in!

Now moment of truth.

It removed from Workstation but is it gone in VCSA?

LOOK AT THAT!

Now back to my lab, I’m going to re-register my VM again.

Before I could power it, I told it I have copied this VM.

Now I can complete my Task 3

Now it’s on I can delete my VM from disk and then verify the files I registered it from is also gone from the datastore.

This slideshow requires JavaScript.

From the slideshow you can see the folder I registered my VM from is now gone because I delete from disk which deletes the folder I registered from. If you are registering a VM from a folder you tend to never delete it from disk.

Task 4: Take a snapshot of a VM

In this lab, we need to launch remote console on my nw01-3 VM

So this lab actually uses some files that we delete files and use snapshots based off of that. So I’m going to go through the book and just make some text files based off of the names of the files.

I can agree it may be hard to see but I added two folders named, iometer and cpubusy.

Now I need to delete the iometer file and delete iy from the trash.

Now I need to create a snapshot of my VM

This slideshow requires JavaScript.

Now the snapshot is complete we now need to remove cpubusy file.

And make another snapshot.

Now I need to create the cpubusy file onto my desktop, now they have this file on a CD for the labs but I’ll just recreate it again.

Now I need to create another snapshot, leaving the tick both selected.

Now I need to wait for the snapshot to complete.

Now going into snapshots we can manage them.

Task 5: Revert to a snapshot.

The snapshot we are reverting to is ‘Without iometer or cpubusy’

Now there is a question to answer from the lab.

Did the VM power off, and what is the reason? Yes. This is because we did not have the memory state of the machine when creating the snapshot.

Now I need to power the VM up and see if there are any files in the c:

Which there isn’t also I fixed the resolution on my VM so it’s actually readable

Now I need to revert back to ‘With cpubusy’

The VM did not power off this time because we saved the memory state in this snapshot.

Now you can see the old screen because it was based off the old snapshot.

The file I see of cpubusy and not iometer because that was not added in this snapshot, there is actually no backup of iometer at all.

Task 6: Delete an individual snapshot.

Now we need to delete the ‘Without iometer or cpubusy’ snapshot.

This slideshow requires JavaScript.

Now there is questions to answer here for the lab again which is did the VM turn off and is cpubusy still on the desktop. The VM did not turn off because this VMs state had nothing to do with the snapshot deleted which also explains why cpubusy is still on the desktop.

Task 7: use the Delete All Function in the Snapshot Manager.

Now we can delete all snapshots.

All my snapshots were deleted.

Now to answer the question if cpubusy is on the deskop and why? it’s because the snapshots were deleted but that has no change on the current system so it all remains the same.

Lab complete.


CT&A

This lab taught me a lot about dealing with snapshots and also how to remove an orphaned VM thanks to my mistake but it was very well worth it.

All in all this lab taught me a lot and I really enjoyed it.

 

 

 

Post Author: Nicholas Wilkinson

I am a 3rd year Networking Major in my IT BIT degree. I have a passion for Cloud Computing and IOT devices.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.