proxmox 3.1 guest os win2000 安裝 virtio storage driver

在 win2000 客端上安裝 virtio-win 驅動,用正常的方式是無法安裝成功的!使用最初版的 virtio-win 驅動安裝,雖然可以安裝但驅動卻無法正常運作。而使用新版 virtio-win-0.1-59 的驅動,會直接告訴你找不到驅動的程式因為它不認得啦。

所以先用最初版的 virtio-win 驅動,安裝選擇 win2k 資料夾裏的驅動。讓 win2000 可以辦識該裝置(但無法使用會出現驚嘆號,僅供辦識裝置用)。

再使用新版 virtio-win-0.1-59 的驅動來更新裝置驅動(驚嘆號的裝置),使它可以正常使用。(在裝置上選擇更新驅動程式,選擇新版 virtio-win 驅動片中 wxp 資料夾來找尋可用的驅動程式即可。)

做完上述的動作在 win2000 的客端,就能正常啟用 virtio-storage 的驅動程式了。

Proxmox VE : accessing COM port from the host in a VM


Proxmox 使用 qemu/kvm manager (qm) 工具管理 qemu server,「qm」是它的主要用來管理的命令。由 qm 的手冊得知「args」是 VM CONFIGURATION 中的一條屬性設定,其目的是將參數傳遞至「kvm」。

因此在 qemu-server 設定檔中加上一行「args: -serial /dev/ttyS0」,則表示在「kvm」依設定檔配置虛擬機會跟據「args」裏的參數,也虛擬一個serial port 裝置,虛擬的裝置仍映射至 Host 端 /dev/ttyS0 的裝置上。

args: ...
    Note: this option is for experts only. It allows you to pass arbitrary arguments to kvm, for example:

    args: -no-reboot -no-hpet

而 kvm 配置虛擬機硬體 serial port 裝置時,也有多樣的設定方式不是只能從 Host 端直接映射。完整設定方式可由 man  qemu 查詢得知。

       -serial dev
           Redirect the virtual serial port to host character device dev. The default device is "vc" in
           graphical mode and "stdio" in non graphical mode.

           This option can be used several times to simulate up to 4 serial ports.

           Use "-serial none" to disable all serial ports.

           Available character devices are:

               Virtual console. Optionally, a width and height can be given in pixel with


               It is also possible to specify width or height in characters:


           pty [Linux only] Pseudo TTY (a new PTY is automatically allocated)

               No device is allocated.

               void device

               [Linux only] Use host tty, e.g. /dev/ttyS0. The host serial port parameters are set according
               to the emulated ones.

               [Linux only, parallel port only] Use host parallel port N. Currently SPP and EPP parallel port
               features can be used.

               Write output to filename. No character can be read.

               [Unix only] standard input/output

               name pipe filename

               [Windows only] Use host serial port n

               This implements UDP Net Console.  When remote_host or src_ip are not specified they default to
       When not using a specified src_port a random port is automatically chosen.

               If you just want a simple readonly console you can use "netcat" or "nc", by starting QEMU
               with: "-serial udp::4555" and nc as: "nc -u -l -p 4555". Any time QEMU writes something to
               that port it will appear in the netconsole session.

               If you plan to send characters back via netconsole or you want to stop and start QEMU a lot of
               times, you should have QEMU use the same source port each time by using something like
               "-serial udp::4555@4556" to QEMU. Another approach is to use a patched version of netcat which
               can listen to a TCP port and send and receive characters via udp.  If you have a patched
               version of netcat which activates telnet remote echo and single char transfer, then you can
               use the following options to step up a netcat redirector to allow telnet on port 5555 to
               access the QEMU port.

               "QEMU Options:"
                   -serial udp::4555@4556

               "netcat options:"
                   -u -P 4555 -L -t -p 5555 -I -T

               "telnet options:"
                   localhost 5555

               The TCP Net Console has two modes of operation.  It can send the serial I/O to a location or
               wait for a connection from a location.  By default the TCP Net Console is sent to host at the
               port.  If you use the server option QEMU will wait for a client socket application to connect
               to the port before continuing, unless the "nowait" option was specified.  The "nodelay" option
               disables the Nagle buffering algorithm.  If host is omitted, is assumed. Only one TCP
               connection at a time is accepted. You can use "telnet" to connect to the corresponding
               character device.

               "Example to send tcp console to port 4444"
                   -serial tcp:

               "Example to listen and wait on port 4444 for connection"
                   -serial tcp::4444,server

               "Example to not wait and listen on ip port 4444"
                   -serial tcp:,server,nowait

               The telnet protocol is used instead of raw tcp sockets.  The options work the same as if you
               had specified "-serial tcp".  The difference is that the port acts like a telnet server or
               client using telnet option negotiation.  This will also allow you to send the MAGIC_SYSRQ
               sequence if you use a telnet that supports sending the break sequence.  Typically in unix
               telnet you do it with Control-] and then type "send break" followed by pressing the enter key.

               A unix domain socket is used instead of a tcp socket.  The option works the same as if you had
               specified "-serial tcp" except the unix domain socket path is used for connections.

               This is a special option to allow the monitor to be multiplexed onto another serial port.  The
               monitor is accessed with key sequence of Control-a and then pressing c. See monitor access
               pcsys_keys in the -nographic section for more keys.  dev_string should be any one of the
               serial devices specified above.  An example to multiplex the monitor onto a telnet server
               listening on port 4444 would be:

               "-serial mon:telnet::4444,server,nowait"
               Braille device.  This will use BrlAPI to display the braille output on a real or fake device.

               Three button serial mouse. Configure the guest to use Microsoft protocol.

