UEC: Bundling Windows Image
Creating new disk image
This will be the main HDD in the virtual image, so make sure to give it as much space as you’ll need. Since we’re building a kvm image, we can use a qcow2 format for disk images. Qcow2 is an expandable image format, so it’ll only take as much storage space as it’s actually used within the image.
$ kvm-img create -f qcow2 win-2k3.img 20G
OS Installation
Get the iso file of the Windows distribution to be installed in the image. And start the installation process.
$sudo kvm -m 1024 -cdrom Win2003_cd1.iso -drive file=win-2k3.img,if=scsi,boot=on -nographic -vnc :0
After finishing the installation and in case the installation needs 2nd CD as well, reboot the VM and launch the VM by the following command.
$ sudo kvm -m 1024 -boot c -cdrom Win2003_cd2.iso -drive file=win-2k3.img,if=scsi,boot=on -nographic -vnc :0
Once installation is complete, create the boot disk needed for Windows 2003 server.
Copying the boot files
Re-launch the VM using the following command, so that the first CD can be accessed in order to copy some files from it.
$ sudo kvm -m 1024 -boot c -cdrom Win2003_cd1.iso -drive file=win-2k3.img,if=scsi,boot=on -nographic -vnc :0
Copy ntldr, ntdetect.com and sym_hi.sys files from CD1, to a specific location to create the boot disk, say C:\bootfiles
Rename sym_hi.sys to Ntbootdd.sys (this is the SCSI driver needed to boot the hard disk). In case, sym_hi.sys is not present in the CD, copy it from the following location of the installation
C:\WINDOWS\system32\drivers
Write the following lines to a new file and save it as Boot.ini in the same location, i.e, C:\bootfiles
[boot loader] timeout=30 Default= multi(0)disk(0)rdisk(0)partition(1)\Windows [operating systems] multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows Server 2003"
Shut down the VM and proceed for the boot disk creation.
Boot disk creation
On CC, execute the following command to create the boot disk.
$ dd bs=512 count=2880 if=/dev/zero of=win-boot.img
Now attach this disk as a floppy disk and start the Windows VM.
$ sudo kvm -m 1024 -boot c -drive file=win-2k3.img,if=scsi,boot=on,index=1 -fda win-boot.img -nographic -vnc :0
On the Windows VM, format the floppy disk and copy all the files from C:\bootfiles to the floppy.
Shutdown the VM and test the boot disk created with the following command
$ sudo kvm -m 1024 -boot a -drive file=win-2k3.img,if=scsi,boot=on,index=1 -fda win-boot.img -nographic -vnc :0
This should boot into windows, if the boot floppy is properly created.
Network Configuration
Now download the e1000 drivers, since e1000 is the default interface that is supported by Eucalyptus. Download the drivers from the following location:
e1000 Drivers Download
For 32-bit VM, download PRO2KXP.exe For 64-bit VM, download PROEM64T .exe
Once the download is finished, shutdown the VM and restart the VM with the following command.
$ sudo kvm -m 1024 -boot a -drive file=win-2k3.img,if=scsi,boot=on,index=1 -fda win-boot.img -net nic,model=e1000 -net tap-nographic -vnc :0
The above command tell the VM to make use of e1000 model as its NIC. After executing the above command, the following warning is seen on the console which can be ignored.
Warning: vlan 0 is not connected to host network
Once the VM boots, install the network drivers.
Enable remote desktop for all users on the VM. This is needed, as this is the only way, without installing third party tools, Windows machines can be accessed remotely. Enable remote desktop by navigating to Start → Settings → Control Panel → System → Remote and select “Remote Desktop” option for all users. This completes the Windows disk setup. Shut down the VM.
Memdisk
The kernel memdisk can be used to load Windows. The default syslinux memdisk can be used for this purpose. memdisk is present in /usr/lib/syslinux
If it is not present, install syslinux by the following command.
$ sudo apt apt-get install syslinux
After installing, memdisk will be found in /usr/lib/syslinux
$ cd /usr/lib/syslinux $ ls -l memdisk -rw-r--r-- 1 root root 20068 2008-07-15 20:25 memdisk
Copy it to the location where all windows files are present, i.e., win-2k3.img and win-boot.img
Registering with UEC
The last step would be to upload the images to UEC. The files that need to be uploaded are:
- memdisk
- win-boot.img
- win-2k3.img
Before starting the upload process shut down the VM.
Registering memdisk
Execute the following commands to bundle and register the memdisk.
$ euca-bundle-image -i memdisk --kernel true $ euca-upload-bundle -b win2k3_bucket -m /tmp/memdisk.manifest.xml $ euca-register win2k3_bucket/memdisk.manifest.xml
Save the output produced by the last command above (eki-XXXXXXXX), which will be needed while registering the disk image.
Registering boot disk
Execute the following commands to bundle and register the boot disk (win-boot.img).
$ euca-bundle-image -i win-boot.img --ramdisk true $ euca-upload-bundle -b win2k3_bucket -m /tmp/win-boot.img.manifest.xml $ euca-register win2k3_bucket/win-boot.img.manifest.xml
Save the output produced by the last command above (eri-XXXXXXXX), which will be needed while registering the disk image.
Registering disk image
Execute the following commands to bundle and register the disk image (win-2k3.img)
$ euca-bundle-image -i win-2k3.img --kernel eki-XXXXXXXX --ramdisk eri-XXXXXXXX $ euca-upload-bundle -b win2k3_bucket -m /tmp/win-2k3.img.manifest.xml $ euca-register win2k3_bucket/win-2k3.img.manifest.xml
Replace eki-XXXXXXXX and eri-XXXXXXXX with the exact values as noted down earlier.
Image Listing
The new images that have been uploaded can be seen by using euca-describe-images command.
For Ex:
$ euca-describe-images IMAGE emi-55470DE2 win-2k3/win-2k3.img.manifest.xml admin available public x86_64 machine IMAGE eki-2BC30D1B win-2k3/memdisk.manifest.xml admin available public x86_64 kernel IMAGE eri-76C20ED5 win-2k3/win-boot.img.manifest.xml admin available public x86_64 ramdisk
Security Group
Verify that the security group to be used with this instance is allowing RDP traffic.
$ euca-describe-groups GROUP admin default default group PERMISSION admin default ALLOWS tcp 3389 3389 FROM CIDR0.0.0.0/0
If the above entry is not present, allow RDP with the following command.
$ euca-authorize default -P tcp -p 22 -s 0.0.0.0/0
Running the instance
To launch a new instance of the custom image, execute euca-run-instances command.
$ euca-run-instances emi-55470DE2 -k mykey -t c1.xlarge
Since this is a windows instance the VM type is specified as c1.xlarge, which has 20GB of hard disk space. Also specifying the key is not mandatory, as the access to the instance would be through RDP.
Accessing the instance
From the remote machine, navigate to Start → Programs → Accessories → Remote Desktop Connection.
Specify the public ip address that the instance gets and click Connect.
The desktop of the windows instance should be accessible after providing the credentials.
UPDATE: For Windows XP bundling
While bundling Windows XP, the OS doesn’t recognize SCSI driver during installation process.
The following workaround is suggested:
1. Attach the disk as IDE disk.
$ sudo kvm -m 1024 -cdrom winxpcd.iso -drive file=winxp.img,boot=on -nographic -vnc :0
2. Finish the installation of Windows XP.
3. Now create another disk image using kemu-img
$ kvm-img create -f qcow2 newdisk.img 5G
4. Start the instance by attaching the second disk as SCSI disk.
$ sudo kvm -m 1024 -drive file=winxp.img,boot=on -drive file=newdisk.img,if=scsi -nographic -vnc :0
5. After Windows XP boots, it detects and installs the driver for the SCSI disk (sys_hi.sys)
The remaining procedure is same as that of bundling Windows 2003 Server.

