Ubuntu 管理心得

搜尋此網誌

顯示具有 vmware 標籤的文章。 顯示所有文章
顯示具有 vmware 標籤的文章。 顯示所有文章

2024年8月16日 星期五

apt check auto or manul installed packages pkg

Because 'apt autoremove' will remove the pkgs installed from 'apt install', some old pkgs, eg. some old kernels are for vmware modules updated. can be not removed.

Vmware modules cannot be compiled in the new kernel 6.8.0-40.

  cf: https://help.ubuntu.com/community/RemoveOldKernels#GUI_Way 

The packages to remove are determined based in part on whether the package is marked as manually or automatically installed. You can check if a kernel providing package is marked as automatically installed using this command in a terminal:

apt-mark showauto 'linux-image-.*'

or to see if it is marked as manually installed:

apt-mark showmanual 'linux-image-.*'

In the event some kernel providing packages are marked as manual (possibly because they were installed via 'apt-get') and you want them autoremoved, you can change the status of the package using apt-mark auto and the package name. For example, to mark kernel 4.12.0-12-generic as autoremovable:

sudo apt-mark auto '^linux-.*-4\.12\.0-12(-generic)?$'
On the contrary, I want some kernels not to be autoremoved. So do this,
sudo apt-mark manual linux-headers-6.5.0-45-generic
sudo apt-mark manual linux-hwe-6.5-headers-6.5.0-45
sudo apt-mark manual linux-image-6.5.0-45-generic 
sudo apt-mark manual linux-modules-6.5.0-45-generic
sudo apt-mark manual linux-modules-extra-6.5.0-45-generic
sudo apt-mark manual linux-signatures-nvidia-6.5.0-45-generic
 
sudo apt-mark manual linux-headers-5.15.0-118
sudo apt-mark manual linux-headers-5.15.0-118-generic
sudo apt-mark manual linux-image-5.15.0-118-generic
sudo apt-mark manual linux-modules-5.15.0-118-generic
sudo apt-mark manual linux-modules-extra-5.15.0-118-generic
 


2023年6月1日 星期四

AutoCAD on vmware 3D graphic acceleration

 cf: http://bbs.mjtd.com/thread-186780-1-1.html

在 AutoCAD 命令行中键入 GFXDX12 ,指定 0 (原值為1)。重新開啟 AutoCAD。應該可以看到在右下角的「圖形效能」中,會呈現「硬體加速打開」的訊息。

不過,可能反而整體會有lag的情形,可以將「圖形效能」關閉。

(但是,又很奇怪了,我把 GFXDX12 再改為 1 之後, 右下角的「圖形效能」中,還是呈現「硬體加速打開」的訊息。不會是之前一直都是「硬體加速關閉」的訊息。20230601… Why?????)



2022年11月3日 星期四

Upgrade Mac OS X stuck hung at progress bar

cf: https://www.sysprobs.com/macos-13-ventura-vmware-pre-installed-image-download-windows-11-10 

This links also contains the download urls for Ventura vmware image (worked!)

  1. Poweroff the virtual guest (not workstation)
  2. Add this line into vmx file, e.g. Monterey.vmx
    smc.version= "0" 
  3. Change the line as follows:
    #ethernet0.virtualDev = "e1000e"
    ethernet0.virtualDev = "vmxnet3"
  4. Save and restart guest.
  5. If it is successfully opened, but the mouse and keyboard are not working, then change the USB version in VM settings to USB3.1.
  6. Viola!

 

2022年10月13日 星期四

2021年6月19日 星期六

vmware 3d acceleration

 Add this line to .vmx file:

mks.gl.allowBlacklistedDrivers = "TRUE"

2021年2月18日 星期四

Shrink vmware vmdk size

 cf: https://blog.xuite.net/tolarku/blog/331992410-%E7%B8%AE%E5%B0%8F+VMDK+%E8%99%9B%E4%BD%94%E7%94%A8%E7%9A%84%E7%A9%BA%E9%96%93+-+shrink+a+thin+provisioned+disk