Proxmox VE : accessing COM port from the host in a VM

Posted on January 5, 2010

If you want to access the COM/serial port of your host machine from a KVM virtual machine in Proxmox VE, simply do the following :

vim /etc/qemu-server/104.conf
where 104 is the ID of the VM

add “args: -serial /dev/ttyS0″ to the end of the file

It should look like this :

name: testVM
ide2: debian-500-i386-netinst.iso,media=cdrom
smp: 1
vlan0: rtl8139=XX:XX:XX:XX:XX:XX
bootdisk: ide0
ide0: vm-104-disk.qcow2
ostype: other
memory: 256
args: -serial /dev/ttyS0

If the VM is already running, you may have to stop the VM completely and start it again for it to see the COM port.

If you simply reboot the machine, it may not see it.

Proxmox VE :

Proxmox 在diskless時,將它mirage 會造成vm locked 的狀態。

在重開機之後 Proxmox 上的磁碟陣列裝置代號由 md127 變為 md0 ,造成 drbd disk less。

修正 drbd 設置檔將 r1.res 的磁碟裝置改為目前 md 代號。

固定 md 磁碟代號名稱,可用如下指令將設定寫入「/etc/mdadm/mdadm.conf」設定檔內。

# mdadm -D --scan
ARRAY /dev/md/100 metadata=1.2 name=VMDB010C:100 UUID=3e65c4f0:008c1c7b:7bd568e5:2c9a65ac
# mdadm -D --scan >> /etc/mdadm/mdadm.conf

後來又發現 vm is locked 無法mirage 和start ,使用指令qm unlock vmid 將它解鎖,之後就能正常啟動了。(在diskless時,將它mirage 會造成vm locked 的狀態)

Proxmox: Ticket authentication failed – invalid ticket

Proxmox: Ticket authentication failed – invalid ticket

奇怪怎麼總是有一台 Proxmox cluster 成員無法和其它成員同步呢?

狀況發生在出問題的主機與 Cluster 的其它成員的時間無法同步,因此出現 Proxmox WGUI 管理頁面顯示同步狀態有問題。

在出錯主機上用 date 查看系統時間是否與其它電腦時間落差太大。
ntpq -p 可查看與網路校時伺服器相差的時間有多大。

確定落差時間過大,就重新啟動 ntp 服務「service ntp start」。