Category: vmware

Add vCPU in VMware Fusion for Windows

Add vCPU in VMware Fusion for Windows

As Windows Pro only supports 2 CPU sockets, after added 4 cores in VMware Fusion, the OS is still shown as 2 vCPU. To avoid this is, need to change cpuid.coresPerSocket to handle more than 2 cores.

Parameters

In .vmx file change following parameter, numvcpus is the total number of cores, which can be changed in GUI. cpuid.coresPerSocket should be changed to half of numvcpus.

numvcpus = "4"
cpuid.coresPerSocket = "2"

References

Odd behavior with Fusion 12.2 and Windows 11

Convert Ubuntu VM to Proxmox

Convert Ubuntu VM to Proxmox

This is to describe how to convert Ubuntu VM to Proxmox.

VM creation

Following hardware options can be considered

  • BIOS: SeaBIOS (Should be able to see Grub menu)
  • Machine: Default (i440fx)
  • SCSI Controller: VirtIO SCSI (It might not be used as sata0 to be considered for disk)
  • Hard Disk (sata0): disk_image_file
  • Network Device (net0): vmxnet3=<mac_address> (This is default for VMware, can use other type too)

Convert the VMware disk to Proxmox disk and attach the disk to new VM

qm importdisk 121 ubuntu.vmdk pool240ssd --format qcow2

Attach the disk as sata0.

Boot

After boot up system show a GUI error screen, press Contrl + Alt + F3 to switch to console mode.

Note: Press Shift to active Grub Menu if required

Network

Find out new network interface UUID

nmcli conn

Change NetworkManager file name

cd /etc/NetworkManager/system-connections
mv Wired\ connection\ 1-<old_uuid>.nmconnection Wired\ connection\ 1-<new_uuid>.nmconnection

Update nmconnection file

[connection]
id=<new_interface_name>
uuid=<new_uuid>
type=ethernet
autoconnect-priority=-999
interface-name=<new_interface_name>
permissions=
timestamp=1628151710

[ethernet]
mac-address-blacklist=

[ipv4]
address1=192.168.1.232/24,192.168.1.254
dns=192.168.1.250;8.8.8.8;
dns-search=
method=manual

[ipv6]
addr-gen-mode=stable-privacy
dns-search=
method=disabled

[proxy]

Errors

No login GUI

After boot, only a white screen with error message appears, this was fixed by running apt update and upgrade

First, update /etc/apt/sources.list file, replace all repo URL to old-releases.ubuntu.com

Then run following commands

apt update
apt upgrade -y

References

Convert Oracle Linux 7.9 to Proxmox

Convert Oracle Linux 7.9 to Proxmox

This is to describe how to convert Oracle Linux 7.9 to Proxmox.

VM creation

Following hardware options can be considered

  • BIOS: SeaBIOS (Should be able to see Grub menu)
  • Machine: Default (i440fx)
  • SCSI Controller: VirtIO SCSI (It might not be used as sata0 to be considered for disk)
  • Hard Disk (sata0): disk_image_file
  • Network Device (net0): vmxnet3=<mac_address> (This is default for VMware, can use other type too)

Convert the VMware disk to Proxmox disk and attach the disk to new VM

qm importdisk 121 oracle18c.vmdk pool240ssd --format qcow2

Attach the disk as sata0.

Boot

Select item Oracle Linux Server (0-rescue-ed95572bd80641d79f83cd91e03c0283 with Linux) 7.9 from Grub menu to boot into rescue mode.

Note: Tried other option, all got error and unable to boot

Kernel

Find Kernel Package

Login as valid user, then find out the kernel to be used

rpm -q -a | grep kernel | sort

Got following list

kernel-3.10.0-1160.25.1.el7.x86_64
kernel-3.10.0-1160.36.2.el7.x86_64
kernel-3.10.0-1160.el7.x86_64
kernel-tools-3.10.0-1160.36.2.el7.x86_64
kernel-tools-libs-3.10.0-1160.36.2.el7.x86_64
kernel-uek-5.4.17-2102.203.6.el7uek.x86_64
kernel-uek-5.4.17-2102.204.4.2.el7uek.x86_64
kernel-uek-5.4.17-2102.204.4.4.el7uek.x86_64

Choose the latest one, which is also Unbreakable Enterprise Kernel

Recreate Grub kernel files

Find scripts in Kernel package

rpm -q kernel-uek-5.4.17-2102.204.4.4.el7uek.x86_64 --scripts

Following posttrans scriptlet shown

...
posttrans scriptlet (using /bin/sh):
/usr/sbin/new-kernel-pkg --package kernel --mkinitrd --dracut --depmod --update 5.4.17-2102.204.4.4.el7uek.x86_64 || exit $?
/usr/sbin/new-kernel-pkg --package kernel --rpmposttrans 5.4.17-2102.204.4.4.el7uek.x86_64 || exit $?
...

Run above commands to rebuild Grub files, then reboot the system to the menu with kernel recreated.

Note: The error Unable to open file: /etc/keys/x509_ima.der (-2) can be ignored

Network

You can reconfigure network interface the same as VMware, this is to avoid reconfiguration of network settings

Interface Type

