Changes

From Amahi Wiki
Jump to: navigation, search
no edit summary
You only need to do this for slightly better resource management, like attaching more than three VDI images. This is only possible if your boot partition is EXT3.
First you should copy down the defaults from grub2 on the Amahi VM. Go to /boot/grub2 and read grub.cfg. What you are looking for is the line that specifies your default linux boot option. Both the location and all of the kernel options. It might look like this:
{|style="width: 95%; margin-left: 10px; border-collapse: collapse; border-width: 1px; border-style: solid; border-color: #aaa"
!style="color:#777; background-color:#dfd;text-align:left"|{{{lang|{{{2|bash}}}}}} code
|-
|{{#tag:syntaxhighlight|​{{{Code|vi /boot/grub2/grub.cfg}}}​|lang={{{lang|{{{2|bash}}}}}}|enclose=none}}
|}
<!--{{#tag:syntaxhighlight|{{{1}}}}}-->
 
 
What you are looking for is the line that specifies your default linux boot option. Both the location and all of the kernel options. It might look like this:
 
<pre>
linux /boot/vmlinuz-3.10.5-201.fc19.x86_64 root=UUID=42e4c7e4-f260-4462-ad9c-c3f375e3a967 ro rd.md=0 rd.lvm=0 rd.dm=0 vconsole.keymap=us rd.luks=0 vconsole.font=latarcyrheb-sun16 rhgb quiet
</pre>
You also need the path for initrd. It might look like this:
 
<pre>
initrd /boot/initramfs-3.10.5-201.fc19.x86_64.img
</pre>
Then SSH in to the XenServer host and identify the name of the VM you wish to convert to PV mode.
 You will need the name of the VM not the UUID. Now download the makepv.sh script. download this [https://www.cetic.be/IMG/zip/makepv.sh.zip makepv.sh] script.
{|style="width: 95%; margin-left: 10px; border-collapse: collapse; border-width: 1px; border-style: solid; border-color: #aaa"
<!--{{#tag:syntaxhighlight|{{{1}}}}}-->
It This script will:<ul><li>change the bootloader from HVM to PV mode<li>prompt for kernel path <i>(/boot/vmlinuz-3.10.5-201.fc19.x86_64),</i><li>prompt for kernel parameters <i>(root=UUID=42e4c7e4-f260-4462-ad9c-c3f375e3a967 ro rd.md=0 rd.lvm=0 rd.dm=0 vconsole.keymap=us rd.luks=0 vconsole.font=latarcyrheb-sun16 rhgb quiet)</i><li>prompt for initrd path <i>(/boot/initramfs-3.10.5-201.fc19.x86_64.img)</i><li>convert VM hard drive</ul>
Once you have the script downloaded and unpacked make it executable and run it. {|style="width: 95%; margin-left: 10px; border-collapse: collapse; border-width: 1px; border-style: solid; border-color: #aaa"!style="color:#777; background-color:#dfd;text-align:left"|{{{lang|{{{2|bash}}}}}} code|-|{{#tag:syntaxhighlight|​{{{Code|chmod +x makepv.sh./makepv.sh <vm name>}}}​|lang={{{lang|{{{2|bash}}}}}}|enclose=none}}|}<!--{{#tag:syntaxhighlight|{{{1}}}}}-->
<h3>Install XenServer Tools for linux</h3>
First Use XenCenter Management console to insert the xs-tools.iso in the DVD drive. Then SSH into the Amahi VM (the console will not work until these tools are installed), and execute these the following commands. If you kept your guest VM in HVM mode:{|style="width: 95%; margin-left: 10px; border-collapse: collapse; border-width: 1px; border-style: solid; border-color: #aaa"!style="color:#777; background-color:#dfd;text-align:left"|{{{lang|{{{2|bash}}}}}} code|-|{{#tag:syntaxhighlight|​{{{Code|mkdir /mnt/xs-toolsmount /dev/cdrom /mnt/xs-tools/mnt/xs-tools/Linux/install.shreboot}}}​|lang={{{lang|{{{2|bash}}}}}}|enclose=none}}|}<!--{{#tag:syntaxhighlight|{{{1}}}}}-->  If you converted your guest VM into PV mode;{|style="width: 95%; margin-left: 10px; border-collapse: collapse; border-width: 1px; border-style: solid; border-color: #aaa"!style="color:#777; background-color:#dfd;text-align:left"|{{{lang|{{{2|bash}}}}}} code|-|{{#tag:syntaxhighlight|​{{{Code|mkdir /mnt/xs-toolsmount /dev/disk/by-label/XenServer\\x20Tools /mnt/xs-tools/)/mnt/xs-tools/Linux/install.shreboot}}}​|lang={{{lang|{{{2|bash}}}}}}|enclose=none}}|}<!--{{#tag:syntaxhighlight|{{{1}}}}}-->
# mkdir /mnt/xs-tools
# mount /dev/cdrom /mnt/xs-tools
or mount /dev/disk/by-label/XenServer\\x20Tools /mnt/xs-tools/)
# bash /mnt/xs-tools/Linux/install.sh
# reboot
<hr>