Thứ Sáu, 31 tháng 12, 2021

[VM] how to reduce hard disk for VM on ESXi (VMDK)

 [VM] how to reduce hard disk for VM on ESXi
(VMDK)
Problem Description:
Recently, we encountered a problem that we need to shrink the hard disk for the VM on ESXi host. I
thought it was similar to the stand-alone version of vmware. We put out the disk shrink in guest os and then
reduce the size in vmware. But: it's not supported
The official way to shrink the hard disk for a VMware VM is to use the VMware vCenter Converter.
Shrinking
Virtual disk shrinking is supported when using VMware Converter converting source virtual
machine as a machine source (not as virtual to virtual).
Note: You cannot shrink virtual disks using vmkfstools in ESXi as the hypervisor is not aware of
the file system layout and cannot ensure a safe shrink operation.
For details, please refer to:
https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1
002019
However, the actual operation of V2V is very slow, so we have to find the following "wild road", which is
effective in personal test. But say the important thing three times:
Backup, backup, backup!
Solution:
1. Log in to Guest OS and reduce the hard disk of Guest OS
Take Windows 2008 server as an example, it just has the function of compressing disks.
Select disk management, right-click Volume/Partition to shrink and select Shrink
The system will automatically scan the size that can be compressed:
Fill in the size you want to compress in the following dialog box:
Enter here:
19.5 (GB) x 1024 = 19968

After compression, the disk is as long as this:
2. Reduce the size of VMDK
Shut down the Virtual Machine, log in to the corresponding ESXi host and switch to the corresponding
datastore:
cd /vmfs/volumes/<datastore name>/<VM folder_name>
Here, you need to modify the description file *. vmdk, which is mainly the line below "extend description".
As it is:
# Disk DescriptorFile
version=1
encoding="UTF-8"
CID=c77fb730

parentCID=ffffffff
createType="vmfs"
# Extent description
RW 83886080 VMFS "VM-Test-A-flat.vmdk"
# The Disk Data Base
#DDB
ddb.adapterType = "lsilogic"
ddb.geometry.cylinders = "4177"
ddb.geometry.heads = "255"
ddb.geometry.sectors = "63"
ddb.longContentID = "42aaea66c82f204c77016921c77fb730"
ddb.uuid = "60 00 C2 96 39 06 49 2c-d6 50 6e 19 2e a1 a8 e6"
ddb.virtualHWVersion = "11"
Hit the point! How to calculate the size to be changed? The original size is calculated as follows:
40 GB = 40 * 1024 * 1024 * 1024 / 512 = 83886080
Now we want to compress from 40 GB to 20 GB, so the value should be:
20 GB = 20 * 1024 * 1024 * 1024 / 512 = 41943040
After modification:
# Disk DescriptorFile
version=1
encoding="UTF-8"
CID=c77fb730
parentCID=ffffffff
createType="vmfs"
# Extent description
RW 41943040 VMFS "VM-Test-A-flat.vmdk"
# The Disk Data Base
#DDB
ddb.adapterType = "lsilogic"
ddb.geometry.cylinders = "4177"
ddb.geometry.heads = "255"
ddb.geometry.sectors = "63"
ddb.longContentID = "42aaea66c82f204c77016921c77fb730"
ddb.uuid = "60 00 C2 96 39 06 49 2c-d6 50 6e 19 2e a1 a8 e6"
ddb.virtualHWVersion = "11"
Hit the point! Migrate or copy VM to another datastore. After the VMDK is moved, its size becomes
20GB.

Restart the VM, and you will find that the extra space after the compression has disappeared. At this point,
the compression work is finished.

MỘT SỐ CÁCH GIÚP DÂY DẪN CÓ ĐƯỢC ÂM THANH HAY

1.Bởi vì tất cả các dây dẫn đều làm suy giảm tín hiệu mà nó truyền đi vì vậy nên sử dụng càng ít dây trong hệ thống càng tốt. Hãy chạy dây ngắn nhất ở mức có thể.

2.Giữ dây loa, dây tín hiệu trái và phải có cùng chiều dài. 

3.Nếu bạn có dây dư thì không nên cuốn chúng lại thành những vòng gọn gàng và đặt ở phái sau loa hoặc các kệ để thiết bị. Điều này sẽ làm cho dây dễ bị cảm ứng và thay đổi tính chất. Thay vào đó, nên mắc dây loa lên để các vòng mắc chéo với nhau theo những góc đúng của nó.

