2018-04-24

vmdk 轉換成 vhd

先下載跟安裝 Microsoft Virtual Machine Converter 3.0 : https://www.microsoft.com/en-us/download/details.aspx?id=42497

安裝完後, 使用管理者權限開啟powershell視窗 (Run as administrator)

然後先載入剛剛安裝的Cmdlet

Import-Module 'C:\Program Files\Microsoft Virtual Machine Converter\MvmcCmdlet.psd1'

載入後再執行下列指令執行轉換

ConvertTo-MvmcVirtualHardDisk -SourceLiteralPath d:\VM\VM-disk1.vmdk -VhdType DynamicHardDisk -VhdFormat vhdx –destination d:\VM\

執行完後,可以在指定的資料夾取的同樣名稱的vhd檔


ref: https://blogs.msdn.microsoft.com/timomta/2015/06/11/how-to-convert-a-vmware-vmdk-to-hyper-v-vhd/

2018-04-09

Ubuntu 17.10 使用固定ip

Ubuntu 17.10已經不再使用 /etc/network/interfaces 設定ip了.
取而代之的是netplan
所以要修改網卡設定的話, 開啟 /etc/netplan/01-netcfg.yaml
修改如下

# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:
    ens3:
      dhcp4: no
      dhcp6: no
      addresses: [192.168.8.101/24]
      gateway4: 192.168.8.1
      nameservers:
        addresses: [8.8.8.8,8.8.4.4]

修改完後, 執行下列指令測試
sudo netplan --debug generate
沒問題的話, 執行下列指令套用
sudo netplan apply

ref : https://askubuntu.com/questions/967695/ubuntu-17-10-will-not-accept-static-ip?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

在Hyper-V上跑ubuntu 22.04 Desktop, 裝完後一登入就凍住

如果你也遇到這情況, 你可以執行以下步驟 按 Ctrl+Alt+F3 進入 virtual console. (按Ctrl+Alt+F1 可以再回到GUI) 登入後執行下面指令 (更新kernel) * sudo add-apt-repository ppa:capp...