meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
vm:proxmox:vm [2020/05/11 17:12] niziakvm:proxmox:kvm [2022/12/31 17:25] (current) niziak
Line 1: Line 1:
-====== Proxmox VM ======+====== KVM ====== 
 + 
 +===== CPU model ===== 
 + 
 +[[https://qemu-project.gitlab.io/qemu/system/qemu-cpu-models.html|QEMU / KVM CPU model configuration]] 
 + 
 +===== AES ===== 
 + 
 +Enable AES in CPU flags. Default KVM64 CPU doesn't expose AES flag. 
 +Simple openssl benchmark: 
 +<code bash> 
 +openssl speed -evp aes-128-cbc aes-256-cbc aes-256-ecb 
 + 
 +# Without AES 
 +type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes 
 +aes-256 cbc     185216.65k   190818.37k   191588.35k   193247.23k   193489.58k   193353.05k 
 +aes-128-cbc     220375.57k   245515.09k   249103.70k   254411.43k   255770.62k   255393.79k 
 + 
 + 
 +# With AES 
 +type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes 
 +aes-256 cbc     183729.40k   191020.12k   190906.71k   193176.58k   193333.93k   194065.47k 
 +aes-128-cbc     587427.84k  1272103.38k  1317980.93k  1329665.71k  1332060.16k  1332663.64k 
 +</code> 
  
-===== Migrate Windows 7 Virtual Box ===== 
  
-  * uninstall Virtual Box Guest Additions 
-  * Download and run registry file: [[https://pve.proxmox.com/wiki/File:Mergeide.zip|Mergeide.zip]] 
-  * Restart VM 
-  * ''sdelete -z c: d: e:'' 
-  * Enable ''ClearPageFileAtShutdown.reg'' 
-  * Shutdown VM 
  
-Now two methods are possible: 
 ==== DRAFT ==== ==== DRAFT ====
-Fastest method: create Proxmox machine and import vbox hard disc to newly created Proxmox VM.+Fastest method: create Proxmox machine and import vbox hard discs to newly created Proxmox VM.
  
 No VirtualBox preparation, no IDE drivers. Just import discs to new machine. No VirtualBox preparation, no IDE drivers. Just import discs to new machine.
Line 23: Line 39:
     * As QCOW2 files on every file storage: <code bash>qm importdisk 701 WIN7_C.vdi local -format qcow2</code>     * As QCOW2 files on every file storage: <code bash>qm importdisk 701 WIN7_C.vdi local -format qcow2</code>
   * Connect new discs into machine:   * Connect new discs into machine:
-    * <code bash>qm set 701 --scsi<N> local-zfs:vm-701-disk-<N>,cache=writeback,discard=on,size=64G</code>+    * <code bash>qm set 701 --scsi<N> local-zfs:vm-701-disk-<N>,discard=on,size=64G</code>
     * NOTE: ''discard=on'' should be enabled for thin provisioned storage to reclaim unused space     * NOTE: ''discard=on'' should be enabled for thin provisioned storage to reclaim unused space
- +  * Edit config file to change just connected discs from SCSI to IDE. Remember to update CDROM IDE number to do not be in conflict with new discs.
-  * Edit config file to change just connected discs from SCSI to IDE. Remember to update cd-rom ide number to do not be in conflict with new discs.+
     * <code bash>sed -i 's/scsi/ide/g' /etc/pve/qemu-server/702.conf</code>     * <code bash>sed -i 's/scsi/ide/g' /etc/pve/qemu-server/702.conf</code>
     * <file | /etc/pve/qemu-server/702.conf>     * <file | /etc/pve/qemu-server/702.conf>
-ide0: local-zfs:vm-702-disk-1,cache=writeback,discard=on,size=64G +ide0: local-zfs:vm-702-disk-1,discard=on,size=64G 
-ide1: local-zfs:vm-702-disk-2,cache=writeback,discard=on,size=64g +ide1: local-zfs:vm-702-disk-2,discard=on,size=64g 
-ide2: local-zfs:vm-702-disk-3,cache=writeback,discard=on,size=8G+ide2: local-zfs:vm-702-disk-3,discard=on,size=8G
 ide3: nas326-ISOs:iso/virtio-win-0.1.173.iso,media=cdrom,size=384670K ide3: nas326-ISOs:iso/virtio-win-0.1.173.iso,media=cdrom,size=384670K
-scsi0: local-zfs:vm-702-disk-0,cache=writeback,discard=on,size=32G+scsi0: local-zfs:vm-702-disk-0,discard=on,size=32G
 scsihw: virtio-scsi-pci scsihw: virtio-scsi-pci
 </file> </file>
   * Setup correct boot order   * Setup correct boot order
 +  * Start Windows 10 
 +    * Windows should load correctly 
 +    * Go to ''Device Manager'' and install missing drivers. See [[vm:proxmox:kvm:virtio_drivers|Virtio drivers]] 
 +    * Shutdown system 
 +  * Edit config file to change IDE discs to SCSI
   * Setup correct boot order   * Setup correct boot order
   * Start Windows 10   * Start Windows 10
 +  * ERROR: Windows stuck during booting when VirtIO SCSI driver.
 +    * It is known KVM issue with VirtIO SCSI driver when more than 1 CPU core is used! 
 +       * [[https://bugzilla.redhat.com/show_bug.cgi?id=1670673]]
 +       * Driver version 61.77.104.17200 2019-06-07 from virtio iso v 1.1.172       
 +       * Update to latest 61.80.104.17300 2019-08-12 (not stable) virtio iso v1.1.173 doesn't help
 +    * Changing CPU to 1 core solves problem.
 +    * It works with odd number of cores (1,3,5)
 +
 +
 +
     * Windows will crash (becasue storage driver is not supported). Windows will reboot into repair mode.     * Windows will crash (becasue storage driver is not supported). Windows will reboot into repair mode.
     * Provide virtio drivers in virtual cd-rom (latest 1.1.173 was used)     * Provide virtio drivers in virtual cd-rom (latest 1.1.173 was used)
Line 52: Line 81:
   * Enable QEMU Guest Agent   * Enable QEMU Guest Agent
   * Boot Windows, go to ''Device Manager'' and install missing drivers:   * Boot Windows, go to ''Device Manager'' and install missing drivers:
-    * PCI Simple Communication Controller ''PCI\VEN1AF4&DEV_1003'' --> Virtio console ''vioserial'' +...
-    * Red Hat VirtIO SCSI pass-through controller ''vioscsi\w7\amd64'' +
-    * ''NetKVM\w7\amd64'' +
-    * (''PCI\VEN_1AF4&DEV_1002'') --> VirtIO Balloon Driver ''Balloon\w7\amd64'' +
-    * vm generation id (''ACPI/QEMUVGID'') ''''+
   * Shutdown machine   * Shutdown machine
   * Switch disc controller from IDE to SCSI. Edit ''/etc/pve/qemu-server/701.conf''   * Switch disc controller from IDE to SCSI. Edit ''/etc/pve/qemu-server/701.conf''
Line 62: Line 87:
  
 sed -i 's/ide/scsi/g' /etc/pve/qemu-server/701.conf sed -i 's/ide/scsi/g' /etc/pve/qemu-server/701.conf
- 
- 
-==== Importing only disc ==== 
-Fastest method: create Proxmox machine and import vbox hard disc to newly created Proxmox VM. 
-  * Create new Proxmox machine with similar parameters to old one 
-    * [[https://pve.proxmox.com/wiki/Windows_10_guest_best_practices|Windows 10 guest best practices]] 
-    * Remove created Hard Disc (scsi0) 
-  * Import disc images (repeat for all VDI discs) 
-    * As RAW images with all benefits (compression, thin provisioning, snapshots) of ''local-zfs'' storage: <code bash>qm importdisk 701 WIN7_C.vdi local-zfs</code> 
-      * 21743 MB VDI compacted file occupied 15,2G on ZFS with compression ratio 1.24x 
-    * As QCOW2 files on every file storage: <code bash>qm importdisk 701 WIN7_C.vdi local -format qcow2</code> 
-  * Connect new discs into machine: 
-    * <code bash>qm set 701 --scsi<N> local-zfs:vm-701-disk-<N>,cache=writeback,discard=on,size=64G</code> 
-    * NOTE: ''discard=on'' should be enabled for thin provisioned storage to reclaim unused space 
-  * Switch SCSI to IDE: <code bash>sed -i 's/scsi/ide/g' /etc/pve/qemu-server/701.conf</code> 
-    * Manually correct numbering conflict with CD-ROM ide drive 
-    * Setup correct boot order 
-  * Add one dummy (small size) hard disc to SCSI controller 
-  * Enable QEMU Guest Agent 
-  * Boot Windows, go to ''Device Manager'' and install missing drivers: 
-    * PCI Simple Communication Controller ''PCI\VEN1AF4&DEV_1003'' --> Virtio console ''vioserial'' 
-    * Red Hat VirtIO SCSI pass-through controller ''vioscsi\w7\amd64'' 
-    * ''NetKVM\w7\amd64'' 
-    * (''PCI\VEN_1AF4&DEV_1002'') --> VirtIO Balloon Driver ''Balloon\w7\amd64'' 
-    * vm generation id (''ACPI/QEMUVGID'') '''' 
-  * Shutdown machine 
-  * Switch disc controller from IDE to SCSI. Edit ''/etc/pve/qemu-server/701.conf'' 
-    * Setup correct boot order 
- 
-sed -i 's/ide/scsi/g' /etc/pve/qemu-server/701.conf 
- 
-==== NOT WORKING: Importing OVA file ==== 
-  * **Very slow method**, exporting OVA needs to copy all discs into exported and well compressed file. 
-  * In VirtualBox choose "**File**" --> **"Export Appliance"** 
-    * select to export all network cards and MAC addresses 
-  * Proxmox cannot import OVA files directly. Please unpack it with command <code bash>tar -xvf WIN7.ova</code> 
-    * After unpacking, manifest file .ovf will be available. 
-  * <code bash>qm importovf 701 ./WIN7.ovf local-zfs --dryrun --format qcow2</code> 
-    * WARNING: <code>warning: unable to parse the VM name in this OVF manifest, generating a default value</code> 
-    * Create account/Login to VMWare page and download [[https://my.vmware.com/group/vmware/get-download?downloadGroup=OVFTOOL440|ovftool]] 
- 
-T.B.C without success, more similar issues described here: 
-  * [[http://www.baconapplications.com/export-a-virtualbox-machine-to-vmware/|Export a VirtualBox Machine to VMware]] 
-  * [[https://www.maketecheasier.com/convert-virtual-machines-vmware-virtualbox/|How to Convert Virtual Machines from VMware to VirtualBox and Vice Versa]] 
- 
-