[CentOS-virt] Centos virsh - add a physical device

Tue Sep 29 13:13:08 UTC 2009
Tait Clarridge <tait at clarridge.ca>

> Native config:
> 
> cat win2k8.cfg
> name = "win2k8-hvm"
> uuid = "c53ac13f-d32f-9934-8c0b-a8728fb52f19"
> maxmem = 1024
> memory = 1024
> vcpus = 1
> builder = "hvm"
> kernel = "/usr/lib/xen/boot/hvmloader"
> boot = "c"

If you want it to boot from anything in the CDROM device, change this to
read:

boot = "dc"

> pae = 1
> acpi = 1
> apic = 1
> localtime = 0
> on_poweroff = "destroy"
> on_reboot = "restart"
> on_crash = "restart"
> device_model = "/usr/lib/xen/bin/qemu-dm"
> vfb = [ "type=vnc,vncunused=1,keymap=en-us" ]
> disk = [ "phy:/dev/vol1/win2k8,hda,w", "phy:/dev/cdrom,hdc:cdrom,r" ]

Alright, if I am not mistaken your system already has a CDROM setup. It
is pointing to the physical interface /dev/cdrom. I may be confusing
your question, but did you want to add another one? 

If the current one isn't working you will have to figure out what the
CDROM device name is (/dev/sr0 is also an option) but make sure you have
modified the boot= line as I did above.

You should also be able to add an ISO image to act as the CDROM (all on
one line):

disk =
[ "phy:/dev/vol1/win2k8,hda,w","file:/path/to/file.iso,hdc:cdrom,r"]

> vif = [ 
> "mac=00:16:36:2a:e4:15,bridge=eth0,script=vif-bridge,vifname=vif50.0" ]
> parallel = "none"
> serial = "pty"

Tait