Difference between revisions of "OS:qemu"
Line 34: | Line 34: | ||
If you need to access the floppy drive, use this switch: <tt>-fda /dev/fd0</tt>. | If you need to access the floppy drive, use this switch: <tt>-fda /dev/fd0</tt>. | ||
+ | |||
+ | To get ssh access to the emulated machine use the following options for qemu: | ||
+ | <tt>-user-net -redir tcp:5555:10.0.2.15:22</tt> | ||
+ | This redirects connections to the local machine, the acl, on port 5555 to the virtual machine on port 22 (ssh). Now, once the virtual machine has booted use the command:<tt> ssh -p 5555 root@localhost</tt> |
Latest revision as of 22:39, 2 October 2005
qemu is an open-source x86 processor emulator that allows the execution of a virtual machine, which is an operating system within an operating system.
qemu is installed on all the ACLs in /usr/local/bin/qemu. For kernel work, a generic image based on Fedora Core 4 is available on the ACLs at /var/lib/systemimager/qemu/fc4.img. The sysadmins have prepared a local copy for each person in CS420, with the following mapping of ACL to user:
username | ACL |
---|---|
charliep | codd |
copelco | acl0 |
brownda | acl1 |
davidje | acl7 |
ferraza | acl6 |
hunteke | acl9 |
lemanal | acl10 |
kernco | acl4 |
smithsh1 | acl3 |
tmcnulty | acl2 |
weissto | acl5 |
To boot the image, login to the ACL either directly or via ssh. cd to /p0/yourusername, and then run qemu -hda fc4.img. You might want to make a backup copy of fc4.img so you don't have to recopy it from image.
You will login as root. You can get the password from one of the sysadmins or Charlie.
If you need to access the floppy drive, use this switch: -fda /dev/fd0.
To get ssh access to the emulated machine use the following options for qemu: -user-net -redir tcp:5555:10.0.2.15:22 This redirects connections to the local machine, the acl, on port 5555 to the virtual machine on port 22 (ssh). Now, once the virtual machine has booted use the command: ssh -p 5555 root@localhost