In ambiente Hyper-V ho installato una macchina virtuale CleaOs.
Siccome di default ClearOs non riconosce le schede di rete di Hyper-V se non si installano gli integration Component, ho segnato in questo articolo i passi fatti per risolvere questo problema,
Tutto ciò compreso il fatto che, dopo aver installato gli Integration Component tramite webmin di Clearos non si riescono a modificare piu' le schede di rete, questo perchè l'interfaccia viene rinominata in seth0 e non eth0.
In primis si mette una scheda di rete legacy per fare gli aggiornamenti
yum update -y
Installiamo i compilatori C/C++
yum install gcc gcc-c++ autoconf automake
yum groupinstall "Development Tools"
Al seguente link si scarica la versione 3.1
http://www.microsoft.com/download/en/details.aspx?id=26837
Per le distribuzioni:
- Red Hat Enterprise Linux 6.0 and 6.1 x86 and x64 (Up to 4 vCPU)
- CentOS 6.0 x86 and x64 (Up to 4 vCPU)
Una nota, se si sta usando SLES 10 SP3 / 11, or RHEL 5.2 / 5.3 / 5.4 / 5.5 è necessario usare le IC 2.1 precedenti:
Montiamo la iso sul cdrom di Hyper-V
# mkdir /mnt/cdrom
# mount /dev/cdrom /mnt/cdrom
Copy Linux Integration Services to the virtual machine. For example:
# mkdir /opt/linux_ic_v21_rtm
# cp –R /mnt/cdrom/* /opt/linux_ic_v21_rtm
As
the root user, run the following command to compile and install the
synthetic drivers. A reboot is required after installation.
# cd /opt/linux_ic_v21_rtm/
# make
# make install
# reboot
A questo punto togliamo la scheda legacy e mettiamo quella standard.
Il problema che tramite webmin la scheda non è modificabile ne visualizzabile.
Ecco i passi da me fatti tramite questo articolo:
http://www.clearfoundation.com/component/option,com_kunena/Itemid,232/catid,40/func,view/id,6152/
rinominato /etc/sysconfig/network-scripts/seth0 --> eth0
Modificarlo come si preferisce:
DEVICE=eth0
TYPE=”Ethernet”
ONBOOT=”yes”
USERCTL=”no”
HWADDR=”00:15:5d:01:76:a2”
BOOTPROTO=”static”
IPADDR=”192.168.2.5”
NETMASK=”255.255.255.0”
GATEWAY=”192.168.7.1”
yum groupinstall "Development Tools"
yum update (Get current on maintenance)
mkdir -p /mnt/cdrom
mount /dev/cdrom /mnt/cdrom
cp -rp /mnt/cdrom /opt/linux_ic
umount /mnt/cdrom
cd /opt/linux_ic
./setup.pl drivers
# lsmod | grep vsc (This verifies that the Microsoft drivers loaded. My result is shown below.)
storvsc 33700 0
vmbus 52168 1 storvsc
scsi_mod 141908 8 storvsc,ib_iser,iscsi_tcp,libiscsi2,scsi_transport_iscsi2,scsi_dh,libata,sd_mod
shutdown –h now
cd /etc/init.d
nano ifrename
This newly created file should contain the following:
ifrename -i seth0 -n eth0
ifrename -i seth1 -n eth1
chmod 755 ifrename (make the ifrename file executable)
ln -s /etc/rc.d/init.d/ifrename /etc/rc.d/rc5.d/S09ifrename
cd /etc
nano iftab
# LAN Interface
seth0 mac 00:15:5D:01:76:A2
# WAN Interface
seth1 mac 00:15:5D:01:76:A3
cd /etc/init.d
nano network
CNTL-W to find VLAN (This is a nano search command to jump to the right place in this file.)
You should see the following in this "network" file -
# Even if VLAN is configured, without the utility we can't do much
[ ! -x /sbin/vconfig ] && VLAN=
Just below this point, i.e., after the equals sign, you'll want to add the following code.
if [ -x /sbin/ifrename ] && [ -r /etc/iftab ]; then
echo -n "Remapping network interfaces name: "
ifrename -p
echo "done."
fi
cd /etc
nano firewall
Verify the following is coded. In some cases something in a ClearOS
script seemed to be clearing these values to "". On one occasion
something I did caused a ClearOS script to fill in sethX instead of
ethX.
EXTIT=”eth1”
LANIF=”eth0”