Showing posts with label VMware. Show all posts
Showing posts with label VMware. Show all posts

Tuesday, March 9, 2010

Vmware format ubuntu add hdd

Let's get going!
Removing and creating a partition
Having decided your drive's name (let's call it sda) we must now remove the default partition that the manafacturer put there:
sudo fdisk /dev/sda
This will start fdisk. We want to remove the partion(s), there should only be one.
Press d (for delete).
It might ask you for the partition number, press 1 and enter. If there are more then delete them too.

Now to make a new partition.
Press n (for new), then p (for primary), then 1 and then simply press enter for the next two questions.
This will make a new partition that uses the entire disk. If you want more complex partitioning then read the fdisk manual (man fdisk) or use parted or some other app.
Here's what we did with n, the values will differ from yours:

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (197-621, default 197):
Using default value 197
Last cylinder or +size or +sizeM or +sizeK (197-621, default 621): +128M


Now to write the new partion and exit, press w and enter.
You should be ready to make a filesystem now.

Making a filesystem : "Formatting"
You need to put a system in-place, on the disk, such that it can handle files. This is called (unsurprisingly) a filesystem.
The one we are going to use is called "ext3". On Gnu/Linux we are spoiled for choice and there are loads of filesystems you can use, go do some research if you want to.
So, let's make the filesystem:sudo mkfs.ext3 /dev/sda1
* Note the 1 at the end, because we are making the filesystem in that partition (thanks Mike)

Now it will go off and do strange stuff, simply wait for it to finish.

