Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
hypervisor:fromesxiws [2012/09/27 15:56]
giancarlo
hypervisor:fromesxiws [2012/09/27 16:18]
giancarlo
Line 2: Line 2:
 UNDER REVISION ! UNDER REVISION !
  
-In windows on esxi:+**In windows on esxi:**
  
   * Remove vmware-tools from guest OS (by Control Panel) and reboot   * Remove vmware-tools from guest OS (by Control Panel) and reboot
Line 8: Line 8:
  
 <WRAP prewrap center> <WRAP prewrap center>
-<code>+<code text mergeide.reg>
 Windows Registry Editor Version 5.00 Windows Registry Editor Version 5.00
  
Line 175: Line 175:
 </WRAP> </WRAP>
  
-Create virtual machine flat disk backup on esxi hypervisor. +  * shutdown windows os guest 
-E.g. by ghettoVCB script +  * Create virtual machine flat disk backup on esxi hypervisor. E.g. by ghettoVCB script 
  
-<WRAP prewrap center> +**On KVM server**
-<code> +
-#ghettoVCB.sh -f vmltemp -c vmspec +
-</code> +
-</WRAP>+
  
-where vmltemp +  * Copy virtual flat disk from esxi to local disk.
- +
-<WRAP prewrap center> +
-<code> +
-Aserver +
-</code> +
-</WRAP> +
- +
-and vmspec/Aserver +
- +
-<WRAP prewrap center> +
-<code> +
-VM_BACKUP_VOLUME=/vmfs/volumes/Backup +
-DISK_BACKUP_FORMAT=zeroedthick +
-VM_BACKUP_ROTATION_COUNT=1 +
-POWER_VM_DOWN_BEFORE_BACKUP=0 +
-ENABLE_HARD_POWER_OFF=0 +
-ITER_TO_WAIT_SHUTDOWN=4 +
-POWER_DOWN_TIMEOUT=5 +
-SNAPSHOT_TIMEOUT=15 +
-ENABLE_COMPRESSION=0 +
-ADAPTER_FORMAT=lsilogic +
-VM_SNAPSHOT_MEMORY=0 +
-VM_SNAPSHOT_QUIESCE=1 +
-VMDK_FILES_TO_BACKUP=all +
-EMAIL_LOG=0 +
-</code> +
-</WRAP> +
- +
-Prepare KVM storage for copy virtual flat disk. +
- +
-<WRAP prewrap center> +
-<code> +
-# lvcreate -L 20G -n vmware kvm2 +
-# mkdir /vmware +
-# mkfs.ext4 /dev/kvm2/vmware +
-# mount /dev/kvm2/vmware /vmware +
-</code> +
-</WRAP> +
- +
-Copy virtual flat disk to local disk.+
  
 <WRAP prewrap center> <WRAP prewrap center>
 <code> <code>
 # cd /vmware/ # cd /vmware/
-# mkdir Aserver +# mkdir Wserver 
-# cd Aserver+# cd Wserver
-# scp root@EsxiHypervisor.my.org:/vmfs/volumes/Backup/Aserver/Aserver-2012-09-02_12-00-01/Aserver_1-flat.vmdk ./+# scp root@EsxiHypervisor.my.org:/vmfs/volumes/Backup/Wserver/Wserver-2012-09-02_12-00-01/Wserver-flat.vmdk ./
 </code> </code>
 </WRAP> </WRAP>
  
-To verify it is a flat disk:+  * Verify it is a flat disk:
  
 <WRAP prewrap center> <WRAP prewrap center>
 <code> <code>
-#file Aserver_1-flat.vmdk+#file Wserver-flat.vmdk
  
-/vmware/Aserver/Aserver_1-flat.vmdk: x86 boot sector; GRand Unified Bootloader, stage1 version 0x3, stage2 address 0x2000, stage2 segment 0x200; partition 1: ID=0x83, active, starthead 1, startsector 63, 15952482 sectors; partition 2: ID=0x5, starthead 0, startsector 15952545, 819315 sectors, code offset 0x48+/vmware/Wserver/Wserver-flat.vmdk: x86 boot sector...
 </code> </code>
 </WRAP> </WRAP>
  
-**For virtual machine file based:**+  Create virtual disk (LVM based)
  
 <WRAP prewrap center> <WRAP prewrap center>
 <code> <code>