Check VMWare vmx file to find disk type, then set the same in Proxmox

ethernet0.virtualDev = "vmxnet3"

Mac Address

You can change Mac Address using the value in VMWare configuration

ethernet0.generatedAddress = "00:11c:22:33:44:55"

Interface Name

Find out the interface in /etc/sysconfig/network-scripts as below.

/etc/sysconfig/network-scripts/ifcfg-ens192

The interface name is ifcfg-ens192

Create the file /etc/udev/rules.d/70-custom-ifnames.rules with the following contents:

SUBSYSTEM=="net",ACTION=="add",ATTR{address}=="00:11:22:33:44:55",ATTR{type}=="1",NAME="ens192"

Then reboot the server, then check the Interface and IP address using ip a command.

References

Consistent network interface device naming

Convert VMware VM to Proxmox VM

Convert VMware VM to Proxmox VM

Create a new VM in Proxmox

Linux

  • Create new VM in Proxmox, and select correct BIOS.

Windows

  • Create new VM in Proxmox, and select OVMF (UEFI).

Remove newly created disk

  • Detach disk
  • Remove detached disk

Convert disk

Run following command to convert vmdk to qcow2

qm importdisk <VM_ID> <Virtual Disk>.vmdk <storage> --format qcow2

Here, VM_ID is a number. After completed a newly created disk appears in VM

Add disk

Ubuntu

Double click the newly created disk, then select VirtIO Block device.

Select Write Back as cache method

RHEL and Windows

Double click the newly created disk, then select SATA device.

Select Write Back as cache method

Start VM and remove VMware Tools

Ubuntu

apt remove --auto-remove open-vm-tools
apt remove --auto-remove xserver-xorg-video-vmware
apt purge open-vm-tools
apt purge open-vm-tools-desktop

RHEL

yum remove open-vm-tools open-vm-tools-desktop

Reboot the server

Enable VMmotion in VMware

Enable VMmotion in VMware

Two ESXi servers, for example esx01 and esx02.

CPU

The CPU of both esx01 and esx02 are same family.

Storage

Both esx01 and esx02 are having same shared storage.

Configure

Configure NFS or iSCSI in both ESXi servers.

Verify

Access storage, and check Hosts tab, both ESXi servers should be in the list.

Network

Add VMkernel Network Adapter with vMotion service, can be on an existing standard switch.

References

VMware Tutorial No.45 | VMware vMotion Step by Step |vMotion in VMware 6.7 |vSphere vMotion GOVMLAB

Unable to boot from USB in VMware Fusion

Unable to boot from USB in VMware Fusion

Fusion reports error, and it can not connect to USB drive to boot.

Fusion does not support USB adapters for connecting displays to your virtual machines.

Note: I haven't tried to change UEFI mode to BIOS mode, maybe this is the cause.

References

Unable to connect a USB device to a virtual machine (2118442)
USB Device not detected by the virtual machine (57195)
Configuring the USB Controller and Connecting USB Devices

ESXi with UEFI iSCSI boot on Raspberry Pi

ESXi with UEFI iSCSI boot on Raspberry Pi

Steps

Setup iSCSI disk

  • Create iSCSI Target and LUN in Synology
  • Download RPi4 UEFI Firmware, and unzip it to a SD card which formatted as FAT32 partition
  • Boot from the SD card, and perform following tasks using UEFI menu
    • Disable 3G memory limit
      Device Manager => Raspberry Pi Configuration => Advanced Configuration => Limit RAM to 3 GB)
    • Create device which mapped to iSCSI target
      Device Manager => iSCSI Configuration => Add an Attempt

After Attempt 1 created, Reset (restart) Raspberry Pi. Now, in Boot Manager, should see UEFI SYNOLOGY iSCSI Storage.

Setup boot order

  • Change Boot order and let it before other network boot, otherwise, there will be too much waiting time.

Prepare ESXi installation disk

  • Download and flush VMware-VMvisor-Installer-7.0.0-xxxx.aarch64.iso to USB device

Install ESXi

  • Reset (Reboot) again, and in UEFI menu select boot from USB device
  • Then perform ESXi installation, and select iSCSI disk as target

After installation completed, take out ESXi installation USB, then another reset is required,

Configure ESXi

  • Boot into iSCSI
  • Change ESXi name, etc.

Troubleshooting

Unable to see iSCSI disk in Boot Manager

Most likely is the iSCSI configuration wrong.

  • Check iSCSI Target Name
  • Check iSCSI Target IP
  • Check iSCSI LUN ID (This issue costed me a few hours)
  • Check User/Password

Synchronous Exception

After installation complete, suddenly cannot boot into any destination, and just show error Synchronous Exception.

End up, I have to recopy UEFI image into micro SD card, redo iSCSI configuration. Luckily the iSCSI has no issue, which contains installed ESXi image.

References

Boot ESXi-Arm Fling on a Raspberry Pi 4 Using ISCSI
Raspberry Pi 4 UEFI Firmware Images
ESXi on Arm 10/22 更新
Raspberry Pi 4 Model B 8GBにESXi for ARM 7.0.0をインストール
Synchronous Exception at 0x00000000371013D8 #97