Awesome !! Kiran for posting the detailed instructions for windows image.
Just have few queries.
1) I suppose when we follow these steps, we are creating a new virtual machine and bundling windows on that vm. Am I correct or do we need to create a new virtual machine and then try installing on this?
2) For accessing the windows machine, we need to use rdp. Initially when creating the vm and bundling windows image, we would not have given any ip. If I have a free public ip, where can I set this ip so that I can access the windows machine using rdp.
I am new to linux and networking. So counting on your vast knowledge and helping tendency to help
Appreciate your help
1.) You create a new vm, install windows on that and then start the bundling process.
2.) If you are using MANAGED_NOVLAN mode, you would specify the public ip range in eucalyptus.conf, something like:
VNET_PUBLICIPS=”192.168.1.10-192.168.1.100″
The public ip address range specified should be accessible from your remote machine (the one which you use to connect to your UEC remotely)
Eucalyptus assigns the public ip sequentially to the running instances.
From euca-describe-instances or euca-describe-addresses, you can know the public ip assigned to the running instance.
For SYSTEM mode, the dhcp server running in your network would be responsible for assigning the public ip. In SYSTEM mode, your public and private ip would be the same.
Hope this helps.
Kiran
Thanks a lot kiran.My scenario is as below:
1) I have the UEC on a single machine ubuntu server
2) I have to create a virtual machine with windows (accessible through rdp etc.)
3) Can I now login to my Ubuntu server open terminal and then follow the process u have given in the instructions. Will this create a new virtual machine and install windows on that?
I am thinking that by following ur instructions as it, it will create a new virtual machine and install windows on that. Am I correct?
4) If I am incorrect, do we need to create a new virtual machine first and then follow ur instructions. The instructions shows executing kvm commands. So do we create a ubuntu/linux virtual machine and then install windows on that.
5) Do we need any other tools installed (other than normal ubuntu) to start this.
I know it is very basic but I have very limited knowledge on basic linux only. Also ur blog is the only one which provides simple instructions and explains clearly the issues and resolutions.
Thanks Again Kiran
You should install Windows from a CD in the VM, not Ubuntu. Run these commands on your UEC machine, for creating the windows VM, access the VM through VNC client from a remote machine connected to UEC to finish the Windows installation, create the boot disk, get memdisk (all as explained) and then run the image bundling commands.
You will need kvm and euca-tools for the bundling process. If they not installed, install them using the following commands:
$ sudo apt-get install euca2ools
$ sudo apt-get install qemu-kvm
Hope that helps.
Kiran
I have successfully installed UEC and I don’t have any instance running at this moment. I am trying to create Windows server 2003 x64 standard with SP2 image on UEC.
Steps followed:
1) Create a windows disk image using
$ kvm-img create -f qcow2 win-2k3.img 80G.
2) Install Windows installation on the created disk image
$sudo kvm -m 1024 -cdrom Win2003_cd1.iso -drive file=win-2k3.img,if=scsi,boot=on
Note:
1) I copied both the Windows ISO image to my Ubuntu Server. The disk image created and the ISO images are in the same location. I executed the command from this directory.
2) I have removed -nographic and -vnc from the above command. I am accessing the server using HP ILO.
I get the following error:
1) lsi_scsi : error : unhandled writeb : 0xFF ( some binary digits)
2) Sometimes lsi_scsi : bad status move
But parallely I can see the installation window (QEMU window) and I continue with installation giving key and other details. When installation is about to get over I get the following error:
“A problem has been detected and a window has been shut down to prevent damage to your computer.
KERNEL_DATA-INPAGE-ERROR
***STOP: 0×00000077
Dumping physical memory to disk
According to Microsoft, they say that:
“STOP Messages 0×00000077 are related to kernel traps that are caused when the operating system tries to load a page into memory from the paging file on the hard disk, but cannot access the page because of either a software or hardware failure.
If you experience this issue more than one time, contact your computer or hard disk vendor. ”
I searched in different forums but could not get any help. Not sure what is wrong. Please help me.
I haven’t faced such issue. Can you please check if the ISO file is fine or try with a different ISO file
So just to get this straight as how I am new to cloud computing…After I am done install all the nodes etc… I jump on the controller to install windows in a vm environment and then to finish the setup I log in from a remote machine correct? So all in all I am basicly asking if all this is done on the controller first… or do I create the package/image on another linux box and then transfer it over? Thanks… your are a huge help!!
You can do the vm creation on NC and then transfer the image to the CC for the bundling process. If you intend to do everything on the CC, you need to install qemu-kvm package on the CC. All this can be done by connecting to CC/NC remotely through ssh.
Hope that helps.
cheers,
Kiran
Awesome! Your are so Awesome!! Ok… so just out of curiosity… mainly because I dont have the time to test it out at this moment….. instead of creating it on the node or controller…. am I able to create the image from any ubuntu server and then just transfer it over and register it? Thanks Again.
I think that should be possible… but I haven’t tried doing it on a different ubuntu server… Will check and confirm the same
Hi Josh,
It is possible to do on a different ubuntu server. I have created the vm on a separate server and transferred the images to CC and got it registered.
Hi Josh,
It is possible to do on a different ubuntu server. I have created the vm on a separate server and transferred the images to CC and got it registered.
Thanks Kiran….You are the best
So… in order to use the w2k3 iso’s I can just burn the iso files to a disc and type in that command correct? Thanks again!
you need not burn the iso. Just copy the iso file to your machine and specify the path to the iso file in the kvm command
Sorry for asking so many questions… I am just trying to get a clear understanding of everything here… ok so I have everything working now… however I was wondering if you could show me how I can bridge the network connection with my original NIC. Thanks man
If you are asking about bridging on NC, add the following lines to your /etc/network/interfaces file
auto eth0iface eth0 inet manual
auto br0
iface br0 inet static
address A.B.C.D
netmask 255.255.255.0
network A.B.C.0
broadcast A.B.C.255
gateway A.B.C.1
dns-nameservers W.X.Y.Z
dns-search mydomain.com
bridge_ports eth0
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off
Change “eth0″ to whatever interface you have and the other information (ip address, gateway, dns etc) as per your network setup.
thanks a ton… for some reason I ran across a weird problem… when I registered the boot disk it also gave me an eki instead of an eri… then I just tried using both eki’s and of course it now gives me the referenced ramdisk id is invalid.So why on earth did it give me two eki’s?
There has been a typo in the commands mentioned in the post which I have corrected now
For boot disk it should be “–ramdisk true” not “–kernel true”
Thanks for the feedback
Sorry for bothering you again.. but I love learning… ok so then…. before I do that…. How do I remove the other two win-boot images already registered before I re bundle it? Thanks so much. I appreciate all this.
$ euca-deregister eki-XXXXXXXX$ euca-deregister eri-XXXXXXXX
$ euca-deregister emi-XXXXXXXX
$ euca-delete-bundle -b bucket_name --clearalso how do I figure out what mykey is?
euca-describe-keypairs lists available keys. If you don’t have any keys, you can create one with euca-add-keypair
$ euca-add-keypair mykeyHI kiran,
I have installed UEC and want to create an instance with windows image.
My query is in the command below , you have mention win-2k3.img
Do i need to download windows XP and save it on HDD and give its path in command or insert it in CD-rom and give its path?
“kvm-img create -f qcow2 win-2k3.img 20G”
Sorry I am new to this and have not much idea. My main doubt is from where to get the image and i don’t have floppy drive…
Can we use Win-XP image which is a single CD. I couldn’t understand why we need 2CD’s as mentioned above.
Kindly let me know what i should do.
Thanks,
Mukund
Hi Mukund,
You can copy the iso file to your system and specify its path or directly point to the cdrom (/media/cdrom/iso)
Floopy disk mentioned is only a virtual device, you need not have a physical drive.
As I used win2k3, I used 2 cds. Havn’t bundled XP. But that should be possible following the above process.
Let me know how it goes.
Cheers,
Kiran
Kindly let me know how to go ahead with creating a VM instance with XP as OS. I do not have floppy drive. It would be of great help if you could let me know.
And after installation of XP on a VM. can we login to it through remote desk and install apps like Oracle and java and deploy applications on it using tomcat?
And once done How would people access my application running on that VM in tomcat.
Hope I am not bothering you much but i want to know and learn more about cloud.
thanks
Mukund
Hi Mukund,
As I said, the floppy drive is a virtual device, so you need not have a physical drive.
If you install your apps after the bundling process, these apps would not be available if the instance is shutdown.
Instead of logging through remote desktop and then installing the apps you need, create the VM and then install all the required apps and now finish the bundling process. In this way, all the apps would be present even if the instance is shutdown.
Hope that helps.
Kiran
Hey Kiran! I have been able to get all this running now! Yay!! Well for the most part. I was able to access the windows 2003 instance via RD and all that jazz. However I still have two issues to address you with. My eth0 ip is in the 192.168.2.1 range and for some reason even after doing what you posted it still shows the bridged ip at something like 71.5.4.23. Anyways.. I need to somehow figure out a way of turning my VM’s NIC into the actual routing numbers. Also… another weird issue arose that after I shut my machine down a few times.. And messing around with the /etc/network/interfaces it gives me this message every time I try and do something like boot the instance, get another access key etc.
EC2_ACCESS_KEY environment variable must be set.
I dont understand it. Maybe I need to learn more on access keys and stuff. Could you help? Thanks.
Please check if the environment variables from eucarc file are set properly. Refer “Retreiving Credentials” and “Using Your Credentials” sections of UEC: CC and NC on a single machine
Hi,
Thanks for writing this blog. It is very helpful.
I used the instructions mentioned above and I have bundled windows image.Now I am able to run the windows instance. But I am facing a problem, when I run windows instance it is showing me a public and private IP, but I am unable to ping the IP’s e.g
reservation r-xxxxxxx admin default instance i-xxxxxxx emi-xxxxxxx a.b.c.d 172.19.1.2 running 0 c1.xlarge clustername eki-xxxxxx eri-xxxxxxx
I have configured network on windows and have enable 3389 for rdp.
I think I am missing something but I don’t know exactly what is missing.
Your help will be very vital to resolve this issue.
Thanks in advance.
Regards
You need to add the ping rule to the default security group. If you have allowed only SSH and RDP, your security group would look something like this
$ euca-describe-groupsGROUP admin default default group
PERMISSION admin default ALLOWS tcp 22 22 FROM CIDR0.0.0.0/0
PERMISSION admin default ALLOWS tcp 3389 3389 FROM CIDR0.0.0.0/0
Execute the following command to allow ping
$ euca-authorize -P icmp -s 0.0.0.0/0 default$ euca-describe-groups
GROUP admin default default group
PERMISSION admin default ALLOWS tcp 22 22 FROM CIDR0.0.0.0/0
PERMISSION admin default ALLOWS tcp 3389 3389 FROM CIDR0.0.0.0/0
PERMISSION admin default ALLOWS icmp 0 0 FROM CIDR0.0.0.0/0
Now you should be able to ping the instance.
Hope that helps.
cheers,
Kiran
So does this setup save any settings created on this image?
Any settings you want to get into the image has to be done during VM creation and prior to the bundling process.
Hi there
Ive been trying to setup windows instance on UEC. good to find ur post. I followed the instructions and WOW I was able to create the windows image and also bundle it without any issues.
I tried running the instance and it also was running. After the status was running, I tried pinging the public ip but didnt get any reply. After a very long time, got request timed out and sometimes destination host unreachable. I cannot access the windows instance using rdp from outside the linux box. Also from windows instance I try pinging the linux box. To my surprise, it says request timed out.
Note: I used UEC store Ubuntu image and I am able to run it, ping it, connect it through ssh from the linux box. But the same problem I cannot access the ubuntu vm from outside the linux box.
Ive given required permissions (euca-authorize) for icmp, ssh and rdp. I am very much confused and not sure how I am going to resolve this asap.
That u have successfully done this, I require your help plz..
BTW the following details may be of some use to help me in this regard.
* UEC in a single machine.
* KVM hypervisor
* Managed NO VLAN mode.
* Assigned a free ip as VNET_PUBLIC_IP parameter in eucalyptus.conf.This ip is in the same subnet asthat of the ubuntu machine where UEC is setup.
Some doubts:
– Forums say that in a single machine UEC, only static or system works. Does managed no vlan (for public access) not work ?
– Is the windows instance not accessible bcoz the windows image is shutdown and we have to run that and login?
Nothing is working and am thinking of weird reasons for the failure. Plzz help me and make my day.
Thx in advance.
1. On single machine, only SYSTEM and STATIC modes works.
2. If the instance is running and rules for ping and RDP have been added, then you should be able to access the instance.
HI kiran,
I have built the cloud and have run instances of linux..
I created images of other distros as well
But I couldn’t get it with windows as i am stuck at second step itself.
I am a newbie donno where i am making mistake..
$ kvm-img create -f qcow2 win-xp.img 20G
$sudo kvm -m 1024 -cdrom VRMPVOL_EN.iso -drive file=win-xp.img,if=scsi,boot=on -nographic -vnc :0
I mounted the cd using mount command
Then I executed the two commands…but I get error VRMPVOL_EN.iso (Name of XP disk) not found ..Invalid Image..
Let me know what error occured.
Should i make an ISO image of the disk using Nero or Magic Disc and use it from my pen drive?
In the second command, does the file exist in your current working directory???
If not specify the entire path to the file…. /home/mukund/path/to/VRMPVOL_EN.iso
Hope that helps.
Kiran
Hello There,
We have followed the same steps mentioned above to create Windows 2003 and XP images. The XP image runs well with remote desktop but the 2003 does not. We have recreated the image multiple times, even using different CDs, but it did not work. We even tried the option of VNC. Could you please tell us, is there any difference in process of building XP and 2003 images?
Appreciating sparing your valuable time,
Thanks in advance,
Hiren
Hi Hiren,
Good to know that XP bundling was simple and straight. Though, I haven’t tried bundling XP, I haven’t faced any issues with Win2K3 bundling on Karmic UEC (Ubuntu 9.10). Even I’m facing issues with Ubuntu 10.04 beta 2 for Win2K3 bundling. Not able to connect to the instance through RDP. Are you using Ubuntu 10.04 beta 2?
Kiran
We are using Ubuntu 9.10. Windows 2003 Server with SevicePack1.
I was able to bundle Windows 2003 Server with SP1 on Ubuntu 9.10. RDP access to the instance also succeeds. I have done nothing different from the steps that are mentioned in the post.
Can you confirm,
Are the e1000 drivers installed on the VM?
Is RDP enabled on the VM instance before bundling and uploading the image?
Can also check if you are able to ping the public ip of the running instance? You need to add icmp rule to the security group attached to the Windows 2003 Server instance.
Kiran
Hi,
how long does it take for this to execute?
$sudo kvm -m 1024 -cdrom Win2003_cd1.iso -drive file=win-2k3.img,if=scsi,boot=on -nographic -vnc :0
Its already taken 10 mins..should i wait!!
and xp installation requires key … how to enter that..
all i can see is the cursor blinking!!
It should start instantaneously and you should be able to see the normal Win XP installation window in your VNC client. You need to enter the key during installation process, when it asks for it.
oh , my system is completely based from command line…UEC 9.10 server is the OS i am using …
so i am not able to see any window…how shud i go ahead plz let me know…Cursor is still blinking from 45 mins…..
Plz let me know the OS ur using…
is it a server edition?
Where might i have gone wrong
Even I’m on ubuntu 9.10 server. But I can connect from another machine (with gui) through a VNC client using the ip address of the ubuntu 9.10 server.
If you don’t have another machine using which you can connect through VNC, change the kvm command to
$sudo kvm -m 1024 -cdrom Win2003_cd1.iso -drive file=win-2k3.img,if=scsi,boot=on -cursesso that you can see the installation process.
Hope that helps.
Kiran
Hi Kiran
I followed the instructions that you had provided and I was able to bundle the windows image. Even the windows instance is running
I have used Managed no vlan mode in a single machine UEC setup. I have used a free unused ip (10.A.B.C) in the vnet_public_ips parameter. I used Windows 2003 Server and then installed SP2 pack on the image. After installing the e1000 drivers the local area network is showing as incomplete.
euca-describe-addresses shows the public ip address assigned to the windows instance. However I cannot ping the public ip address from the ubuntu server. When pinging it takes hours and no response is returned. When pinging the windows instance from another machine, it says “Response from 10.A.B.C Destination host unreachable”. I am also unable to ping the ubuntu server ip from the windows image.Using rdp also fails. I have provided icmp, ssh and rdp authorization using euca-authorize.
My questions
1) Do we have set some specific network ip details in the windows image or is it managed by eucalyptus (assigning public ip etc.). If it is managed by eucalyptus, how does it take the gateway details etc.. (does it use the eucalyptus.conf gateway,subnet etc..)
2) If the bundled windows instance is running, does it mean that the windows image is powered on and available for login. How does it boot? Do we have to have it running and then start the windows instance.
3) How to troubleshoot the not ping/not accessible through rdp problem? Any specific ways to troublshoot the reason for the problem
4) Do we need to add NAT/route entries? If the existing NAT/route/iptables entries created by eucalyptus are corrupted, how do we again make it available from eucalyptus?
I have done everything but no luck. It is frustrating. So looking forward to your help to resolve this. Please help…
Hi,
Please see my responses inline.
I have used Managed no vlan mode in a single machine UEC setup. I have used a free unused ip (10.A.B.C) in the vnet_public_ips parameter. I used Windows 2003 Server and then installed SP2 pack on the image. After installing the e1000 drivers the local area network is showing as incomplete.You have to install the e1000 drivers during the VM creation and before bundling process.
1) Do we have set some specific network ip details in the windows image or is it managed by eucalyptus (assigning public ip etc.). If it is managed by eucalyptus, how does it take the gateway details etc.. (does it use the eucalyptus.conf gateway,subnet etc..)As you are using MANAGED_NOVLAN mode, eucalyptus takes care of configuring the network with the settings that have been provided in eucalyptus.conf file. If you haven’t chnaged the private network configuration then you should see, the private ip to be in 1752.1.19.xx subnet. The default gateway for the instance would be 172.1.19.1. The public ip that you have mentioned in the eucalyptus.conf file will be assigned to the instance.
2) If the bundled windows instance is running, does it mean that the windows image is powered on and available for login. How does it boot? Do we have to have it running and then start the windows instance.Once the instance is running, it boots and is available for login. The boot process is similar to that of running a VM by using kvm command. If the instance is running, you should see the kvm command listed in “ps ax” list.
You need not have to start the VM and then raise an instance. Starting an instance itself means, copying the image to the user directory (/var/lib/eucalyptus/instances/admin/i-XXXXXXXX) and starting the VM.
3) How to troubleshoot the not ping/not accessible through rdp problem? Any specific ways to troublshoot the reason for the problemEntries in nc.log, httpd-nc_error_log and cc.log might throw some light on what is happening
4) Do we need to add NAT/route entries? If the existing NAT/route/iptables entries created by eucalyptus are corrupted, how do we again make it available from eucalyptus?Either clean restart of eucalyptus services (first eucalyptus and then eucalyptus-cc) or a reboot of the machine should take care of clearing the corrupted entries.
Hope that helps.
Kiran
First of all, wonderful post.
I do have an issue when I chose the -net e1000 and booted in to the VM the recommended driver did not work. It installed and a new unknown device appeared, and the Intel (e1000) nic was unable to register itself on the network or get an IP from dhcp. I uninstalled that driver and grabbed the driver for all OSes and received the same issue.
I’m running my cloud on two servers with the Ubuntu 10.04 LTS. I’m not sure if that is the problem or not. Any help would be greatly appreciated.
Thanks,
Hi Jeff,
The above mentioned bundling, I have done on Ubuntu 9.10 and didn’t face any issues. Well, Lucid gave me some surprises like instance not booting. But the network part in the bundling process went fine. Even I have 2 Ubuntu 10.04 servers in my UEC setup.
Which Windows version are you bundling? I have bundled only Win 2K3 server and haven’t given a hand at other versions of Windows.
Kiran
I followed your guide so I used Windows 2003. When I searched the Intel site I noted that there were no e1000 drivers available for Windows 2003. Personally I wouldn’t think that it would matter, but apparently it does.
I read somewhere that you could use virt-manager to view instances running on UEC. Do you have that setup, and if so could you share? If not, I’m really new to kvm, but can you specify that your image has more than one nic? That would make it easier for me to troubleshoot.
Thanks,
Oh, noticed that your following my sites twitter feed, I’m following you from regular account where I post stuff.
Jeff,
The Intel drivers can be found at the following location
Use PRO2KXP.ece for 32-bit and PROEM64T.exe for 64-bit version of the OS.
I have done this stuff on my Lucid setup and the bundling process was again smooth without any hiccups.
Since the instance would be launched using KVM command, the general documentation of virt-manager which is used for debugging KVM instances (found here) holds good for debugging UEC instances as well.
Hope that helps.
Kiran
Those are what I used, I’ll try again.
Thanks,
I went back through and followed the steps exactly and I’m still not able to get the Intel card to get an address. Also, I never received the VLAN error message you mention. Here is what I get:
jeffrey@fe-node:~/win$ sudo kvm -m 1024 -cdrom ../NRMSVOL_EN.iso -drive file=win-2k3.img,if=scsi,boot=on -nographic -vnc :0 -net nic,model=e1000
pci_add_option_rom: failed to find romfile “pxe-e1000.bin”
Also you can find a screenshot of the guest here:
http://www.patton-tech.com/node/220/15
Jeff,
Looks like, the second “-net” option in the KVM command is missing. Can you cross check the KVM command used. It should contain two “-net” options. The correct command is:
$ sudo kvm -m 1024 -boot a -drive file=win-2k3.img,if=scsi,boot=on,index=1 -fda win-boot.img -net nic,model=e1000 -net tap-nographic -vnc :0Somehow, the command got truncated above. My bad….
I have corrected the same….
Hope that helps.
Kiran
Sorry for late reply. Answers to your queries are as follows.
Yes, e1000 drivers are installed on VM.
Yes, RDP has been enabled on VM before bundling and uploading.
No, We are not able to ping public ip of running instance.
We have added ICMP rules.One of the output lines, for euca-describe-group command is:
PERMISSION admin default ALLOWS icmp 0 0 FROM CIDR 0.0.0.0/0
Apart from this, kindly note following things.
(0) We use Ubuntu 9.10 (Desktop edition). For image, Windows 2003 (32-bit, SP1)
(1) Once the instance is in running mode, NC shows 100% CPU2 utilization, which is not normal for other instances we tried earlier.
(2) While encrypting the image, do we have to provide any option (like NOWAIT) in grub.cfg
Hi Hiren,
Are there any error logs seen in nc.log, which might shed some light…
Also it would be nice if we can confirm the network configurations on CC and NC. Assuming CC has 2 interfaces, say eth0 connected to public network (LAN…) and eth1 connected to NC. Then the network configuration on CC should be something like, the instance’s public interface should be attached to eth0 and it’s private interface should be attached to eth1. ifconfig on CC should show eth0:pub, eth1:priv and eth1:metadata (whcih is used for metadata services)
To debug further we can start VNC service to the instance by modifying the KVM command, as described in UEC/Eucalyptus – Debugging instances
Hope that helps.
Kiran
Hi Sir,
I have created XP image as above but i am not able to ping or rdp into it..
I have installed applications on the xp image and then created emi,eki,eri…
After that I ran the image..
Every 5.0s: euca-describe-instances Thu May 6 10:48:03 2010
RESERVATION r-4A7208B9 admin default
INSTANCE i-50B108F1 emi-9E3C0FAF 10.11.32.88 172.19.2.2 running smsd 0 c1.medium 2010-05-06T05
:12:54.106Z cluster1 eki-8E170F67 eri-9ACF0F8F
I did not use any public IP..
the second is also private IP..
I can connect ping,ssh to linux images..but not XP images
Kindly help me..
GROUP admin default default group
PERMISSION admin default ALLOWS tcp 22 22 FROM CIDR 0.0.0.0/0
PERMISSION admin default ALLOWS tcp 3389 3389 FROM CIDR 0.0.0.0/0
PERMISSION admin default ALLOWS icmp 0 0 FROM CIDR 0.0.0.0/0
these are the euca-describe-groups output
Are you using UEC/Eucalyptus on Ubuntu 9.10 ot Ubuntu 10.04. The bundling process above was done on my Ubuntu 9.10 setup. I had the same issue with UEC/Eucalyptus on Ubuntu 10.04. Unable to connect to Windows instance. See: UEC: Bundling Windows instances on Lucid Lynx
Dear Kiran Murari,
I am working on Windows instance creation with help your instruction provided above,
Please find details about eucalyptus environment
OS – Ubuntu 9.0.4
Image (EMI) – Windows Server 2003
I successfully created windows images and started . But My windows instances could not get IP address such as public and private IP address
I create Linux images with help of your instruction, but i got ip address for my instances
Can you provide me what was reason , my windows instances could not get IP address
Thanks
Deepak
Hi Deepak,
Have you installed the e1000 drivers? By default, Eucalyptus uses e1000 as the NIC. In case of Linux instances, the e1000 module would be loaded dynamically when the instance comes up, whereas in case of Windows instances the drivers need to be installed during the bundling process.
Also please check /var/log/eucalyptus/nc.log for any error messages related to IP address assignment.
cheers,
Kiran Murari
Hi Kiran,
I have a question. I successfully created the boot disk (that was the floppy disk) but when it comes to downloading the network driver e1000, my VM IP address was completely different from what I am using on the real physical machine thus I could not connect to the internet from the VM. My question is that how can I download that driver? Is there any way to work on this problem?
Thank you!
Hi Tanner,
In KVM, the default network mode is NAT. So the VM would acquire an IP address in the subnet 10.0.2.x. Connecting to internet shouldn’t be a problem in this mode. Please check the gateway and DNS settings in the VM.
Kiran
Very usefull article. One note: you should add a notice about Intel-VT/AMD-V technology platform requrement. I spent few days before I discovered it.
Hi Kiran,
I was trying to add the N/W configuration part with
$ sudo kvm -m 1024 -boot a -drive file=win-2k3.img,if=scsi,boot=on,index=1 -fda win-boot.img -net nic,model=e1000 -net tap-nographic -vnc :0
and i get an error
$ Invalid -net type ‘tap-nographic’
Am i wrong somewhere? I am setting it up with UEC 10.4
Hi Pradeep,
It is a single line command and there is a space between ‘tap’ and ‘-nographic’. Please cross check the command that you typed.
Hope that helps.
cheers,
Kiran
Hi Kiran
I’m try to create window image follow your instruction but I’m have some problem.
please help me, Now instance still running but can’t ping and rmd.
I don’t know may I do something wrong.
Hi Nathanan,
Are you using Ubuntu 10.04?
If yes, then please follow this link UEC: Bundling Windows instances on Lucid Lynx
Hope that helps.
Kiran
Hi Kiranmurari,
I have problem with OS installation.
after typing :
$ kvm-img create -f qcow2 winxp.img 20G
$sudo kvm -m 1024 -cdrom winxp.iso -drive file=winxp.img,if=scsi,boot=on -nographic -vnc :0
There is nothing appear on the screen, it seems that windows is not installing.
I leaved it for a day and when I returned it was unchange.
Could you give me some advice on solving this problem.
Thankyou very much
vtcloud
Hi,
Are you trying to bundle a WinXP image?
If yes, please see the UPDATE above on bundling WinXP images.
Hope that helps.
cheers,
Kiran
sorry for late
thank you for reply
so now I’m using Ubuntu 9.10 and I already installed network driver e1000 but
my instance can’t ping and rdp. have any config in NC.
thank you
Plz check your security groups and enable PING/RDP, if they are not enabled already.
If the problem still persists, you can attach a VNC display to the running instance, for further debugging. Plz refer:
Using VNC to debug an image
Hope that helps.
Kiran
Dear Kiran,
You Rock man
I was referring your all links and i swear it is because of your all links I was able to implement it successfully with UEC on ubuntu and custom image for ubuntu only.
I have small doubt for windows and just wanted to clarify with you.
We will install windows as you said and i am sure it will be successful but i am able to understand how we will remotely connect to that instance.
As i understand in case of linux VM’s we need to remote connect to any instance by just enabling vnc on node controller by editing file /usr/share/eucalyptus/gen_kvm_libvirtd_xml.
So i can get connected to those instance without any issue. But in case of multiple node controllers how i can connect to remote VM which is running say linux OS. In case of windows do we need do any settings while installing that only?
Sorry if i am too descriptive
Regards
Rahul Teni
Adding VNC to gen_kvm_libvirt_xml is just for debugging purpose. Any access to the instance from outside world should be taken care inside the image during bundling process. For Linux images, you can install openssh-server and access the instance using the public ip from outside world. Similarly, for windows images enable remote desktop, allow access to port 3389 in security groups and then access using the remote desktop client.
Hop that helps.
cheers,
Kiran
Which public ip? I mean what kind of settings we have to do in Image?
As i understand it will be just node controller’s ip which can be used to connect remotely to that instance.
If i am not wrong i think you are saying it should be public ip of node controller.
Can you please clarify this in more elaborative manner.
Regards
Rahul Teni
Not the public ip of node controller, but public ip of the instance.
If you remember, during installation of UEC, you have given a range of ip addresses to be assigned to the instances. These ip addresses should be in your LAN subnet for this communication to happen. Eucalyptus gives one ip address per instance from this range to the instance, so that you can access the instance from your LAN.
Hope that clarifies your doubt.
- Kiran