How install windows vm?

there is no cdrom or hd,so how can I install windows vm from cdrom? or how create the cdrom device?

Hi,
In Sunstone User Interface, go to Storage -> Images. There you can create an image selecting Type -> Readonly CDROM.

You can upload an ISO file with the Operating System installer or if you have the same file in an URL you can use “Path in OpenNebula server”. Once you have that CDROM you can add it from the Storage tab when creating an new VM Template. I’d set it to boot in 2nd place after the disk0 called win7 in your screenshot. That way the VM will try too boot from disk0, as it has no operating system on it, it will try to use the CDROM and boot the installer. Once you install Windows, the machine will be rebooted but that time the CDROM won’t be used as it is placed 2nd in boot order :wink:

Use the search in this forum and in OpeNebula’s documentation to find out more info about Windows VM

See ya!

I created a cd-rom device, but it doesn’t work, I don’t know where is the problem?

“Size 1MB” seems a little bit small.

I agree with Thomas, 1 MB for a Windows CDROM looks weird.

Anyway, though it was posted some months ago maybe the info provided in this discussion: How to create Windows VM? can help you to prepare your windows VM, try to read it as it has lots of info. For example you’ll need some drivers if you want to use Virtio devices like disks, network interfaces… if you use KVM, it’s always a good idea to use Virtio for enhanced performance.

Cheers

Still could not execute boot from the CD-ROM,is it wrong with my configuration on CD-ROM or HD?


Well first you should set the DATABLOCK to persistent. At least for the installation. Can you show us the VM config?

Thank you for your reply,after i set the DATABLOCK to persistent and run the instance, but there is the same hints:could not read from CDROM (code 0004).my vm config like this:

Template
AUTOMATIC_DS_REQUIREMENTS = "“CLUSTERS/ID” @> 0"
AUTOMATIC_REQUIREMENTS = "(CLUSTER_ID = 0) & !(PUBLIC_CLOUD = YES)"
CPU = "0.8"
DISK = [
CLONE = “NO”,
CLONE_TARGET = “SYSTEM”,
CLUSTER_ID = “0”,
DATASTORE = “default”,
DATASTORE_ID = “1”,
DEV_PREFIX = “sd”,
DISK_ID = “0”,
DISK_SNAPSHOT_TOTAL_SIZE = “0”,
DISK_TYPE = “FILE”,
DRIVER = “qcow2”,
IMAGE = “CD-ROM”,
IMAGE_ID = “25”,
IMAGE_STATE = “2”,
IMAGE_UNAME = “oneadmin”,
LN_TARGET = “SYSTEM”,
ORDER = “1”,
READONLY = “YES”,
SAVE = “NO”,
SIZE = “1847”,
SOURCE = “/var/lib/one//datastores/1/8c7bfb4c62acd6acec3176757374500b”,
TARGET = “sda”,
TM_MAD = “ssh”,
TYPE = “CDROM” ]
DISK = [
CLONE = “NO”,
CLONE_TARGET = “SYSTEM”,
CLUSTER_ID = “0”,
DATASTORE = “default”,
DATASTORE_ID = “1”,
DEV_PREFIX = “sd”,
DISK_ID = “1”,
DISK_SNAPSHOT_TOTAL_SIZE = “0”,
DISK_TYPE = “FILE”,
DRIVER = “raw”,
IMAGE = “hd”,
IMAGE_ID = “26”,
IMAGE_STATE = “8”,
IMAGE_UNAME = “oneadmin”,
LN_TARGET = “SYSTEM”,
ORDER = “2”,
PERSISTENT = “YES”,
READONLY = “NO”,
SAVE = “YES”,
SIZE = “8000”,
SOURCE = “/var/lib/one//datastores/1/0e0e13d4bc511b27668b943712f20227”,
TARGET = “sdb”,
TM_MAD = “ssh”,
TYPE = “FILE” ]
GRAPHICS = [
LISTEN = “0.0.0.0”,
PORT = “5965”,
TYPE = “VNC” ]
MEMORY = "800"
NIC = [
AR_ID = “0”,
BRIDGE = “br0”,
CLUSTER_ID = “0”,
IP = “192.168.137.130”,
MAC = “02:00:c0:a8:89:82”,
NETWORK = “br0”,
NETWORK_ID = “2”,
NIC_ID = “0”,
SECURITY_GROUPS = “0”,
TARGET = “one-87-0”,
VN_MAD = “dummy” ]
OS = [
ARCH = “x86_64”,
BOOT = “disk0,disk1”,
KERNEL_CMD = “virtio” ]
SECURITY_GROUP_RULE = [
PROTOCOL = “ALL”,
RULE_TYPE = “OUTBOUND”,
SECURITY_GROUP_ID = “0”,
SECURITY_GROUP_NAME = “default” ]
SECURITY_GROUP_RULE = [
PROTOCOL = “ALL”,
RULE_TYPE = “INBOUND”,
SECURITY_GROUP_ID = “0”,
SECURITY_GROUP_NAME = “default” ]
TEMPLATE_ID = "13"
VCPU = "1"
VMID = “87”

Mmm, maybe you’ve already tried… but try CDROM to be raw instead of qcow2 and change DEV_PREFIX to hd instead of sd.

Cheers!

I seems you are trying to use qcow2 for the cdrom. Thats not gonna work. Use raw and try again.

I tried,but it’s always the same hints,can’t read from cdrom,I don’t know why.how set cdrom can read


I found the problem finally,the iso file has issue,after changed another ISO file,then the cdrom going to work and install vm.

thanks