วันศุกร์ที่ 17 สิงหาคม พ.ศ. 2561

แก้ปัญหา VeeamONE ไม่สามารถเชื่อมต่อ vCenter ได้ เนื่องจากติดปัญหา Time Difference

1.open Registry Editor and navigate to this key:
HKEY_LOCAL_MACHINE\SOFTWARE\Veeam\Veeam ONE Monitor\Service

2.Create a new DWORD value with the following parameters:
Value name = MaxTimeDiff
Value data (in DECIMAL format) = 43200

This will set maximum time difference timeout to 12 hours. According to your first post, that would be more than enough.

3.Restart Veeam ONE Monitor Server service and try to add a vCenter Server into Veeam ONE configuration one again.

Web Reference : https://www.veeam.com/kb1677

วันจันทร์ที่ 13 สิงหาคม พ.ศ. 2561

วิธีแก้ วีธีลบ ไวรัส มัลแวร์ ที่ซ่อนไฟล์ข้อมูลใน USB Flash Drive

1. เข้า cmd
2. เปลี่ยนเป็น Drive ของ Flash Drive
3. พิมพ์ attrib *.* -s -h -a -r /d /s
ตัวอย่าง :  G:/>attrib *.* -s -h -a -r /d /s

วันอังคารที่ 10 กรกฎาคม พ.ศ. 2561

วิธีแก้ปัญหา OS Server 2008 R2 ขึ้น “Bootmgr is missing” ใน Virtual machine

ในกรณีที่ขึ้น BOOTMGR is missing ดังภาพ


วิธีการแก้ปัญหาคือ 
1. Boot กับ Windows Server 2008 R2


2. คลิก Repair your Computer


3. ในกรณีที่มีการทำไฟล์ Recovery ให้คลิกที่ไฟล์แล้วกด Next

4. ในกรณีไม่มี ให้คลิกที่ Restore แล้วกด Next
5. เมื่อขึ้นหน้านี้ ให้เลือก Command Prompt

6. เปลี่ยนจาก x: เป็น c: 
7. พิมพ์คำสั่งดังนี้ 

BCDBOOT C:\Windows

BOOTREC /FIXMBR

BOOTREC /FIXBOOT

BOOTREC /REBUILDBCD

BOOTREC /SCANOS

8. เมื่อเสร็จทุกคำสั่งแล้ว พิมพ์ exit ออกมา แล้ว Restart เครื่อง 1 ครั้ง

web reference : http://www.running-system.com/virtual-machine-with-os-server-2008-r2-bootmgr-is-missing-error/



วันศุกร์ที่ 29 มิถุนายน พ.ศ. 2561

การเพิ่มขนาดความจุฮาร์ดดิสก์ใน LVM-Ubuntu


1. ใช้ GParted ขยายพื้นที่

หากขยายไม่ได้
- ให้คลิกขวา sd2 และ sd5 แล้วเลือก  "Deactivate"
- ให้ resized extended (sda2) partition.
- ให้ resized lvm (sda5) partition.
หากไม่ได้ให้ลองสร้าง partition ส่วนที่ unallocated ก่อน แล้วลบทิ้ง

2. เปิดเครื่อง แล้วใช้คำสั่ง df -h  แล้วดู MOUNTPOINT (ตัวอย่างคือ /dev/mapper/hrm--vg-root)

3. ใช้คำสั่ง lvextend -l+100%FREE [MOUNTPOINT]
ตัวอย่าง
lvextend -l+100%FREE /dev/mapper/hrm--vg-root

4. ใช้คำสั่ง resize2fs [MOUNTPOINT]
ตัวอย่าง
resize2fs /dev/mapper/hrm--vg-root
5. ใช้คำสั่ง pvs

หากมีพื้นที่ว่างอยู่จะมีปรากฏ PFree

หากขยายเต็ม 100% จะไม่มี

หรือใช้คำสั่ง  vgdisplay


Tip
ใช้คำสั่ง lvdisplay
แล้วดู MOUNTPOINT (ตัวอย่างคือ /dev/hrm-vg/root) ค่าเหมือนกันกับ /dev/mapper/hrm--vg-root