Using the new file system
Well, at this point you should be able to right-click on the icon (on your Desktop) and choose "mount" (I assume that's the verb it will present to you). After that you should be able to open a window and use the drive*
* all this assumes it's an external USB drive.
If you cannot then you will need to mount it yourself, try:
sudo mkdir /media/sda1
sudo mount /dev/sda1 /media/sda1
Note: We are actually mounting the first partition on the drive, hence the 1 at the end: sda1
And the mounted directory can be anywhere you like, but its common location is /media.

Monday, March 8, 2010

Change location HDD from original VM to another VM

If you have 1 server seperate 2 HDD example 1 for OS & another for data. Let talk about when the OS have a problem than how gonna you take out the HDD data to another VM machine. So this tutorial i made for me and for you as a knowledge tp know.

server A - original server have 2 HDD
server B - server

scenario

- when OS in server A crash or corrupted, don't panic! here the step. your data is save because you have a separated HDD on your VM.
- firstly create your new VM, install OS (for me i using Freebsd) after finish please add another HDD when the installation is completed. so now you have 2 HDD (the size on additional HDD depend on your server & need (in my case i create same capacity with the original server capacity for data))
- log in into server B and format the HDD using sysinstall (fdisk & label) the HDD. (remember to add at /etc/fstab for your new HDD)
- after finish format, open VM client browse the datastore your server A located.
- copy the second HDD.vmdk ( by default your HDD will namely nameserver_1.vmdk) copy this file and browse the folder server B & paste inside the folder server B.
- after finish copy you need to rename your the vmdk file that you copy from server B. To this try to ssh inside the vmware machine, by default your vm not allow the ssh protocol you need to open it.
- ssh your VM, go to /vmfs/volumes/datastore1 , go to path your server directory
- backup the nameserverB_1.vmdk to nameserverB_1ORI.vmdk
- rename the vmdk that you copy before nameserverA_1.vmdk to nameserverB_1.vmdk
- turn on your VM.

DONE

Monday, March 1, 2010

FreeBSD (add extra HDD on VMWare Environment)

FreeBSD add another HDD on VMWARE and format it

- shutdown your server.
- open your vmware & choose the server you want to add
- edit & add HDD
- Turn on your server.
- become as root type sysinstall
- choose configure & FDISK
- choose a additional HDD that you add before. (BEWARE!!! Do not edit the existing HDD on your server,this may cause your server corrupted!)
- choose entire disk if you want to use all disk & W button (write)
- please choose NONE "do not tpuch master boot record"
- after finish push q button
- go back to main menu & choose Label (this is use to label your HDD)
- select C to create the FS (depend on your need) exp : /test01
- and select W to write the changes
- Select Q and edit at FSTAB (ee /etc/fstab)
- add this line to you fstab line
exp : /dev/da1s1 /test01 ufs rw 2 2
- save and reboot your server.

Thursday, February 11, 2010

No netwrok after clone/copy using VMWare ESX

After making a copy/clone of an ubuntu server 8.10, i face a network problem.

1. "ifconfig" shows no eth0 device, just the 127.0.0.1 loopback
2. "/etc/init.d/networking restart" reports:

SIOCSIFADDR: No such device
eth0: ERROR while getting interface flags: No such device
SIOCSIFNETMASK: No such device
SIOCSIFBRDADDR: No such device
eth0: ERROR while getting interface flags: No such device
Failed to bring up eth0.

Solution
When you create a complete clone/copy of your vmware machine, a new ethernet MAC address is assigned.

follow this step :
as a root
run this CLI
# rm -fr /etc/udev/rules.d/70-*
# reboot

after wakeup, try ifconfig.
now you get your network back.

Salud!

Thursday, January 14, 2010

Add HDD on VMWARE (linux)

- choose vm that you wish to add the HDD
- edit setting
- add and choose HDD
- follow the instruction
- fdisk -l to see all hdd status
- you will noticed /dev/sdb (not partitoned)
- format new partition : [root@localhost ~]# mkfs -t ext3 /dev/sdb1
-
Create mount point and set up automatic mount when system start up [root@localhost ~]# mkdir /newdisk
-
Add the following line into fstab
/dev/sdb1 /newdisk ext3 defaults 1 1

reboot machine


Wednesday, January 13, 2010

Add HDD on VMWARE (FreeBSD)

I just finish adding HDD onto my Vmware server.

the step :

- choose vm that you wish to add the HDD
- edit setting
- add and choose HDD
- follow the instruction
- after adding go to server (freebsd)
- type sysinstall
- choose fdisk
- BEWARE! please make sure your HDD before you format it!
- after you choose your HDD, choose A and W (write the HDD)
- after finish,exit and choose label
- choose C (create) , edit the label and W (write) the HDD.
- edit the fstab (ee /etc/fstab)

example :
but beware too remember the path your HDD before edit the fstab.

/dev/da1s1d /data ufs rw 2 2

- save and reboot.

Tuesday, October 6, 2009

Missing VMDK

On VMWare ESX3 (I tried already on ESX4 and it works!) , your VM has one or more VMDK files (extension .vmdk) and one or more flat vmdk files (last characters flat.vmdk )

In some cases, you may corrupt, lose or accidentally delete your VMDK files. Your VMDK’s contain metadata for your flat.vmdk files. Without your VMDK’s, you cannot load your flat.vmdk-files. Consequence: you cannot load the VM in your VirtualCenter and you cannot start the VM.
The following steps will guide you to recreate your vmdk files (.vmdk):

  1. Determine the hard disk sizes of your original VM (I call this VM from now on: VM A)
  2. Create a new VM (I call this VM from now on: VM B) with VirtualCenter with the same number of hard disks as your old VM, and the exact same sizes. So: if your original VM contained 2 harddisks from 8,00GB and 12,00GB, recreate these harddisks exactly the same in your new VM.
  3. After your VM B has been created, use Putty (or a similar tool) to navigate to your ESX server. Then navigate to the location / directory where your VM B is stored.
  4. Copy all VMDK’s (not the flat ones, but only the metadata files) to your VM A directory. The filesize of your META-data files should be a few KB.
  5. Navigate to your VM A directory. You just copied the *.VMDK files to this directory. Edit the VMDK’s with a text editor: (For my case i using nano inside the ESX server)You should replace the old filenames with the correct file names -> They refer to the new VM B, but they should refer to your old (original) VM A **
  6. Save the files.
  7. Load the VM in your VirtualCenter. You should now be able to add th flat.vmdk to your VM.

** # Extent description RW 62914560 VMFS "your_new_VM-flat.vmdk" to RW 62914560 VMFS "your_old_VM_name-flat.vmdk" and save

Sunday, September 13, 2009

Adding HDD using VMware On FreeBSD

Let me show you how :

- Open your esx server console and choose server that you need to add another HDD.
- Edit server than choose HDD tab than click add
- follow the instruction to suit your need.
- after add click finish.

Now you need to format the HDD. Below will show you how.

- ssh or open console to the server you add the HDD
- as root run sysinstall
- than choose label (label disk editor)
- now you need to create slice for you disk.Currently I choose auto to create the disk
- after you name the disk than choose "w"
- that all mate.

Have a good day ahead.