Vmware

From KeegansWiki
Jump to navigation Jump to search

Oracle Enterprise Linux

Click here

Enabling Swap

Create partition on the disk

[root@dstolprddb03-oracle ~]# fdisk -u /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.


The number of cylinders for this disk is set to 4177.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First sector (63-67108800, default 63): 
Using default value 63
Last sector or +size or +sizeM or +sizeK (63-67108800, default 67108800): 
Using default value 67108800


Command (m for help): t
Selected partition 1
Hex code (type L to list codes): 82
Changed system type of partition 1 to 82 (Linux swap / Solaris)


Command (m for help): p

Disk /dev/sdb1: 34.3 GB, 34359706112 bytes
255 heads, 63 sectors/track, 4177 cylinders, total 67108801 sectors
Units = sectors of 1 * 512 = 512 bytes

     Device Boot      Start         End      Blocks   Id  System
/dev/sdb1p1              63    67108800    33554369   82  Linux swap / Solaris

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 22: Invalid argument.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.

Enable swap

  • mkswap -L SWAP-sdb1 /dev/sdb1
  • swapon /dev/sdb1

fstab Entry

LABEL=SWAP-sdb1         swap                    swap    defaults        0 0

Importing VM from one datacenter to another

Preparing Netapps

  • Locate the volume where the current datastore is (also note the folder name under 'Edit Settings')
  • Find snapmirror destination for the regular and swap volumes, break snapmirrors for both

Import the Virtual Machine

  • Change vcenter view to Datastores
  • Find the destination volume in the gui, click on 'Browse Datastore'
  • Locate the folder name you found from the original VM datastore info, open it, and add the vmx file to inventory
    • Rename it appropriately

Update New Virtual Machine

  • The swap disk usually gets mucked up, so remove it (do not remove from disk, just from the virtual machine) and re-add it
  • Update network vlan

Migrate the VM to a new netapp / volume

  • Click Migrate
  • Change Datastore
  • Click Advanced, then change the locations there. Config & HD1 should be on the same datastore
  • Select Thin Provisioned format