0
0 0 0 0 0 0
0
0 0
Message
0ID:
0PW:
0forget pwd? | Join now
0
0
0
Online: Member 2 Guest 78
0
0
0


0
MSN: test104tw@hotmail.com
0
0
  • CISA Q & A 680 Questions. (2/1/2019)
  • ISC2 CISSP Q & A 1367 Questions. (1/31/2019)
  • CISCO 300-101 Q & A 579 questions. (1/29/2019)
  • CISCO 300-115 Q & A 391 questions. (1/28/2019)
  • CISCO 300-135 Q & A 213 questions. (1/28/2019)
  • Microsoft 70-740 Q & A 165 Questions. (1/24/2019)
  • Microsoft 70-411 Q & A 301 Questions. (1/18/2019)
  • Microsoft 70-333 Q & A 67 Questions. (12/25/2018)
  • Microsoft 70-332 Q & A 97 Questions. (12/19/2018)
  • Microsoft 70-414 Q & A 160 Questions. (12/7/2018)
  • Microsoft 70-764 Q & A 100 Questions. (12/5/2018)
  • Microsoft 70-743 Q & A 134 Questions. (12/3/2018)
  • Microsoft 70-743 Q & A 145 Questions. (11/27/2018)
  • Microsoft 70-765 Q & A 155 Questions. (11/22/2018)
  • EC-Council 312-49 V9 Q & A 517 Questions. (10/30/2018)
  • CWNP CWNA107 Q & A 192 Questions. (10/25/2018)
  • ISC2 CISSP Q & A 1175 Questions. (10/12/2018)
  • ISC CSSLP Q & A 210 Questions. (10/12/2018)
  • ISC GAP Q & A 235 Questions. (10/12/2018)
  • Microsoft 70-461 Q & A 304 Questions. (10/11/2018)
0
0
0
Name:
E-mail:
Telephone:
CheckCode: 0

Suggestions & Questions:

 

0
0
0
::Visitors::
001659717

 

 

Booting a Xen virtual machine from CD-ROM or DVD[5/25/2010]
[TextSizeBig Middle Small][Print]
If something goes wrong with one of your Xen virtual machines, you might want to boot it from the installation disk to run the rescue program. But, booting a Xen virtual machine from an optical disk is not that easy (you can't just connect the disk and expect the machine to boot). In this article you'll learn how to boot a Xen virtual machine from a disk. This tip applies to all Xen solutions that are using Linux as the VM host machine, and is not intended for Citrix XenServer.

In Xen environments, you can install virtual machines as paravirtual machines, or as full virtual machines. To boot a virtual machine from CD-ROM or DVD, it does matter how you installed it. Full virtual machines are a bit easier to boot from CD-ROM or DVD than paravirtual machines. The good news is that you can change the configuration of a paravirtual machine to have it boot from the optical disk anyway.


Paravirtual versus full virtual machines
The starting point to have your VM boot from the optical drive, is the virtual machine startup script. On a SUSE based Xen host, these are the scripts that you find in the /etc/xen/vm directory. In this article, we're talking about the "normal" scripts, not the XML scripts that you also find in this directory. Using these scripts, Xen tries to start a virtual machine. That means that it will initialize the virtual hardware and try to boot the operating system that is installed on the virtual hard disk. This applies to both paravirtual and full virtual machines.

There is a difference though in the way a full virtual machine boots, as compared to the way a paravirtual machine boots. The fact is that full virtual machines are easier to boot from CD-ROM or DVD. But if you just want to boot the virtual machine from an optical disk, it doesn't really matter if you start it as a full virtual machine or a paravirtual machine. The only thing that matters, is that you are able to access the virtual machine disk by booting the machine from the optical drive. To do this, it's enough to create a template virtual machine file and use that for all the virtual machines that you want to boot from the optical disk. The only thing you'll need to do with this template file, is to replace the VM specific items in it. The listing below shows what this template file could look like:


Tempalte VM file to boot virtual machines from optical drive

name="bootfromcd"
memory=1024
maxmem=4048
vcpus=1
on_poweroff="destroy"
on_reboot="restart"
on_crash="destroy"
localtime=1

builder="hvm"
device_model="/usr/lib/xen/bin/qemu-dm"
kernel="/usr/lib/xen/boot/hvmloader"
disk=[ 'REPLACE THIS WITH DISK SPECIFICATION FROM ORIGINAL FILE', ]
vif=[ 'REPLACE THIS WITH NETWORK CARD SPECIFICATION FROM ORIGINAL FILE', ]
boot="d"
stdvga=0
vnc=1
vncunused=1
apic=1
acpi=1
pae=1

serial="pty"


In the example template file there are a few things that you should be aware of. First, there are some generic options that specify how the VM is composed. These are all the lines up to the vmloader line, which specifies the hvm (hardware virtual machine) is used to load this virtual machine.

Following the generic lines, you can find two lines where the disk and network card of the virtual machine are defined. You have to make sure that at least the disk line contains the name of the discs as you are using them in the virtual machine that you are booting. That means, you'll first have the definition of the disk file itself, followed by the specification of the optical drive. The latter could look like phy:/dev/cdrom,xvdb for instance.


The last part in this configuration that you need to consider, is the boot line. Above, it states boot="d". This line is using drive letters as are used in a Windows environment to refer to the device that the VM should be booting from, so this example assumes that there is one virtual hard disk in the virtual machine. Change this according to the number of disks that really are used by your virtual machine.

After creating the template file in this way, you're ready to run the virtual machine and boot it from the optical drive. Before doing that, just make sure that it isn't currently active, as that might lead to conflicts in disk access. Once started from the optical disk, you can run any troubleshooting program you like from it. This should help you fixing whatever is broken in the VM.



0