{"id":5,"date":"2011-06-05T12:06:59","date_gmt":"2011-06-05T08:06:59","guid":{"rendered":"http:\/\/xxxl.co.za\/?p=5"},"modified":"2023-03-16T14:45:11","modified_gmt":"2023-03-16T10:45:11","slug":"2003","status":"publish","type":"post","link":"https:\/\/xxxl.co.za\/?p=5","title":{"rendered":"Xen based Windows 2003 Server VM"},"content":{"rendered":"<p>Recently i had to deploy a win2k3 server on\u00a0 Xen.<\/p>\n<p>I had a few problems along the way.<br \/>\n1. Had a dog-slow old Centos 5.4 based server with several vm&#8217;s running on it.<br \/>\n2. Had to relocate one image to a new faster server via disk backup because of various reasons.<br \/>\n3. Had to import an existing Xen production image to the new server.<br \/>\n4. The new faster Centos 5.6 based server was a standard install and not installed with Xen.<\/p>\n<p>So here goes:<\/p>\n<p><strong>Shutdown host on existing server.<\/strong><br \/>\ncommand: virsh shutdown mymachine (mymachine the host to be moved)<\/p>\n<p>Backup to external drive witch is formatted with ntfs.<br \/>\nFor this to work i needed fuse and fuse-ntfs.<\/p>\n<p><strong>Install rpmforge<\/strong><br \/>\nrpm &#8211;import http:\/\/apt.sw.be\/RPM-GPG-KEY.dag.txt<br \/>\nrpm -i rpmforge-release-0.5.2-2.el5.rf.*.rpm<br \/>\nyum install fuse fuse-ntfs-3g dkms dkms-fuse<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Backup existing image<\/strong><br \/>\ncp -v \/var\/lib\/xen\/images\/mymachine.img \/mnt\/exthdd\/<br \/>\numount \/mnt\/exthdd<\/p>\n<p><strong>Change existing Centos install to Xen host.<\/strong><\/p>\n<p>yum update<strong><br \/>\n<\/strong>reboot if newer kernel was installed<strong><br \/>\n<\/strong><\/p>\n<p><strong>Install Xen<\/strong><br \/>\nyum groupinstall virtualization<br \/>\n<code>chkconfig xend on<\/code><br \/>\n<code>chkconfig libvirtd on<\/code><\/p>\n<p>After reboot, edit the grub configuration file to make sure the system boots with xen based kernel.<br \/>\nvi \/boot\/grub\/grub.conf and set the xen based kernal as the default. In this case 1<\/p>\n<blockquote><p>##############################################################<br \/>\n# grub.conf generated by anaconda<br \/>\n#<br \/>\n# Note that you do not have to rerun grub after making changes to this file<br \/>\n# NOTICE:\u00a0 You have a \/boot partition.\u00a0 This means that<br \/>\n#\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 all kernel and initrd paths are relative to \/boot\/, eg.<br \/>\n#\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 root (hd0,0)<br \/>\n#\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 kernel \/vmlinuz-version ro root=\/dev\/sda3<br \/>\n#\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 initrd \/initrd-version.img<br \/>\n#boot=\/dev\/sda<br \/>\ndefault=1<br \/>\ntimeout=5<br \/>\nsplashimage=(hd0,0)\/grub\/splash.xpm.gz<br \/>\nhiddenmenu<br \/>\ntitle CentOS (2.6.18-238.12.1.el5)<br \/>\nroot (hd0,0)<br \/>\nkernel \/vmlinuz-2.6.18-238.12.1.el5 ro root=LABEL=\/<br \/>\ninitrd \/initrd-2.6.18-238.12.1.el5.img<br \/>\ntitle CentOS (2.6.18-238.12.1.el5xen)<br \/>\nroot (hd0,0)<br \/>\nkernel \/xen.gz-2.6.18-238.12.1.el5<br \/>\nmodule \/vmlinuz-2.6.18-238.12.1.el5xen ro root=LABEL=\/<br \/>\nmodule \/initrd-2.6.18-238.12.1.el5xen.img<br \/>\ntitle CentOS (2.6.18-238.9.1.el5xen)<br \/>\nroot (hd0,0)<br \/>\nkernel \/xen.gz-2.6.18-238.9.1.el5<br \/>\nmodule \/vmlinuz-2.6.18-238.9.1.el5xen ro root=LABEL=\/<br \/>\nmodule \/initrd-2.6.18-238.9.1.el5xen.img<br \/>\ntitle CentOS (2.6.18-238.9.1.el5)<br \/>\nroot (hd0,0)<br \/>\nkernel \/vmlinuz-2.6.18-238.9.1.el5 ro root=LABEL=\/<br \/>\ninitrd \/initrd-2.6.18-238.9.1.el5.img<br \/>\ntitle CentOS (2.6.18-194.32.1.el5)<br \/>\nroot (hd0,0)<br \/>\nkernel \/vmlinuz-2.6.18-194.32.1.el5 ro root=LABEL=\/<br \/>\ninitrd \/initrd-2.6.18-194.32.1.el5.img<br \/>\n##############################################################<\/p><\/blockquote>\n<p>Reboot<\/p>\n<p><strong>Check if you are running xen kernel.<\/strong><br \/>\nLinux myserver 2.6.18-238.12.1.el5xen #1 SMP Tue May 31 14:02:29 EDT 2011 x86_64 x86_64 x86_64\u00a0 GNU\/Linux<\/p>\n<p>Test host disk performance.<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>Test 1:<\/strong><\/span><br \/>\n#hdparm -tT \/dev\/sda1<\/p>\n<p>\/dev\/sda1:<br \/>\nTiming cached reads:\u00a0\u00a0 3696 MB in\u00a0 2.00 seconds = 1847.92 MB\/sec<br \/>\nTiming buffered disk reads:\u00a0 100 MB in\u00a0 1.19 seconds =\u00a0 84.15 MB\/sec<\/p>\n<p>Pretty descent.<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>Test 2:<\/strong><\/span><br \/>\n#dd if=\/dev\/zero of=.\/test1024M bs=1024k count=1024 conv=fsync<br \/>\n1024+0 records in<br \/>\n1024+0 records out<br \/>\n1073741824 bytes (1.1 GB) copied, 16.5377 seconds, 64.9 MB\/s<\/p>\n<p>Also pretty descent.<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>Restore image from backup on new server:<\/strong><\/span><\/p>\n<p>cp -v mymachine.img \/var\/lib\/libvirt\/images\/<\/p>\n<p>Import existing disk image with Virtual Machine Manager. I used VMM with Ubuntu Maverick Meerkat.<\/p>\n<p>The Windows 2003 server was now up and running after assigning 1 CPU and 1024Mb of ram to the Virtual Machine with VM Manager.<\/p>\n<p>Performance was however still sluggish with high (up to 60.5%wa) in top. Write speed was terrible to say the least.<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>Found a post on another forum telling me to disable ACPI.<\/strong><\/span><\/p>\n<blockquote><p>&#8220;If your Windows installation is set to use ACPI (this is the default), kvm can be quite slow or not work at all. This is due to Windows heavily using a register that has a very large virtualization penalty.<\/p>\n<p>Fortunately, there is a simple workaround available: disable ACPI support in Windows. The procedure for doing this is:<\/p>\n<p>Select \u201cMy Computer\u201d with the right mouse button.<br \/>\nSelect \u201cProperties\u201d.<br \/>\nChoose the \u201cHardware\u201d tab.<br \/>\nClick the \u201cDevice Manager\u201d button.<br \/>\nSelect the entry under \u201cComputer\u201d with the right mouse button. If it says \u201cStandard PC\u201d, then there\u2019s no need to do anything.<br \/>\nSelect \u201cProperties\u201d<br \/>\nClick the \u201cUpdate Driver\u201d button.<br \/>\nChoose \u201cNo, not this time\u201d and click \u201cNext\u201d.<br \/>\nChoose \u201cInstall from a list\u201d and click \u201cNext\u201d.<br \/>\nChoose \u201cDon\u2019t search\u201d and click \u201cNext\u201d.<br \/>\nClick \u201cNext\u201d.<br \/>\nChoose \u201cStandard PC\u201d and click \u201cNext\u201d.<br \/>\nContinue clicking \u201cNext\u201d and reboot the virtual machine.<br \/>\nIf you\u2019re installing Windows XP\/2000, you can get it to use the Standard PC HAL by pressing F7 when it asks for drivers (\u201dPress F6 for\u2026\u201d), there is no visual indication. If you would rather select the right HAL from a list visually then press F5 instead.&#8221;<\/p><\/blockquote>\n<p><strong>BTW:<\/strong> Thanx for the info testy http:\/\/www.peakscale.com\/archives\/gridvm\/xen-vs-kvm\/<\/p>\n<p>Then, i installed the Xen drivers found at http:\/\/wiki.xensource.com\/xenwiki\/XenWindowsGplPv<br \/>\nThis case i used: http:\/\/www.meadowcourt.org\/downloads\/gplpv_2003x32_0.11.0.238.msi as i was using a 32 bit version of Win2k3.<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>Results:<\/strong><\/span><br \/>\nLocal Backup on the Win2k3 VM using Uranium Backup free before migration:\u00a0 &#8220;Time taken for last execution: 6 Hours, 39 Minutes, 35 Seconds&#8221;<\/p>\n<p>Local Backup on the Win2k3 VM using Uranium Backup free after migration, disabling ACPI and installing Xen drivers:\u00a0 &#8220;Time taken for last execution: 0 Hours, 4 Minutes, 53 Seconds&#8221;<\/p>\n<p>Size ~ 4Gig<\/p>\n<p>References:<br \/>\nhttp:\/\/southbrain.com\/south\/2009\/08\/xen-drivers-for-windows-2003-m.html<br \/>\nhttp:\/\/blog.surfulater.com\/2007\/01\/10\/xen-and-the-art-of-virtualization\/<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently i had to deploy a win2k3 server on\u00a0 Xen. I had a few problems along the way. 1. Had a dog-slow old Centos 5.4 based server with several vm&#8217;s running on it. 2. Had to relocate one image to a new faster server via disk backup because of various reasons. 3. Had to import &hellip; <a href=\"https:\/\/xxxl.co.za\/?p=5\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Xen based Windows 2003 Server VM<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[3],"tags":[],"class_list":["post-5","post","type-post","status-publish","format-standard","hentry","category-howtos"],"_links":{"self":[{"href":"https:\/\/xxxl.co.za\/index.php?rest_route=\/wp\/v2\/posts\/5","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xxxl.co.za\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xxxl.co.za\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xxxl.co.za\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xxxl.co.za\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5"}],"version-history":[{"count":13,"href":"https:\/\/xxxl.co.za\/index.php?rest_route=\/wp\/v2\/posts\/5\/revisions"}],"predecessor-version":[{"id":367,"href":"https:\/\/xxxl.co.za\/index.php?rest_route=\/wp\/v2\/posts\/5\/revisions\/367"}],"wp:attachment":[{"href":"https:\/\/xxxl.co.za\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xxxl.co.za\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xxxl.co.za\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}