4.Một cách định kỳ, tháo tất cả dây ra và làm sạch chúng. Sự oxi hóa sẽ hình thành trên các đầu cắm và lỗ cắm gây ra những cản trở cho sự dẫn điện. Sử dụng một bộ lau chùi dành riêng thường được bán ở các cửa hàng bán những sản phẩm âm thanh cao cấp. Nó thưc sự sẽ có hiệu quả. Âm thanh trong hệ thống của bạn sẽ nghe hay hơn ngay cả khi dây dẫn thực chất không còn tốt lắm.

5.Khi gắn hoặc tháo các đầu cắm RCA, luôn chỉ nắm ở phần đầu cắm chứ không được nắm phần dây để kéo ra. Nhớ nhấn nút khoá khi tháo đầu cắm XLR.

6.Đảm bảo tất cả các đầu cắm đều được gắn chặt nhất là đầu cắm càng cua trên ampli công suất và loa. Tận dụng tất cả bề mặt tiếp xúc giữa đầu cắm càng cua và lỗ cắm, sau đó siết chặt vào trạm cắm. 7.Chạy dây cách xa các dây điện nguồn. Nếu bắt buộc phải chạy chúng gần nhau thì nên chạy dây dẫn vuông một góc 90 độ với dây điện nguồn. Không bao giờ để dây dẫn và dây điện chạy song song cạnh bên nhau.

8.Giữ các dây tín hiệu digital cách xa với dây tín hiệu analog. Tín hiệu nhiễu của tần số cao phát ra từ dây digital có thể sẽ ảnh hưởng đến dây analog.

9.Tránh đặt những chỗ uốn cong đột ngột trong dây dẫn.

How to install .NET Framework 3.5 on Windows Server 2012 and Windows Server 2012 R2

If you have an application that you want to run on Windows Server 2012 that requires the .NET Framework 3.5, you will most likely run in to a problem when trying to install it. If you are trying to install .NET Framework 3.5 from the Server Manager GUI, you will see this when installing the feature: “Do you want to specify an alternate source path? One or more installation selections are missing source files…” Bug when adding .net framework 3.5 in Server 2012 To solve this, you can either:

1. Go to a command prompt and enter this: dism /online /enable-feature /featurename:NetFX3 /all /Source:d:\sources\sxs /LimitAccess Note: Source should be the Windows installation disc. In my case, this was located on D: Bug when adding .net framework 3.5 in Server 2012

2. Go down to “Specify an alternate source path” and enter “d:\sources\sxs” as the path. Specify alternate source path windows server 2012 .net framework 3.5 Specify alternate source path windows server 2012 .net framework 3.5 Now you should see this under your Features list: .NET Framework 3.5 feature installed on Windows Server 2012

Auto login Windows

You will need to have an account with a password for this to work.

Run regedit.exe

Navigate to HKLM\Software\Microsoft\Windows NT\CurrentVersion\winlogon

Set or create the following keys

 (String) AutoAdminLogon = 1

 (String) DefaultUserName = Your user name

 (String) DefaultPassword = Your password

Restart and let us know if it works!

Thứ Ba, 18 tháng 6, 2013

Cài đặt máy in Canon LBP trên distro họ Ubuntu

Bài viết này được chọn lọc từ những bài viết trên diễn đàn Ubuntu-vn. Các dòng máy Canon rất được ưa chuộng tại thị trường Việt Nam, điền hình trong đó là dòng máy Canon LBP. Tuy nhiên với Ubuntu thì việc cài đặt loại máy in này lại gây ra nhiều khó khăn vì driver chưa được hỗ trợ đầy đủ. Bài viết này sẽ giúp các bạn xử lý khi rắc rối nảy sinh.Các thao tác trong bài viết đã được kiểm tra và hoạt động tốt trên hệ thống Ubuntu 10.10 với máy in Canon LBP2900.
CÀI MÁY IN Canon LBP 2900 trên Ubuntu 10.04 cả 2 phiên bản 32-bit (i386) và 64-bit (amd64) 

Lưu ý: các máy in Canon LBP 1120, 1210, 2900i, 3000, 3200, 3210, 3300, 3600 và 5000 cũng có thể cài đặt tương tự, chỉ cần thay những chỗ có số "2900" thành số máy in của bạn.
Bước 1: Download driver mới nhất trên trang web của canon:
http://support-au.canon.com.au/contents/AU/EN/0900772408.html
(phiên bản hiện nay là: CAPT_Printer_Driver_for_Linux_V200_uk_EN.tar.gz)

Bước 2: Giải nén rồi cài đặt 2 file "deb" có trong thư mục: CAPT_Printer_Driver_for_Linux_V200_uk_EN → Driver → Debian

