Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
windows_vm_in_kvm_on_headless_ubuntu_server [23.01.2016 15:59] – Pascal Suter | windows_vm_in_kvm_on_headless_ubuntu_server [23.01.2016 17:08] – Pascal Suter | ||
---|---|---|---|
Line 19: | Line 19: | ||
now connect with your favourite vnc client to the ip of your server and install windows. you need to load the derivers from the second cdrom that is emulated. make sure you choose the correct virtio storage driver for your windows version. it may load the wrong one if you just select the root directory and let the installer search for it, resulting in an unstable windows vm | now connect with your favourite vnc client to the ip of your server and install windows. you need to load the derivers from the second cdrom that is emulated. make sure you choose the correct virtio storage driver for your windows version. it may load the wrong one if you just select the root directory and let the installer search for it, resulting in an unstable windows vm | ||
+ | ===== autostart on boot / init script ===== | ||
once the installation is done, shut down your windows vm. it is now time to make it autostart upon boot of your linux machine.. in order to do that i used [[https:// | once the installation is done, shut down your windows vm. it is now time to make it autostart upon boot of your linux machine.. in order to do that i used [[https:// | ||
+ | |||
+ | this script will also send a shutdown command to all vms once the server shuts down, so no need to manually do that in order to gracefully shutdown your vm' | ||
+ | |||
+ | ===== bridged network ===== | ||
+ | by default qemu uses nat-ed network, so that the vm is in its own network and the vm host acts as a nat router. if you want your vm to be part of your network like any physical machine you have connected to your swich you can use a bridged connection.. | ||
+ | |||
+ | you need to install bridge-utils to be able to create a bridge network device | ||
+ | | ||
+ | now change your ''/ | ||
+ | < | ||
+ | auto br0 | ||
+ | iface br0 inet static | ||
+ | address 192.168.168.1 | ||
+ | netmask 255.255.255.0 | ||
+ | network 192.168.168.0 | ||
+ | broadcast 192.168.168.255 | ||
+ | gateway 192.168.168.254 | ||
+ | bridge_ports eth0 | ||
+ | bridge_stp off | ||
+ | bridge_maxwait 5 | ||
+ | |||
+ | < | ||
+ | Notice: you won't need any block for eth0 after you defined the bridge interface. | ||
+ | |||
+ | now either reboot your machine or try to get your eth0 down using '' | ||
+ | |||
+ | now in your qemu command line you ened to add the parameters | ||
+ | -net nic -net tap | ||
+ | the default qemu-ifup script in /etc/ will do the rest for you. | ||
+ | |||