Personal tools

Difference between revisions of "VMWare"

From MohidWiki

Jump to: navigation, search
(Installation Phase)
(Production Phase)
Line 21: Line 21:
 
==Production Phase==
 
==Production Phase==
  
 +
===Changing the bridging between the LAN and the DMZ===
 +
 +
====Switching from DMZ to LAN====
 +
Enter the domain through console access as '''user''':
 +
*System--> Administration--> Network-->
 +
*Ethernet connection--> Realtek (eth0)
 +
*Select to not connect eth1 automatically but connect automatically eth0    'or eth1 it would give fail in network restart after taking it down 8below)
 +
*Save.
 +
 +
*Add in copernico the new IP and name to DNS list
 +
 +
> ifconfig eth1 down
 +
> su
 +
> /sbin/service network restart
 +
> /sbin/ifconfig
 +
> /sbin/route -n
 +
 +
====Switching from LAN to DMZ====
 +
In the opendap VM access as '''user''':
 +
*Other--> Network Connections
 +
*Ethernet connection--> Realtek (eth1)
 +
*Select to not connect eth0 automatically and to connect eth1 automatically    'or eth0 it would give fail in network restart after taking it down 8below)
 +
*Save.
 +
 +
*Add in copernico the new IP and name to DNS list
 +
 +
> su
 +
> ifconfig eth0 down                    'takes the maretec network adapter down and in command network restart ir is not connectd
 +
> /sbin/service network restart
 +
> /sbin/ifconfig
 +
> /sbin/route -n
 +
 +
===Increase /opendap size===
 +
First, do a snapshot, backup the files.
 +
 +
*Add a virtual disk to the VM vSphere Client from the same physical disk(default)or select other datastore.
 +
 +
IMPORTANT: do not add size to the existing virtual disk or the space will not be usable. Add one new disk.
 +
 +
*Check the name of the new disk in the VMMachine Disk Utility (Accesories). It was /dev/sdb
 +
 +
*Create a new partition of appropriate size using fdisk
 +
>fdisk /dev/sdb
 +
>n            (create new partition, select start and end cylinders (default), all free space is selected by default)
 +
>w            (save partition table and exit)
 +
>fdisk -l      (check the new partition, /dev/sdb1 was created ~10G in size)
 +
 +
*Create an ext3 filesystem in the partition (this step is optional, just a quick test that all is well)
 +
>mkfs.ext4 /dev/sdb1
 +
 +
*Initialise the partition for use as a physical volume in lvm and add it to vg_opendap2
 +
>pvcreate /dev/sdb1
 +
>vgextend vg_opendap2 /dev/sdb1
 +
 +
*Extend LogVol00 (use 'df /' to check that / is mounted on LogVol00) as required (by 10G here)
 +
>lvextend -L +10G /dev/vg_opendap2/lv_opendap
 +
 +
*If you receive errors about not enough physical extents, then reduce the size of the extension a little until it fits.
 +
 +
*Finally, resize the filesystem (this part normally would require unmounting /, but for ext4 it works while the partition is mounted)
 +
>resize2fs /dev/vg_opendap2/opendap
 +
 +
*Type 'df -h /', to check it worked, there should be an extra 10G available 
 +
(you can use vgdisplay, pvdisplay and lvdisplay (as root) to see detailed info, pvscan for a summary)
  
 
===Backup VM===
 
===Backup VM===
  
 
===Restore VM===
 
===Restore VM===
 
  
 
==Links==
 
==Links==

Revision as of 05:32, 14 January 2012

VMWare was the second step of virtualization infraestructure in Maretec (after Xen).

Physical Machines

Installation Phase

Migrating Existing VM in Xen

Existing VM were duplicated in VMWare environment in RAID machine (the future backup machine). Before installation in definite place the original ones should be replaced by the news to ensure the system works.

Creating a new FTPServer

A VM was added to vShere and installed Windows Server 2008 and configured as the existing Xen FTPServer. See Creating a FTPServer in VMWare for details.

Creating a new OpenDAPServer

A VM was added to vShere and installed Fedora and configured as the existing Xen OpenDAPServer.

See Creating an OpenDAPServer in VMWare for the first attempt with LVM defaults from Fedora. After PVextend machine crashed.

See Creating an OpenDAPServer in VMWare2 for the second attempt with user defined LVM and till now the best creation.

Production Phase

Changing the bridging between the LAN and the DMZ

Switching from DMZ to LAN

Enter the domain through console access as user:

  • System--> Administration--> Network-->
  • Ethernet connection--> Realtek (eth0)
  • Select to not connect eth1 automatically but connect automatically eth0 'or eth1 it would give fail in network restart after taking it down 8below)
  • Save.
  • Add in copernico the new IP and name to DNS list
> ifconfig eth1 down
> su
> /sbin/service network restart
> /sbin/ifconfig
> /sbin/route -n

Switching from LAN to DMZ

In the opendap VM access as user:

  • Other--> Network Connections
  • Ethernet connection--> Realtek (eth1)
  • Select to not connect eth0 automatically and to connect eth1 automatically 'or eth0 it would give fail in network restart after taking it down 8below)
  • Save.
  • Add in copernico the new IP and name to DNS list
> su
> ifconfig eth0 down                    'takes the maretec network adapter down and in command network restart ir is not connectd
> /sbin/service network restart
> /sbin/ifconfig
> /sbin/route -n

Increase /opendap size

First, do a snapshot, backup the files.

  • Add a virtual disk to the VM vSphere Client from the same physical disk(default)or select other datastore.

IMPORTANT: do not add size to the existing virtual disk or the space will not be usable. Add one new disk.

  • Check the name of the new disk in the VMMachine Disk Utility (Accesories). It was /dev/sdb
  • Create a new partition of appropriate size using fdisk
>fdisk /dev/sdb
>n             (create new partition, select start and end cylinders (default), all free space is selected by default)
>w             (save partition table and exit)
>fdisk -l      (check the new partition, /dev/sdb1 was created ~10G in size)
  • Create an ext3 filesystem in the partition (this step is optional, just a quick test that all is well)
>mkfs.ext4 /dev/sdb1
  • Initialise the partition for use as a physical volume in lvm and add it to vg_opendap2
>pvcreate /dev/sdb1
>vgextend vg_opendap2 /dev/sdb1
  • Extend LogVol00 (use 'df /' to check that / is mounted on LogVol00) as required (by 10G here)
>lvextend -L +10G /dev/vg_opendap2/lv_opendap
  • If you receive errors about not enough physical extents, then reduce the size of the extension a little until it fits.
  • Finally, resize the filesystem (this part normally would require unmounting /, but for ext4 it works while the partition is mounted)
>resize2fs /dev/vg_opendap2/opendap
  • Type 'df -h /', to check it worked, there should be an extra 10G available

(you can use vgdisplay, pvdisplay and lvdisplay (as root) to see detailed info, pvscan for a summary)

Backup VM

Restore VM

Links

Go Back to Virtualization

Xen