Đối với phiên bản 32-bit thì lần lượt nhấp đúp vào 2 file để cài, hoặc mở Terminal, vào thư mục đã nêu ở trên và chạy 2 lệnh:
sudo dpkg -i cndrvcups-common_2.00-2_i386.deb
sudo dpkg -i cndrvcups-capt_2.00-2_i386.deb


Đối với phiên bản 64-bit thì chạy lần lượt 2 lệnh:
sudo dpkg -i --force-architecture cndrvcups-common_2.00-2_i386.deb
sudo dpkg -i --force-architecture cndrvcups-capt_2.00-2_i386.deb


Bước 3: Khởi động lại CUPS:
Trong Terminal chạy lệnh:
sudo /etc/init.d/cups restart

Bước 4: Bật máy in và kiểm tra xem đã nhận được máy in chưa:
Trong Terminal chạy lệnh:
sudo tail /var/log/messages

Nếu ở gần cuối có đoạn dạng như sau là máy in đã được nhận ra: "usblp0: USB Bidirectional printer dev 4 if 0 alt 0 proto 2 vid 0x04A9 pid 0×2676"

Bước 5: Đăng ký máy in tại spooler:
Trong Terminal chạy lệnh:
sudo /usr/sbin/lpadmin -p LBP2900 -m CNCUPSLBP2900CAPTK.ppd -v ccp:/var/ccpd/fifo0 -E

Bước 6: Đăng ký máy in tại CCPD daemon setupfile:
Trong Terminal chạy lệnh:
sudo /usr/sbin/ccpdadmin -p LBP2900 -o /dev/usb/lp0

Nếu thành công sẽ có một thông báo dạng như sau:
Entry Num : Spooler : Backend : FIFO path : Device Path : Status
—————————————————————————-
[0] : LBP2900 : usb : //Canon/LBP2900 : /dev/usb/lp0 : New!!


Bước 7: Khởi động CCPD daemon:
Trong Terminal chạy lệnh:
sudo /etc/init.d/ccpd start

Bước 8: Thiết lập cho CCPD daemon tự động khởi động:
- Vào "System -> Preferences -> Startup Applications"
- Tạo một mục mới, đặt tên là: CCPD deamon
- Nhập vào dòng lệnh: sudo /etc/init.d/ccpd start

Bước thêm: Nếu muốn kiểm tra tình trạng máy in:
Trong Terminal, chạy lệnh:
captstatusui -P LBP2900

Lệnh này cũng hay dùng. Ví dụ như khi đang in mà hết giấy, thì ta cần bật cửa sổ trạng thái máy in lên và ra lệnh "resume" để in nốt.

Bước 9: Bây giờ, khi khởi động lại máy tính thì Ubuntu sẽ tự nhận và tạo một máy in mới tên là "LBP2900-2", do vậy ta cần Disable (tắt Enable) máy in đó, rồi Set As Defaults đối với máy in LBP2900

Hình ảnh

Bước thêm: Nên đặt lệnh tắt cho chuỗi lệnh sau:
sudo /etc/init.d/ccpd restart && sudo /etc/init.d/cups restart

Dùng trong trường hợp nếu có lỗi gì đó không in được thì ta lại khởi động lại CCPD daemon và CUPS daemon.

Ghi chú: Để đặt lệnh tắt cho một lệnh hoặc một chuỗi lệnh ta khai báo vào file: ~/.bashrc (Tức là file ẩn tên là ".bashrc" nằm trong thư mục "/home/tên_người_dùng")

Ví dụ: Để đặt lệnh tắt cho 2 lệnh nói ở trên (ở 2 Bước thêm) ta làm như sau:
Trong Terminal chạy lệnh:
gedit ~/.bashrc

Trong cửa sổ trình soạn thảo "gedit" vừa mở ra, ta thêm vào cuối cùng 2 dòng:
alias lbp=’captstatusui -P LBP2900′
alias lbp2900=’sudo /etc/init.d/ccpd restart && sudo /etc/init.d/cups restart’


Ở đây, "lbp" và "lbp2900" là lệnh tắt cho 2 lệnh ta cần.

Thứ Năm, 7 tháng 3, 2013

Remote session was disconnected because there are no Remote Desktop client access licenses available for this computer. Please contact the server administrator

Delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSLicensing
on the server/client your are trying to connect from.
(trhe entire key, don’t worry, it will be recreated automatically ).

Chủ Nhật, 2 tháng 12, 2012

Fix error "Can't Update Avira 12"

Go to the host file and add this.


62.146.66.187 personal.avira-update.com personal.avira-cdn.com
80.190.143.232 personal.avira-update.net
80.190.143.229 perspeak.avira-update.com