วันอาทิตย์ที่ 6 พฤษภาคม พ.ศ. 2561

การติดตั้ง Samba บน Ubuntu Server 16

การติดตั้ง SAMBA
1. ติดตั้ง samba
sudo apt install samba samba-common-bin

ตรวจสอบเวอร์ชั่นของ samba
#sudo smbstatus  หรือ #smbd --version

2. เช็ค Samba service is running
#systemctl status smbd
#systemctl status nmbd

3. To start these two services, issue the following commands:
#sudo systemctl start smbd
#sudo systemctl start nmbd

smbd will be listening on TCP port 139 and 445
nmbd will be listening on UDP port 137 and 138.

=================
การสร้าง โฟลเดอร์และ User สำหรับเข้าไปใช้งาน
1.เข้าไปแก้ไขไฟล์
sudo nano /etc/samba/smb.conf

ดูที่ [global] section, จะต้องเป็น workgroup = WORKGROUP

2. เลื่อนไปล่างสุดของไฟล์
[Private] ==> ตั้งชื่อโฟลเดอร์ที่เห็นตอนเข้าไป

comment = needs username and password to access
path = /home/privatefolder/ ==> ตั้งพาธที่จะเก็บไฟล์
browseable = yes
guest ok = no
writable = yes
valid users = @samba

3. add user ที่จะเข้าไปใช้งานและรหัสผ่านสำหรับผู้ใช้
sudo adduser [username]
sudo smbpasswd -a [username]

4. สร้างกลุ่ม samba และเพิ่ม user เข้าไปในกลุ่ม
sudo groupadd samba ==> samba คือชื่อกลุ่ม
sudo gpasswd -a [username] samba

======================
สร้างโฟลเดอร์ที่จะเก็บไฟล์
sudo mkdir /home/privatefolder/

1. กำหนดสิทธ์
sudo setfacl -R -m "g:samba:rwx" /home/privatefolder/

2. รันคำสั่งนี้เพื่อเช็ค syntactic  error
#testparm

3. สั่ง  restart smbd และ nmbd daemon
#sudo systemctl restart smbd nmbd

=========================
ทดสอบเข้าไปใช้งาน โดยเข้าไปยัง browser windows
\\192.168.1.55
กรอกรหัสผ่านที่กำหนด

เว็บอ้างอิง : https://www.linuxbabe.com/ubuntu/install-samba-server-ubuntu-16-04

วันพุธที่ 2 พฤษภาคม พ.ศ. 2561

การ Set Port Mirroring ใน VMware Esxi และตั้งค่าใน Cisco Switch

Configuring ESXi
First create a new Standard vSwitch, this is going to be the target for your port mirror.  Make sure that you name it appropriately so that it is easy to assign it to your VMs without confusion.
Make sure that you then assign the NIC that you connected to the port that is being replicated in the Network adapters tab.
Then most importantly make sure that you set the Security settings of both the vSwitch and the port group to Accept promiscuous mode.
Next set the VLAN ID to All.
Then you need to add a NIC to your VM and select the network that you created above.
Switch Configuration
I was using a Cisco SF300 switch so in the GUI this was a simple matter of going to Diagnostics>Port and VLAN Mirroring and choosing my source and destination ports.  Please note that adding the port mirror does not cause any network interruption or downtime on the switch and can be done in working hours safely.
Testing
To test I first installed Wireshark and selected the NIC that I had bound the mirrored port to.
I then started a continuous ping from my desktop to the device connected to the port that I was mirroring from.  I then added a filter to Wireshark using the syntax ip.addr == 10.200.20.40 (this is the IP of the machine I was pinging from).
Once I could see the ICMP packets I knew that everything was working ok and that I had successfully mirrored the port and sent the traffic to the 2nd NIC of my VM in ESXi.
WebSite Reference : http://dailysysadmin.com/KB/Article/965/port-mirroring-cisco-switch-virtual-machine-vmware-esxi-host/