https://longfamily.pixnet.net/blog/post/350412959-vmware-virtual-disk-shrink-%E5%B0%87vmdk%E6%AA%94%E6%A1%88%E7%B8%AE%E5%B0%8F

  1. Assume that mydisk.vmdk is mounted on /dev/sda1 with directory /BACKUP
  2. Suppose 950GB to be shrink. Issue this:
    sudo dd bs=1M count=950000 if=/dev/zero of=/BACKUP/zero.dat status=progress
    This is for creating a 1M * 950000 = 950GB  zero filled file, zero.dat
  3. Then, delete this file,
    sudo /bin/rm -rf
    /BACKUP/zero.dat
  4. Close vmware-workstation and go back to host. Go to the vmdk file directory, say /vmware/mydisk.vmdk
  5. Make sure /vmware has doule size space of mydisk.vmdk because the following shrinking command will create another mydisk.vmdk.tmp file.
  6. sudo vmware-vdiskmanager -k mydisk.vmdk
  7. Go back to vmware-workstation. Click the 'Compact Disk' in the setting windows.
However, the process above can only reduce the logic size rather than the physical size of the hard disk. The vmdk is still of original size. One way to really reduce the vmdk is only to create another vmdk, say my60GB.vmdk.
  1. Use clonezilla to boot the vmware guest.
  2. Enter the expert mode,unclick and click options as follows:

  3. Start to disk to disk cloning.
  4. Done

2020年11月11日 星期三

2020年10月23日 星期五

Expand vmware Mac OS disk

  1. Expand disk size in vm setting, say to 60GB
  2. Inside mac os guest, open disk utility 
  3. Select  容器->My29GB - Data. (not My29GB)
  4. click 分割 tab 
  5. Keyin new size in 大小. The size should be less than 60GB as in step 1. 
  6. click 套用
  7. Done

 

2020年7月24日 星期五

Do not forget rerun unlocker

If install new version of vmware, do not forget to run unlocker again, otherwise the MacOS (e,g, catalina ) cannot boot.

2020年1月3日 星期五

vmware mac OS Catalina installation

cf from: https://techsviewer.com/how-to-install-macos-10-15-catalina-on-vmware-on-windows-pc/

  1. update vmware wordkstation to 15.5.1
  2. download unlocker 3.0.3, VERY IMPORTANT!, Edit lnx-install.sh,
    Change the lines inside of lnx-install.sh from 'python gettools.py' to 'python3.7  gettools.py
  3.  Create new guest : Select Guest Operation System: Apple OS X -> macOS 10.15
  4.  After get into guest, then power off, close vmware workstation
  5.  Edit vmx file: insert smc.version = "0" 
  6. Open guest and click Options tab, Guest Operating System  change  to Microsoft Windows and Version to Windows 10 x64
  7.  Power on guest, get into the page: macOS 工具程式,select:
  8. click it, then
  9. Then erase it and format as Mac OS 擴充格式 (日誌式)
    click 清除.

  10. Back into macOS 工具程式,then 安裝 macOS
  11. Wait ... couple of hours !
  12. After installation is ok, change Guest OS back to "macOS 10.15"

2018年8月8日 星期三

Convert vmdk for using in ESXi

The vmdk file, e.g, created in vmware workstation, cannot be directlt used in ESXi. It needs to be converted. The process is:
  1. Enable ssh connection in ESXi host.
  2. ssh to ESXi host, e.g. ssh -l root 192.168.1.110
  3. cd to the directory containing the vmdk file, e.g.
    cd /vmfs/volumes/62169753-c96da716/vmdk
  4. Suppose the vmdk file is ubuntu.vmdk, and let the converted vmdk filename be ubuntu_convert.vmdk. Then issue the command,
    vmkfstools -i ubuntu.vmdk ubuntu_convert.vmdk -d thin
  5. It will show something like:
    ...
    Clone: 100% done.
    It does not mean thee conversion is really finished. Just wait until the shell returns prompt, e.g. [root@chiao-dell:/vmfs/volumes/62169753-c96da716/vmdk]
  6. Usually, it will take couple of hours to finish for large file, YES! H.O.U.R.S. !
  7. If the datastore in on an nfs server, e.g. 192.168.1.8, then get into the nfs directory and use the following command to display the converted file size.
    ls -lsh ubunut_convert-flat.vmdk
    You will see something like this line:
    2.0G -rw------- 1 myuid mygid 510G  8月  8 16:27 ubuntu_convert-flat.vmdk
    Keep running this command, the size at the front is increasing. 

網誌存檔