-#qemu-img convert Aserver_1-flat.vmdk -O qcow2 Aserver_1-flat.qcow2 +#ls -l Wserver-flat.vmdk
-</code> +
-</WRAP>+
  
-**For virtual machine LVM based:**+-rw------- 1 root root 8589934592 Sep  3 13:49 /vmware/Wserver/Wserver-flat.vmdk
  
-<WRAP prewrap center> +#lvcreate -L 8589934592B -n wserver iscsi2 
-<code> +#dd if=Wserver-flat.vmdk | pv -s 8G | dd of=/dev/iscsi2/wserver
-#ls -l Aserver_1-flat.vmdk +
- +
--rw------- 1 root root 8589934592 Sep  3 13:49 /vmware/Aserver/Aserver_1-flat.vmdk +
- +
-#lvcreate -L 8589934592B -n aserver iscsi2 +
-#dd if=Aserver_1-flat.vmdk | pv -s 8G | dd of=/dev/iscsi2/aserver+
 </code> </code>
 </WRAP> </WRAP>
  
-Define new virtual machine using this virtual disk (qcow2 or LVM)+  * Define new virtual machine using this virtual disk as IDE, a dummy disk as VirtIO, a CD ISO from [[http://www.linux-kvm.org/page/WindowsGuestDrivers/Download_Drivers|KVM project wiki downloads]] and network card as VirtIO. 
 +  * Start virtual machine 
 +  * Install requested drivers from CD 
 +  * Shutdown 
 +  * Change main virtual disk to VirtIO and remove dummy disk 
 +  * Start virtual machine
  
-<WRAP prewrap center> 
-<code> 
-#virsh dumpxml aserver 
-</code> 
-</WRAP> 
-<WRAP prewrap center> 
-<code xml> 
-<domain type='kvm'> 
-  <name>aserver</name> 
-  <uuid>e0261d4a-ac1e-0dba-1aec-8b945102b1cf</uuid> 
-  <memory>524288</memory> 
-  <currentMemory>524288</currentMemory> 
-  <vcpu>1</vcpu> 
-  <os> 
-    <type arch='x86_64' machine='pc-1.0'>hvm</type> 
-    <boot dev='hd'/> 
-  </os> 
-  <features> 
-    <acpi/> 
-    <apic/> 
-    <pae/> 
-  </features> 
-  <clock offset='utc'/> 
-  <on_poweroff>destroy</on_poweroff> 
-  <on_reboot>restart</on_reboot> 
-  <on_crash>restart</on_crash> 
-  <devices> 
-    <emulator>/usr/bin/kvm</emulator> 
-    <disk type='block' device='disk'> 
-      <driver name='qemu' type='raw'/> 
-      <source dev='/dev/iscsi2/aserver'/> 
-      <target dev='hda' bus='ide'/> 
-      <address type='drive' controller='0' bus='0' unit='0'/> 
-    </disk> 
-    <controller type='ide' index='0'> 
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> 
-    </controller> 
-    <interface type='bridge'> 
-      <mac address='12:14:10:1b:11:16'/> 
-      <source bridge='br2'/> 
-      <model type='virtio'/> 
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> 
-    </interface> 
-    <serial type='pty'> 
-      <target port='0'/> 
-    </serial> 
-    <console type='pty'> 
-      <target type='serial' port='0'/> 
-    </console> 
-    <input type='mouse' bus='ps2'/> 
-    <graphics type='vnc' port='-1' autoport='yes'/> 
-    <video> 
-      <model type='cirrus' vram='9216' heads='1'/> 
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> 
-    </video> 
-    <memballoon model='virtio'> 
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> 
-    </memballoon> 
-  </devices> 
-</domain> 
  
-</code> 
-</WRAP> 
  
 <WRAP right 35% rightalign lo> <WRAP right 35% rightalign lo>
 
 
hypervisor/fromesxiws.txt · Last modified: 2012/11/15 12:37 by giancarlo

Developers: CNR IRCrES IT Office and Library
Giancarlo Birello (giancarlo.birello _@_ ircres.cnr.it) and Anna Perin (anna.perin _@_ ircres.cnr.it)
DigiBess is licensed under: Creative Commons License
Recent changes RSS feed Creative Commons License Valid XHTML 1.0 Valid CSS Driven by DokuWiki
Drupal Garland Theme for Dokuwiki